[tahoe-dev] [tahoe-lafs] #637: support "keep this much disk space free" on Windows as well as other platforms
tahoe-lafs
trac at allmydata.org
Sat Feb 21 19:47:19 PST 2009
#637: support "keep this much disk space free" on Windows as well as other
platforms
--------------------------+-------------------------------------------------
Reporter: zooko | Owner:
Type: defect | Status: new
Priority: major | Milestone: 1.3.1
Component: code-storage | Version: 1.3.0
Keywords: win32 | Launchpad_bug:
--------------------------+-------------------------------------------------
This patch [20090220220353-4233b-24ec3c21004366dbb38ac28ec1fccce44f693b7b]
makes it so that if we don't know how to find out the free disk space on a
platform, we fall back gracefully by display something like "I dunno"
instead of the free disk space. We also already have code (before that
patch) which falls back gracefully in the sense of emitting a warning at
startup if the {{{reserved_space}}} feature has been configured (see
[src:doc/configuration.txt]) and the current platform can't figure out how
much free disk space it has.
However, rather than having such fallbacks, I would really rather just
ensure that Tahoe figures out how much free disk space it has on all
supported platforms. For Windows (the only platform which currently does
work using {{{statvfs}}}), the way to do that is to require {{{pywin32}}},
{{{import win32api}}}, and call {{{win32api.GetDiskFreeSpaceEx()}}}
http://docs.activestate.com/activepython/2.5/pywin32/win32api__GetDiskFreeSpaceEx_meth.html
http://msdn.microsoft.com/en-us/library/aa364937(VS.85).aspx
Careful, don't call {{{win32api.GetDiskFreeSpace()}}} -- that's an old
function that predates disks with more than 2^32 bytes:
http://msdn.microsoft.com/en-us/library/aa364935.aspx
--
Ticket URL: <http://allmydata.org/trac/tahoe/ticket/637>
tahoe-lafs <http://allmydata.org>
secure decentralized file storage grid
More information about the tahoe-dev
mailing list