Changeset c7cd3f3 in trunk


Ignore:
Timestamp:
2009-01-10T02:37:36Z (17 years ago)
Author:
Brian Warner <warner@…>
Branches:
master
Children:
167742c
Parents:
cc9a6e14
Message:

storage.py: announce a maximum-immutable-share-size based upon a 'df' of the disk. Fixes #569, and this should be the last requirement for #346 (remove 12GiB filesize limit)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/allmydata/storage.py

    rcc9a6e14 rc7cd3f3  
    796796    implements(RIStorageServer, IStatsProducer)
    797797    name = 'storage'
    798     VERSION = { "http://allmydata.org/tahoe/protocols/storage/v1" :
    799                  { "maximum-immutable-share-size": 2**32 },
    800                 "application-version": str(allmydata.__version__),
    801                 }
    802798
    803799    def __init__(self, storedir, reserved_space=0,
     
    959955
    960956    def remote_get_version(self):
    961         return self.VERSION
     957        remaining_space = self.get_available_space()
     958        if remaining_space is None:
     959            # we're on a platform that doesn't have 'df', so make a vague
     960            # guess.
     961            remaining_space = 2**64
     962        version = { "http://allmydata.org/tahoe/protocols/storage/v1" :
     963                    { "maximum-immutable-share-size": remaining_space },
     964                    "application-version": str(allmydata.__version__),
     965                    }
     966        return version
    962967
    963968    def remote_allocate_buckets(self, storage_index,
Note: See TracChangeset for help on using the changeset viewer.