zfsctl: No need to sync ctldir inodes

There's no metadata to write to disk for ctldir inodes. So we check if
a inode belongs to the ctldir in zpl_commit_metadata, and returns
immediately if it is.

Signed-off-by: Andrey Vesnovaty <andrey.vesnovaty@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #2797
This commit is contained in:
Andrey Vesnovaty 2013-08-12 21:47:04 +03:00 committed by Brian Behlendorf
parent c6a3a222d3
commit b23975cbe0
1 changed files with 3 additions and 0 deletions

View File

@ -152,6 +152,9 @@ zpl_commit_metadata(struct inode *inode)
fstrans_cookie_t cookie;
int error;
if (zfsctl_is_node(inode))
return (0);
crhold(cr);
cookie = spl_fstrans_mark();
error = -zfs_fsync(inode, 0, cr);