On Tuesday 11 January 2005 11:11, [EMAIL PROTECTED] wrote:
> when df -h does a statfs, hostfs statfs'es /, instead of the mount-source
> directory,
I.e. the one you see in the mount point inside UML...
> so you get the wrong stats about free-space if the mounted 
> directory does not originate from the / host partition.

Yes, good idea... fixing it like you said will guarantee correct free space 
stats (apart for quotas) but not correct used-space and total-space stats 
(they would be possible only for humfs if it uses some accounting).
> Stian
However, by looking the code, I don't see an obvious way to trigger this 
bug...

In: 
static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent)
{
We have:
        HOSTFS_I(root_inode)->host_filename = name;
And later, this value is reused (I actually checked this is supposed to refer 
to the same thing) as:
        err = do_statfs(HOSTFS_I(sb->s_root->d_inode)->host_filename,

So, could you double-check? I'll also try to reproduce it, if possible.

Bye
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to