]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
fs: return if direct I/O will trigger writeback
authorGoldwyn Rodrigues <rgoldwyn@suse.com>
Tue, 20 Jun 2017 12:05:44 +0000 (07:05 -0500)
committerJens Axboe <axboe@kernel.dk>
Tue, 20 Jun 2017 13:12:03 +0000 (07:12 -0600)
commit6be96d3ad34a124450028dabba43f07fe1d0c86d
treea5f6ef95a01e38caa3dc1e50071d5baa78426a3f
parentb745fafaf70c0a98a2e1e7ac8cb14542889ceb0e
fs: return if direct I/O will trigger writeback

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

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.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
mm/filemap.c