linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Zaytsev <alexey.zaytsev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Eric Paris <eparis-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"J. Bruce Fields"
	<bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>,
	Neil Brown <neilb-l3A5Bk7waGM@public.gmane.org>,
	linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Robert Love
	<robert.w.love-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: A possible fsnotify bug.
Date: Mon, 15 Nov 2010 02:15:55 +0300	[thread overview]
Message-ID: <AANLkTimB3=cVRLJD7PmiOvBgYvjHh2dn1iZB+Rnehafp@mail.gmail.com> (raw)
In-Reply-To: <AANLkTik_MigWuCfJyj282GZOyEDURtJt9pgSKP7d=77_-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.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 <alexey.zaytsev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi.
>
> Have not tested, but this code in fs/nfsd/vfs.c looks suspicious:
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=fs/nfsd/vfs.c;h=184938fcff04d5dff712b8bee01f5d7e41bb20ad;hb=HEAD#l1032
>
> 1032         host_err = vfs_writev(file, (struct iovec __user *)vec,
> vlen, &offset);
> 1033         set_fs(oldfs);
> 1034         if (host_err < 0)
> 1035                 goto out_nfserr;
> 1036         *cnt = host_err;
> 1037         nfsdstats.io_write += host_err;
> 1038         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

  parent reply	other threads:[~2010-11-14 23:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-14  5:14 A possible fsnotify bug Alexey Zaytsev
     [not found] ` <AANLkTik_MigWuCfJyj282GZOyEDURtJt9pgSKP7d=77_-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-11-14 23:15   ` Alexey Zaytsev [this message]
2010-11-15 17:24     ` J. Bruce Fields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTimB3=cVRLJD7PmiOvBgYvjHh2dn1iZB+Rnehafp@mail.gmail.com' \
    --to=alexey.zaytsev-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org \
    --cc=eparis-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=neilb-l3A5Bk7waGM@public.gmane.org \
    --cc=robert.w.love-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).