From: Zou Pengcheng <pczou@redflag-linux.com>
To: linux-kernel@vger.kernel.org
Subject: writev/readv dnotify confusion
Date: Fri, 29 Nov 2002 14:58:12 +0800 [thread overview]
Message-ID: <200211291458.12893.pczou@redflag-linux.com> (raw)
hi,
not sure if dnotify is handled by writev/readv correctly,
below are some code of do_readv_writev() in linux/fs/read_write.c:
out_nofree:
/* VERIFY_WRITE actually means a read, as we write to user space */
if ((ret + (type == VERIFY_WRITE)) > 0)
dnotify_parent(file->f_dentry,
(type == VERIFY_WRITE) ? DN_MODIFY : DN_ACCESS);
return ret;
}
based on this code, it seems writev() sets DN_ACCESS while readv() sets
DN_MODIFY.
i have also verified this by writing a testing program, in my testing program,
if just do fcntl(fd, F_NOTIFY, DN_MODIFY), on signal is raised after a
writev(), if i do fcntl(fd, F_NOTIFY, DN_ACCESS), then get the signal.
so wonder maybe the code above should be modified as something like:
out_nofree:
/* VERIFY_WRITE actually means a read, as we write to user space */
if ((ret + (type == VERIFY_WRITE)) > 0)
dnotify_parent(file->f_dentry,
(type == VERIFY_WRITE) ? DN_ACCESS : DN_MODIFY);
return ret;
}
cheers,
reply other threads:[~2002-11-29 6:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200211291458.12893.pczou@redflag-linux.com \
--to=pczou@redflag-linux.com \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.