From: Matthew Wilcox <willy@infradead.org>
To: Nikolay Borisov <nborisov@suse.com>
Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, axboe@fb.com
Subject: Re: [PATCH] fs: Improve comment of inode_dio_begin
Date: Mon, 19 Feb 2018 08:00:34 -0800 [thread overview]
Message-ID: <20180219160034.GC24352@bombadil.infradead.org> (raw)
In-Reply-To: <1519053629-14114-1-git-send-email-nborisov@suse.com>
On Mon, Feb 19, 2018 at 05:20:29PM +0200, Nikolay Borisov wrote:
> +++ b/include/linux/fs.h
> @@ -3015,8 +3015,10 @@ void inode_dio_wait(struct inode *inode);
> * inode_dio_begin - signal start of a direct I/O requests
> * @inode: inode the direct I/O happens on
> *
> - * This is called once we've finished processing a direct I/O request,
> - * and is used to wake up callers waiting for direct I/O to be quiesced.
> + * This is called before we begin processing a direct I/O request,
> + * and is used to quiesce callers of inode_dio_wait. It must be
> + * called under a lock that serialising getting a reference to
> + * ->i_dio_count (usually the inode_lock)
> */
> static inline void inode_dio_begin(struct inode *inode)
> {
Thanks for the patch! It'd be nice if it used the kernel-doc annotations
for Context: to document the locking requirements. Also, I find the
wording a little confusing. How does the following look?
* Mark the inode as having direct I/O in progress. This causes callers
* of inode_dio_wait() to block until the I/O has completed.
*
* Context: Process context. Caller should hold a lock that callers of
* inode_dio_wait() also hold (usually inode_lock, but this depends on
* the filesystem).
prev parent reply other threads:[~2018-02-19 16:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-19 15:20 [PATCH] fs: Improve comment of inode_dio_begin Nikolay Borisov
2018-02-19 16:00 ` Matthew Wilcox [this message]
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=20180219160034.GC24352@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=axboe@fb.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nborisov@suse.com \
--cc=viro@zeniv.linux.org.uk \
/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).