Patch "f2fs: fix iostat parameter for discard" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    f2fs: fix iostat parameter for discard

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     f2fs-fix-iostat-parameter-for-discard.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 11b4812a88c8b6c33448cf6f8b93089a1366fb18
Author: Yangtao Li <frank.li@xxxxxxxx>
Date:   Mon Dec 5 22:56:03 2022 +0800

    f2fs: fix iostat parameter for discard
    
    [ Upstream commit 15e38ee44d50cad264da80ef75626b9224ddc4a3 ]
    
    Just like other data we count uses the number of bytes as the basic unit,
    but discard uses the number of cmds as the statistical unit. In fact the
    discard command contains the number of blocks, so let's change to the
    number of bytes as the base unit.
    
    Fixes: b0af6d491a6b ("f2fs: add app/fs io stat")
    Signed-off-by: Yangtao Li <frank.li@xxxxxxxx>
    Signed-off-by: Jaegeuk Kim <jaegeuk@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 27690f757913..2afed479160b 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -1171,7 +1171,7 @@ static int __submit_discard_cmd(struct f2fs_sb_info *sbi,
 
 		atomic_inc(&dcc->issued_discard);
 
-		f2fs_update_iostat(sbi, FS_DISCARD, 1);
+		f2fs_update_iostat(sbi, FS_DISCARD, len * F2FS_BLKSIZE);
 
 		lstart += len;
 		start += len;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux