All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iomap: return partial I/O count on error in direct I/O
@ 2020-02-13 19:25 Goldwyn Rodrigues
  2020-02-17 13:17 ` Christoph Hellwig
  0 siblings, 1 reply; 5+ messages in thread
From: Goldwyn Rodrigues @ 2020-02-13 19:25 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: hch, darrick.wong, Goldwyn Rodrigues

From: Goldwyn Rodrigues <rgoldwyn@suse.com>

In case of a block device error, iomap code returns 0 as opposed to
the amount of submitted I/O, which may have completed before the
error occurred. Return the count of submitted I/O for correct
accounting.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
---
 fs/iomap/direct-io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
index 23837926c0c5..a980b7b7660f 100644
--- a/fs/iomap/direct-io.c
+++ b/fs/iomap/direct-io.c
@@ -260,7 +260,7 @@ iomap_dio_bio_actor(struct inode *inode, loff_t pos, loff_t length,
 		size_t n;
 		if (dio->error) {
 			iov_iter_revert(dio->submit.iter, copied);
-			copied = ret = 0;
+			ret = 0;
 			goto out;
 		}
 
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-02-19 20:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 19:25 [PATCH] iomap: return partial I/O count on error in direct I/O Goldwyn Rodrigues
2020-02-17 13:17 ` Christoph Hellwig
2020-02-17 13:44   ` Goldwyn Rodrigues
2020-02-17 14:02     ` Christoph Hellwig
2020-02-19 20:31       ` Goldwyn Rodrigues

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.