]> git.proxmox.com Git - mirror_zfs.git/commit
Fix link count of root inode when snapdir is visible
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Wed, 8 May 2019 23:40:51 +0000 (08:40 +0900)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 8 May 2019 23:40:51 +0000 (16:40 -0700)
commit97aa3ba44f0b3911866e5dfc31b0d7a9fb124855
tree9cbdc28323eca6bb9835f261cafa79039c3fa6d2
parente2dddb7e58f7046dc1bfdbc49db52f298fb7019f
Fix link count of root inode when snapdir is visible

Given how zfs_getattr() is implemented, zfs_getattr_fast() (used by
->getattr() of zpl inodes) also needs to consider an additional link
count if "snapdir" property is set to "visible".

Without this, # of directories in root inode of each dataset doesn't
match the link count when snapdir is visible.

Reviewed-by: Richard Yao <ryao@gentoo.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@osnexus.com>
Closes #8727
module/zfs/zfs_vnops.c