All of lore.kernel.org
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH] f2fs: fix using wrong 'submitted' value in f2fs_write_cache_pages
@ 2024-12-24 11:46 zangyangyang1 via Linux-f2fs-devel
  2024-12-26 13:27 ` Chao Yu via Linux-f2fs-devel
  0 siblings, 1 reply; 3+ messages in thread
From: zangyangyang1 via Linux-f2fs-devel @ 2024-12-24 11:46 UTC (permalink / raw)
  To: chao; +Cc: jaegeuk, zangyangyang1, linux-f2fs-devel

[-- Attachment #1: Type: text/plain, Size: 1587 bytes --]

When f2fs_write_single_data_page fails, f2fs_write_cache_pages
will use the last 'submitted' value incorrectly, which will cause
'nwritten' and 'wbc->nr_to_write' calculation errors

Signed-off-by: zangyangyang1 <zangyangyang1@xiaomi.com>
---
 fs/f2fs/data.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 94f7b084f601..083acd7f5420 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -3179,6 +3179,7 @@ static int f2fs_write_cache_pages(struct address_space *mapping,
                                continue;
                        }
 #endif
+                       submitted = 0;
                        ret = f2fs_write_single_data_page(folio,
                                        &submitted, &bio, &last_block,
                                        wbc, io_type, 0, true);
--
2.43.2

#/******±¾Óʼþ¼°Æä¸½¼þº¬ÓÐСÃ×¹«Ë¾µÄ±£ÃÜÐÅÏ¢£¬½öÏÞÓÚ·¢Ë͸øÉÏÃæµØÖ·ÖÐÁгöµÄ¸öÈË»òȺ×é¡£½ûÖ¹ÈÎºÎÆäËûÈËÒÔÈκÎÐÎʽʹÓ㨰üÀ¨µ«²»ÏÞÓÚÈ«²¿»ò²¿·ÖµØÐ¹Â¶¡¢¸´ÖÆ¡¢»òÉ¢·¢£©±¾ÓʼþÖеÄÐÅÏ¢¡£Èç¹ûÄú´íÊÕÁ˱¾Óʼþ£¬ÇëÄúÁ¢¼´µç»°»òÓʼþ֪ͨ·¢¼þÈ˲¢É¾³ý±¾Óʼþ£¡ This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#


[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



[-- Attachment #3: Type: text/plain, Size: 179 bytes --]

_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

end of thread, other threads:[~2024-12-27  2:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-24 11:46 [f2fs-dev] [PATCH] f2fs: fix using wrong 'submitted' value in f2fs_write_cache_pages zangyangyang1 via Linux-f2fs-devel
2024-12-26 13:27 ` Chao Yu via Linux-f2fs-devel
2024-12-27  2:56   ` 臧阳阳

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.