X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2Fzfs%2Fzfs_vfsops.c;h=028638d5c85e978e16e4d554dee1a505802a222e;hb=6742abf9ec5a2c0ca132951efa0dee85698ff9b8;hp=1763d171a06ddf9f7d15f99a73b2c0a0712c037f;hpb=3558fd73b5d863304102f6745c26e0b592aca60a;p=zfs.git diff --git a/module/zfs/zfs_vfsops.c b/module/zfs/zfs_vfsops.c index 1763d17..028638d 100644 --- a/module/zfs/zfs_vfsops.c +++ b/module/zfs/zfs_vfsops.c @@ -997,11 +997,15 @@ zfs_statvfs(struct dentry *dentry, struct kstatfs *statp) &refdbytes, &availbytes, &usedobjs, &availobjs); /* - * The underlying storage pool actually uses multiple block sizes. - * We report the fragsize as the smallest block size we support, - * and we report our blocksize as the filesystem's maximum blocksize. + * The underlying storage pool actually uses multiple block + * size. Under Solaris frsize (fragment size) is reported as + * the smallest block size we support, and bsize (block size) + * as the filesystem's maximum block size. Unfortunately, + * under Linux the fragment size and block size are often used + * interchangeably. Thus we are forced to report both of them + * as the filesystem's maximum block size. */ - statp->f_frsize = 1UL << SPA_MINBLOCKSHIFT; + statp->f_frsize = zsb->z_max_blksz; statp->f_bsize = zsb->z_max_blksz; bshift = fls(statp->f_bsize) - 1; @@ -1071,17 +1075,17 @@ zfsvfs_teardown(zfs_sb_t *zsb, boolean_t unmounting) rrw_enter(&zsb->z_teardown_lock, RW_WRITER, FTAG); -#ifdef HAVE_DNLC if (!unmounting) { /* - * We purge the parent filesystem's vfsp as the parent - * filesystem and all of its snapshots have their vnode's - * v_vfsp set to the parent's filesystem's vfsp. Note, - * 'z_parent' is self referential for non-snapshots. + * We purge the parent filesystem's super block as the + * parent filesystem and all of its snapshots have their + * inode's super block set to the parent's filesystem's + * super block. Note, 'z_parent' is self referential + * for non-snapshots. */ - (void) dnlc_purge_vfsp(zsb->z_parent->z_vfs, 0); + shrink_dcache_sb(zsb->z_parent->z_sb); + invalidate_inodes(zsb->z_parent->z_sb); } -#endif /* HAVE_DNLC */ /* * Close the zil. NB: Can't close the zil while zfs_inactive