From 81490128d88e55bff4145b37bbc05a7b5fb31c7a Mon Sep 17 00:00:00 2001 From: Francois Tigeot Date: Mon, 15 Aug 2011 14:42:23 +0200 Subject: [PATCH 23/41] Populate the statfs structure associated to mount points for Hammer mounts Contrary to most filesystems, Hammer didn't do it. The new code was taken from ffs_mount() --- sys/vfs/hammer/hammer_vfsops.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/sys/vfs/hammer/hammer_vfsops.c b/sys/vfs/hammer/hammer_vfsops.c index 4dfb470..fa9e04c 100644 --- a/sys/vfs/hammer/hammer_vfsops.c +++ b/sys/vfs/hammer/hammer_vfsops.c @@ -809,6 +809,18 @@ hammer_vfs_mount(struct mount *mp, char *mntpt, caddr_t data, vflush(mp, 0, 0); done: + if ((mp->mnt_flag & MNT_UPDATE) == 0) { + /* New mount */ + + /* Populate info for mount point (NULL pad)*/ + bzero(mp->mnt_stat.f_mntonname, MNAMELEN); + size_t size; + if (mntpt) { + copyinstr(mntpt, mp->mnt_stat.f_mntonname, + MNAMELEN -1, &size); + } + } + (void)VFS_STATFS(mp, &mp->mnt_stat, cred); hammer_rel_volume(rootvol, 0); failed: /* -- 1.7.5.4