Thread (21 messages) 21 messages, 6 authors, 2017-03-24

Re: [PATCH 3/8] nowait aio: return if direct write will trigger writeback

From: Matthew Wilcox <willy@infradead.org>
Date: 2017-03-16 13:20:54
Also in: linux-api, linux-btrfs, linux-ext4, linux-fsdevel, linux-xfs

On Wed, Mar 15, 2017 at 04:51:02PM -0500, Goldwyn Rodrigues wrote:
From: Goldwyn Rodrigues <redacted>

Find out if the write will trigger a wait due to writeback. If yes,
return -EAGAIN.

This introduces a new function filemap_range_has_page() which
returns true if the file's mapping has a page within the range
mentioned.

Return -EINVAL for buffered AIO: there are multiple causes of
delay such as page locks, dirty throttling logic, page loading
from disk etc. which cannot be taken care of.
Also, this patch only touches the write path; we have a similar call to
write_and_wait_range() in generic_file_read_iter().

Actually, why do we even have that?  Why can't we satisfy an O_DIRECT
read from the cache?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help