lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 19 Feb 2018 08:00:34 -0800
From:   Matthew Wilcox <willy@...radead.org>
To:     Nikolay Borisov <nborisov@...e.com>
Cc:     viro@...iv.linux.org.uk, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org, axboe@...com
Subject: Re: [PATCH] fs: Improve comment of inode_dio_begin

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).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ