summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/sys/kqueue.210
-rw-r--r--sys/kern/vfs_subr.c1
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/libc/sys/kqueue.2 b/lib/libc/sys/kqueue.2
index b692c1f..fd57b16 100644
--- a/lib/libc/sys/kqueue.2
+++ b/lib/libc/sys/kqueue.2
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 1, 2016
+.Dd May 2, 2016
.Dt KQUEUE 2
.Os
.Sh NAME
@@ -368,7 +368,13 @@ was called on the file referenced by the descriptor.
.It Dv NOTE_WRITE
A write occurred on the file referenced by the descriptor.
.It Dv NOTE_EXTEND
-The file referenced by the descriptor was extended.
+For regular file, the file referenced by the descriptor was extended.
+.Pp
+For directory, reports that a directory entry was added or removed,
+as the result of rename operation.
+The
+.Dv NOTE_EXTEND
+event is not reported when a name is changed inside the directory.
.It Dv NOTE_ATTRIB
The file referenced by the descriptor had its attributes changed.
.It Dv NOTE_LINK
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index de57452..699ff7d 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -4375,6 +4375,7 @@ vop_rename_post(void *ap, int rc)
VFS_KNOTE_UNLOCKED(a->a_fdvp, hint);
VFS_KNOTE_UNLOCKED(a->a_tdvp, hint);
} else {
+ hint |= NOTE_EXTEND;
if (a->a_fvp->v_type == VDIR)
hint |= NOTE_LINK;
VFS_KNOTE_UNLOCKED(a->a_fdvp, hint);
OpenPOWER on IntegriCloud