--- a/usr/src/uts/common/fs/zfs/zfs_vnops.c Tue Jul 31 07:59:20 2007 -0700
+++ b/usr/src/uts/common/fs/zfs/zfs_vnops.c Tue Jul 31 11:47:23 2007 -0700
@@ -1165,6 +1165,10 @@
VN_RELE(ZTOV(zp));
goto top;
}
+
+ if (error == 0) {
+ vnevent_create(ZTOV(zp));
+ }
}
}
out:
@@ -1250,7 +1254,7 @@
goto out;
}
- vnevent_remove(vp);
+ vnevent_remove(vp, dvp, name);
dnlc_remove(dvp, name);
@@ -1513,7 +1517,7 @@
goto out;
}
- vnevent_rmdir(vp);
+ vnevent_rmdir(vp, dvp, name);
/*
* Grab a lock on the directory to make sure that noone is
@@ -2433,9 +2437,17 @@
}
}
- vnevent_rename_src(ZTOV(szp));
+ vnevent_rename_src(ZTOV(szp), sdvp, snm);
if (tzp)
- vnevent_rename_dest(ZTOV(tzp));
+ vnevent_rename_dest(ZTOV(tzp), tdvp, tnm);
+
+ /*
+ * notify the target directory if it is not the same
+ * as source directory.
+ */
+ if (tdvp != sdvp) {
+ vnevent_rename_dest_dir(tdvp);
+ }
tx = dmu_tx_create(zfsvfs->z_os);
dmu_tx_hold_bonus(tx, szp->z_id); /* nlink changes */
@@ -2768,6 +2780,10 @@
zfs_dirent_unlock(dl);
+ if (error == 0) {
+ vnevent_link(svp);
+ }
+
ZFS_EXIT(zfsvfs);
return (error);
}
@@ -3701,6 +3717,7 @@
VOPNAME_PATHCONF, { .vop_pathconf = zfs_pathconf },
VOPNAME_GETSECATTR, { .vop_getsecattr = zfs_getsecattr },
VOPNAME_SETSECATTR, { .vop_setsecattr = zfs_setsecattr },
+ VOPNAME_VNEVENT, { .vop_vnevent = fs_vnevent_support },
NULL, NULL
};