All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] zonefs: Fix error message in zonefs_file_dio_append()
@ 2023-03-20 13:55 Damien Le Moal
  2023-03-20 14:02 ` Christoph Hellwig
  2023-03-20 14:09 ` Johannes Thumshirn
  0 siblings, 2 replies; 3+ messages in thread
From: Damien Le Moal @ 2023-03-20 13:55 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Johannes Thumshirn

Since the expected write location in a sequential file is always at the
end of the file (append write), when an invalid write append location is
detected in zonefs_file_dio_append(), print the invalid written location
instead of the expected write location.

Fixes: a608da3bd730 ("zonefs: Detect append writes at invalid locations")
Cc: stable@vger.kernel.org
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
 fs/zonefs/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/zonefs/file.c b/fs/zonefs/file.c
index a545a6d9a32e..617e4f9db42e 100644
--- a/fs/zonefs/file.c
+++ b/fs/zonefs/file.c
@@ -426,7 +426,7 @@ static ssize_t zonefs_file_dio_append(struct kiocb *iocb, struct iov_iter *from)
 		if (bio->bi_iter.bi_sector != wpsector) {
 			zonefs_warn(inode->i_sb,
 				"Corrupted write pointer %llu for zone at %llu\n",
-				wpsector, z->z_sector);
+				bio->bi_iter.bi_sector, z->z_sector);
 			ret = -EIO;
 		}
 	}
-- 
2.39.2


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

* Re: [PATCH] zonefs: Fix error message in zonefs_file_dio_append()
  2023-03-20 13:55 [PATCH] zonefs: Fix error message in zonefs_file_dio_append() Damien Le Moal
@ 2023-03-20 14:02 ` Christoph Hellwig
  2023-03-20 14:09 ` Johannes Thumshirn
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2023-03-20 14:02 UTC (permalink / raw)
  To: Damien Le Moal; +Cc: linux-fsdevel, Johannes Thumshirn

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

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

* Re: [PATCH] zonefs: Fix error message in zonefs_file_dio_append()
  2023-03-20 13:55 [PATCH] zonefs: Fix error message in zonefs_file_dio_append() Damien Le Moal
  2023-03-20 14:02 ` Christoph Hellwig
@ 2023-03-20 14:09 ` Johannes Thumshirn
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2023-03-20 14:09 UTC (permalink / raw)
  To: Damien Le Moal, linux-fsdevel

Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

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

end of thread, other threads:[~2023-03-20 14:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-20 13:55 [PATCH] zonefs: Fix error message in zonefs_file_dio_append() Damien Le Moal
2023-03-20 14:02 ` Christoph Hellwig
2023-03-20 14:09 ` Johannes Thumshirn

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.