Correct off-by-one in maximum-immutable-share-size for old servers. fixes #1781

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
This commit is contained in:
David-Sarah Hopwood 2013-03-23 03:10:50 +00:00
parent 9be1a94043
commit 68b7f9e979
2 changed files with 2 additions and 2 deletions

View File

@ -178,7 +178,7 @@ class NativeStorageServer:
VERSION_DEFAULTS = { VERSION_DEFAULTS = {
"http://allmydata.org/tahoe/protocols/storage/v1" : "http://allmydata.org/tahoe/protocols/storage/v1" :
{ "maximum-immutable-share-size": 2**32, { "maximum-immutable-share-size": 2**32 - 1,
"maximum-mutable-share-size": 2*1000*1000*1000, # maximum prior to v1.9.2 "maximum-mutable-share-size": 2*1000*1000*1000, # maximum prior to v1.9.2
"tolerates-immutable-read-overrun": False, "tolerates-immutable-read-overrun": False,
"delete-mutable-shares-with-zero-length-writev": False, "delete-mutable-shares-with-zero-length-writev": False,

View File

@ -106,7 +106,7 @@ class FakeStorageServer:
self.allocated = [] self.allocated = []
self.queries = 0 self.queries = 0
self.version = { "http://allmydata.org/tahoe/protocols/storage/v1" : self.version = { "http://allmydata.org/tahoe/protocols/storage/v1" :
{ "maximum-immutable-share-size": 2**32 }, { "maximum-immutable-share-size": 2**32 - 1 },
"application-version": str(allmydata.__full_version__), "application-version": str(allmydata.__full_version__),
} }
if mode == "small": if mode == "small":