linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* nfs no inotify IN_DELETE  event
@ 2011-11-29 21:13 Maxim Uvarov
  0 siblings, 0 replies; only message in thread
From: Maxim Uvarov @ 2011-11-29 21:13 UTC (permalink / raw)
  To: linux-nfs; +Cc: linux-kernel, rlove, eparis, john, viro, linux-fsdevel

Hello,

I'm looking on inotify02 test future in mainline kernel on nfs:

inotify_init()                          = 3
inotify_add_watch(3, ".", IN_ALL_EVENTS)
creat("test_file1", 0755)               = 5
rename("test_file1", "test_file2")      = 0
getcwd("/mnt/nfs2/tmp", 256)            = 14
rename("/mnt/nfs2/tmp", "/mnt/nfs2/tmp.rename1") = 0
unlink("test_file2")                    = 0

After unlink() if file sytem is not nfs there is event:
IN_DELETE               0x00000200      /* Subfile was deleted */
for file test_file2. If file system is nfs there is no such event.

For the first time I thought that this is nfs sever bug related to nfs 
"silly renamed files" feature. But logically - file test_file2 was not 
deleted. It was removed with his directory from event watch directory to
non event watch directory.

1. is it ok that unlink() in that test returns 0, not -1 ENOENT?

2. should we get IN_DELETE for all files and sub folders for event watch 
directory? Or there should be only one event that directory was removed?

To reproduce:
http://ltp.sourceforge.net/
make
cd testcases/kernel/syscalls/inotify
export TMPDIR=/mnt/nfs/tmp/
export TDIRECTORY=/mnt/nfs/tmp/
./inotify02

Best regards,
Maxim Uvarov.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-29 21:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-29 21:13 nfs no inotify IN_DELETE event Maxim Uvarov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).