]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: don't fallback to buffered IO for NOWAIT direct IO writes
authorFilipe Manana <fdmanana@suse.com>
Mon, 4 Jul 2022 11:42:04 +0000 (12:42 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Jul 2022 15:45:40 +0000 (17:45 +0200)
commit292564a04c77f3c80ab8a5097afb90e8a0c4a594
tree75ee947458c6cb247605b2b9e3561812f6cf28e0
parent12c4d0bdea0b335021daab647940ddb501952cad
btrfs: don't fallback to buffered IO for NOWAIT direct IO writes

Currently, for a direct IO write, if we need to fallback to buffered IO,
either to satisfy the whole write operation or just a part of it, we do
it in the current context even if it's a NOWAIT context. This is not ideal
because we currently don't have support for NOWAIT semantics in the
buffered IO path (we can block for several reasons), so we should instead
return -EAGAIN to the caller, so that it knows it should retry (the whole
operation or what's left of it) in a context where blocking is acceptable.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/file.c