From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexey Zaytsev Subject: Re: A possible fsnotify bug. Date: Mon, 15 Nov 2010 02:15:55 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Eric Paris , "J. Bruce Fields" , Neil Brown , linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Robert Love To: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Return-path: In-Reply-To: Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org Confirmed, the user is getting duplicate notifications. Looks like this has been working this way since the original inotify patch. Is this the intended behavior? On Sun, Nov 14, 2010 at 08:14, Alexey Zaytsev wrote: > Hi. > > Have not tested, but this code in fs/nfsd/vfs.c looks suspicious: > http://git.kernel.org/?p=3Dlinux/kernel/git/torvalds/linux-2.6.git;a=3D= blob;f=3Dfs/nfsd/vfs.c;h=3D184938fcff04d5dff712b8bee01f5d7e41bb20ad;hb=3D= HEAD#l1032 > > 1032 =C2=A0 =C2=A0 =C2=A0 =C2=A0 host_err =3D vfs_writev(file, (struc= t iovec __user *)vec, > vlen, &offset); > 1033 =C2=A0 =C2=A0 =C2=A0 =C2=A0 set_fs(oldfs); > 1034 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (host_err < 0) > 1035 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 goto out= _nfserr; > 1036 =C2=A0 =C2=A0 =C2=A0 =C2=A0 *cnt =3D host_err; > 1037 =C2=A0 =C2=A0 =C2=A0 =C2=A0 nfsdstats.io_write +=3D host_err; > 1038 =C2=A0 =C2=A0 =C2=A0 =C2=A0 fsnotify_modify(file); > > fsnotify_modify() is called from vfs_writev() -> do_readv_writev(), > and the users are probably getting duplicate events, right? > -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html