lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1666680982-372975-1-git-send-email-zhangdongdong1@oppo.com>
Date:   Tue, 25 Oct 2022 14:56:22 +0800
From:   zhangdongdong <zhangdongdong1@...o.com>
To:     jaegeuk@...nel.org, chao@...nel.org
Cc:     linux-f2fs-devel@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org,
        zhangdongdong <zhangdongdong1@...o.com>
Subject: [PATCH] f2fs: fix normal discard process

in the DPOLICY_BG mode,
i + 1 < dpolicy->granularity and i < DEFAULT_DISCARD_GRANULARITY conflict.
if i = 15,The first condition is not met, it will directly enter the
second condition and dispatch all small granularity discards.
The restrictive effect of the first condition will be invalidated.

Fixes: <20ee438232> ("f2fs: issue small discard by LBA order")
Signed-off-by: zhangdongdong <zhangdongdong1@...o.com>
---
 fs/f2fs/segment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index acf3d3f..2fcb140 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -1448,7 +1448,7 @@ static int __issue_discard_cmd(struct f2fs_sb_info *sbi,
                if (i + 1 < dpolicy->granularity)
                        break;

-               if (i < DEFAULT_DISCARD_GRANULARITY && dpolicy->ordered)
+               if (i + 1 < DEFAULT_DISCARD_GRANULARITY && dpolicy->ordered)
                        return __issue_discard_cmd_orderly(sbi, dpolicy);

                pend_list = &dcc->pend_list[i];
--
2.7.4

________________________________
OPPO

本电子邮件及其附件含有OPPO公司的保密信息,仅限于邮件指明的收件人使用(包含个人及群组)。禁止任何人在未经授权的情况下以任何形式使用。如果您错收了本邮件,请立即以电子邮件通知发件人并删除本邮件及其附件。

This e-mail and its attachments contain confidential information from OPPO, 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!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ