From: Blaisorblade <bla...@ya...> - 2005-01-12 00:08:29
|
On Tuesday 11 January 2005 11:11, st...@ni... 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 |