#637 closed defect

support "keep this much disk space free" on Windows as well as other platforms — at Version 2

Reported by: zooko Owned by: zooko
Priority: major Milestone: 1.6.0
Component: code-storage Version: 1.3.0
Keywords: win32 easy reviewed news-done Cc: tahoe-dev@…, kevan@…
Launchpad Bug:

Description (last modified by zooko)

This patch 2e45619844cb7c36 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 232 bytes: http://msdn.microsoft.com/en-us/library/aa364935.aspx

Change History (2)

comment:1 Changed at 2009-04-01T14:21:41Z by zooko

  • Milestone changed from 1.4.0 to 1.4.1
  • Owner set to zooko
  • Status changed from new to assigned

comment:2 Changed at 2009-10-25T17:39:07Z by zooko

  • Description modified (diff)
  • Keywords easy added
  • Milestone changed from 1.6.0 to eventually

Any Windows hackers want to fix this? It really bothers me to see Windows getting second-class-citizen treatment, but I don't have convenient access to a Windows box right now to work on, and I'm prioritizing testing, packaging, and release-management for the imminent Tahoe-LAFS v1.6 release.

It really should be pretty easy. In fact, I'm marking it with the "easy" tag.

Note: See TracTickets for help on using tickets.