[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <174226639137.1025346.3745775280459676334.b4-ty@mit.edu>
Date: Mon, 17 Mar 2025 23:41:31 -0400
From: "Theodore Ts'o" <tytso@....edu>
To: linux-ext4@...r.kernel.org, Zhang Yi <yi.zhang@...weicloud.com>
Cc: "Theodore Ts'o" <tytso@....edu>, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, adilger.kernel@...ger.ca, jack@...e.cz,
leah.rumancik@...il.com, yi.zhang@...wei.com, libaokun1@...wei.com,
chengzhihao1@...wei.com, yukuai3@...wei.com, yangerkun@...wei.com
Subject: Re: [PATCH] jbd2: fix off-by-one while erasing journal
On Mon, 17 Feb 2025 14:59:55 +0800, Zhang Yi wrote:
> In __jbd2_journal_erase(), the block_stop parameter includes the last
> block of a contiguous region; however, the calculation of byte_stop is
> incorrect, as it does not account for the bytes in that last block.
> Consequently, the page cache is not cleared properly, which occasionally
> causes the ext4/050 test to fail.
>
> Since block_stop operates on inclusion semantics, it involves repeated
> increments and decrements by 1, significantly increasing the complexity
> of the calculations. Optimize the calculation and fix the incorrect
> byte_stop by make both block_stop and byte_stop to use exclusion
> semantics.
>
> [...]
Applied, thanks!
[1/1] jbd2: fix off-by-one while erasing journal
commit: f0b48ab02c624d12643c4dbe62ec4c78789592de
Best regards,
--
Theodore Ts'o <tytso@....edu>
Powered by blists - more mailing lists