From: Al Viro <viro@ZenIV.linux.org.uk>
To: Goldwyn Rodrigues <rgoldwyn@suse.de>
Cc: linux-fsdevel@vger.kernel.org, jack@suse.com, hch@infradead.org,
linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org,
linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org,
axboe@kernel.dk, linux-api@vger.kernel.org,
adam.manzanares@wdc.com, Goldwyn Rodrigues <rgoldwyn@suse.com>
Subject: Re: [PATCH 04/10] fs: Introduce RWF_NOWAIT
Date: Sat, 10 Jun 2017 06:27:03 +0100 [thread overview]
Message-ID: <20170610052703.GC6365@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20170606111939.27272-5-rgoldwyn@suse.de>
On Tue, Jun 06, 2017 at 06:19:33AM -0500, Goldwyn Rodrigues wrote:
> From: Goldwyn Rodrigues <rgoldwyn@suse.com>
>
> RWF_NOWAIT informs kernel to bail out if an AIO request will block
> for reasons such as file allocations, or a writeback triggered,
> or would block while allocating requests while performing
> direct I/O.
>
> RWF_NOWAIT is translated to IOCB_NOWAIT for iocb->ki_flags.
>
> The check for -EOPNOTSUPP is placed in generic_file_write_iter(). This
> is called by most filesystems, either through fsops.write_iter() or through
> the function defined by write_iter(). If not, we perform the check defined
> by .write_iter() which is called for direct IO specifically.
>
> Filesystems xfs, btrfs and ext4 would be supported in the following patches.
Umm... What about ->write_iter() instances outside of fs/*? Even in fs/*,
consider e.g.
int cifs_get_writer(struct cifsInodeInfo *cinode)
{
int rc;
start:
rc = wait_on_bit(&cinode->flags, CIFS_INODE_PENDING_OPLOCK_BREAK,
TASK_KILLABLE);
and cifs_file_write_iter() calling it before going to generic_file_write_iter().
Ditto for cifs_struct_writev()... coda_file_write_iter() does inode_lock()
before calling vfs_iter_write(). ext2_dax_write_iter(): inode_lock().
f2fs_file_write_iter(): ditto. fuse_file_write_iter(): ditto in case when
->writeback_cache is false. gfs2 is O_APPEND case: almost certainly blocks.
ncp_file_write_iter(): blocks (mutex_lock(&NCP_FINFO(inode)->open_mutex)
in ncp_make_open(), not to mention anything else). ntfs_file_write_iter():
inode_lock(). orangefs_file_write_iter(): ditto. ubifs_write_iter():
may block in update_mctime(). udf_file_write_iter(): inode_lock().
Lustre sure as hell does block before it gets anywhere near mm/filemap.c.
And that - just from looking at regular files. Then we have sockets and
pipes, not to mention weird stuff like fs/fuse/cuse.c, etc.
next prev parent reply other threads:[~2017-06-10 5:27 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-06 11:19 [PATCH 0/10 v11] No wait AIO Goldwyn Rodrigues
2017-06-06 11:19 ` [PATCH 01/10] fs: Separate out kiocb flags setup based on RWF_* flags Goldwyn Rodrigues
2017-06-06 11:19 ` [PATCH 02/10] fs: Introduce filemap_range_has_page() Goldwyn Rodrigues
2017-06-06 11:19 ` [PATCH 03/10] fs: Use RWF_* flags for AIO operations Goldwyn Rodrigues
2017-06-06 11:19 ` [PATCH 04/10] fs: Introduce RWF_NOWAIT Goldwyn Rodrigues
2017-06-10 5:27 ` Al Viro [this message]
2017-06-06 11:19 ` [PATCH 05/10] fs: return if direct write will trigger writeback Goldwyn Rodrigues
2017-06-06 11:19 ` [PATCH 06/10] fs: Introduce IOMAP_NOWAIT Goldwyn Rodrigues
2017-06-06 11:19 ` [PATCH 07/10] block: return on congested block device Goldwyn Rodrigues
2017-06-06 11:19 ` [PATCH 08/10] ext4: nowait aio support Goldwyn Rodrigues
2017-06-06 11:19 ` [PATCH 09/10] xfs: " Goldwyn Rodrigues
2017-06-06 11:19 ` [PATCH 10/10] btrfs: " Goldwyn Rodrigues
2017-06-08 7:39 ` [PATCH 0/10 v11] No wait AIO Christoph Hellwig
2017-06-10 5:34 ` Al Viro
2017-06-12 22:38 ` Goldwyn Rodrigues
2017-06-13 6:14 ` Christoph Hellwig
2017-06-15 11:11 ` Al Viro
2017-06-15 14:55 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2017-06-05 5:35 [PATCH 0/10 v10] " Goldwyn Rodrigues
2017-06-05 5:35 ` [PATCH 04/10] fs: Introduce RWF_NOWAIT Goldwyn Rodrigues
2017-05-24 16:41 [PATCH 0/10 v9] No wait AIO Goldwyn Rodrigues
2017-05-24 16:41 ` [PATCH 04/10] fs: Introduce RWF_NOWAIT Goldwyn Rodrigues
2017-05-25 8:30 ` Jan Kara
2017-05-11 19:17 [PATCH 0/10 v8] No wait AIO Goldwyn Rodrigues
2017-05-11 19:17 ` [PATCH 04/10] fs: Introduce RWF_NOWAIT Goldwyn Rodrigues
2017-05-15 9:47 ` Jan Kara
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=20170610052703.GC6365@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=adam.manzanares@wdc.com \
--cc=axboe@kernel.dk \
--cc=hch@infradead.org \
--cc=jack@suse.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=rgoldwyn@suse.com \
--cc=rgoldwyn@suse.de \
/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).