DragonFly BSD
DragonFly bugs List (threaded) for 2009-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: weird problem with statvfs() on a hammer filesystems


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 3 Dec 2009 10:14:11 -0800 (PST)

:Hi,
:
:I'm seeing a weird problem with statvfs() on a hammer filesystems.
:With this little test program:
:
:..
:
:I get fsbuf.f_bavail == 0 on a freshly mounted hammer FS:

    Ach.  I think I see it.  Try the patch below.

						-Matt

diff --git a/sys/vfs/hammer/hammer_vfsops.c b/sys/vfs/hammer/hammer_vfsops.c
index fa478bf..79321cd 100644
--- a/sys/vfs/hammer/hammer_vfsops.c
+++ b/sys/vfs/hammer/hammer_vfsops.c
@@ -935,7 +935,7 @@ hammer_vfs_statvfs(struct mount *mp, struct statvfs *sbp, struct ucred *cred)
 	hammer_rel_volume(volume, 0);
 
 	mp->mnt_vstat.f_bfree = (bfree - breserved) / HAMMER_BUFSIZE;
-	mp->mnt_vstat.f_bavail = mp->mnt_stat.f_bfree;
+	mp->mnt_vstat.f_bavail = mp->mnt_vstat.f_bfree;
 	if (mp->mnt_vstat.f_files < 0)
 		mp->mnt_vstat.f_files = 0;
 	*sbp = mp->mnt_vstat;




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]