On Apr 8, 2005 8:40 AM, Sebastien Delafond <[EMAIL PROTECTED]> wrote:
> On Thu, Apr 07, 2005 at 10:43:47PM +1000, Richard Jones wrote:
> > So firstly it looks like I've been fairly boneheaded here.  that
> > value of 1000 in blocks = 1000*1024 should never have been there,
> > that should have been calculated from quoteMbTotal (after
> > appropriate parsing into an int, the string might include the MB tag
> > which will need stripping (the same way as the quotaMbUsed is
> > stripped should work if it does have the {space}MB tag). This
> > assumes that the libgmail.py code still calculates the correct
> > values for quotainfo.
> 
> I implemented this change ("not hardcoding the gmail quota in
> gmailfs"), and that effectively fixed what df reports as the total
> size for a gmailfs virtual drive.
> 
> On the other hand, the problem of df reporting 0 as the usage
> percentage was more a bit more involved; I had to make a change in the
> python-fuse CVS repository (I actually maintain it upstream, on top of
> my responsibility for it as a Debian package): it appears that the
> statfs stub in _fusemodule.c wasn't dealing whatsoever with
> statfs.f_bavail. This value is actually what df uses to figure out how
> much space is free, whereas statfs.f_bfree is used to determine how
> much space is available *to the superuser only*).
>

Cool, I'm glad someone has taken over the python fuse bindings.  You
might have done this already but if not it might be worth looking at
exposing the uid/gid of the user who is mounting the filesystem, this
is available in the fuse context from memory but didn't used to be
exposed via python.
 
> After making this change, I fixed the statfs call in gmailfs as well
> (setting statfs.f_bavail to statfs.f_bfree, since I'm not sure blocks
> reserved for the superuser make sense in a gmailfs context).
> 
> As soon as both the new python-fuse and gmailfs hit Debian, I'll send
> you the gmailfs patch, but you'll have to make it clear that this
> change *will break* if not used with the latest python-fuse from
> CVS...
> 

I already rely on the CVS version of libgmail (haven't checked for a
release recently, that may no longer be the case), so one more CVS
checkout dependency isn't really an issue :-) .  I look forward to the
patch.


> > Thanks again for maintaining the package, it means most of the gmailfs
> > questions I get are now related to supporting the windows "Gmail
> > Drive" which I have nothing to do with :-)
> 
> No problem, I'm glad my work for Debian makes your life easier :)
> 

Not just mine, packages like gmailfs with long lists of obscure
dependencies really benefit from being packaged up as a .deb, I'm sure
its greatly widened the audience for gmailfs (I even had one guy email
me asking for advice on how to install the .deb's on his windows XP
machine, poor fellow :-) )

Regards,
Richard.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to