[PATCH 0/2] ext4: fast commit crash consistency issues

Xin Yin posted 2 patches 4 years, 6 months ago
fs/ext4/fast_commit.c | 13 ++++++++-----
fs/ext4/inode.c       |  3 +--
2 files changed, 9 insertions(+), 7 deletions(-)
[PATCH 0/2] ext4: fast commit crash consistency issues
Posted by Xin Yin 4 years, 6 months ago
This patch sets fix 2 crash-consistency issues of fast commit.
First patch change to use ext4_ext_remove_space instead of 
ext4_punch_hole during replay delete range procedure. This 
avoid replay procedure being affeced by incorrect inode->i_size. 
Second patch correct the trank range logic for ftruncte.

After testing this patch sets with xfstests-bld, in the "log" and 
"quick" group with config "fast_commit" is selected. No regressions
was found.

Signed-off-by: Xin Yin <yinxin.x@bytedance.com>

Xin Yin (2):
  ext4: use ext4_ext_remove_space() for fast commit replay delete range
  ext4: fast commit may miss tracking unwritten range during ftruncate

 fs/ext4/fast_commit.c | 13 ++++++++-----
 fs/ext4/inode.c       |  3 +--
 2 files changed, 9 insertions(+), 7 deletions(-)

-- 
2.20.1

Re: [PATCH 0/2] ext4: fast commit crash consistency issues
Posted by harshad shirwadkar 4 years, 6 months ago
Thanks for the patches, these are good finds.

Reviewed-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com>

On Wed, Dec 22, 2021 at 7:24 PM Xin Yin <yinxin.x@bytedance.com> wrote:
>
> This patch sets fix 2 crash-consistency issues of fast commit.
> First patch change to use ext4_ext_remove_space instead of
> ext4_punch_hole during replay delete range procedure. This
> avoid replay procedure being affeced by incorrect inode->i_size.
> Second patch correct the trank range logic for ftruncte.
>
> After testing this patch sets with xfstests-bld, in the "log" and
> "quick" group with config "fast_commit" is selected. No regressions
> was found.
>
> Signed-off-by: Xin Yin <yinxin.x@bytedance.com>
>
> Xin Yin (2):
>   ext4: use ext4_ext_remove_space() for fast commit replay delete range
>   ext4: fast commit may miss tracking unwritten range during ftruncate
>
>  fs/ext4/fast_commit.c | 13 ++++++++-----
>  fs/ext4/inode.c       |  3 +--
>  2 files changed, 9 insertions(+), 7 deletions(-)
>
> --
> 2.20.1
>
Re: [PATCH 0/2] ext4: fast commit crash consistency issues
Posted by Theodore Ts'o 4 years, 6 months ago
On Thu, 23 Dec 2021 11:23:35 +0800, Xin Yin wrote:
> This patch sets fix 2 crash-consistency issues of fast commit.
> First patch change to use ext4_ext_remove_space instead of
> ext4_punch_hole during replay delete range procedure. This
> avoid replay procedure being affeced by incorrect inode->i_size.
> Second patch correct the trank range logic for ftruncte.
> 
> After testing this patch sets with xfstests-bld, in the "log" and
> "quick" group with config "fast_commit" is selected. No regressions
> was found.
> 
> [...]

Applied, thanks!

[1/2] ext4: use ext4_ext_remove_space() for fast commit replay delete range
      commit: 20a262d66487b27133c3f8b7ac0245c2fabaa526
[2/2] ext4: fast commit may miss tracking unwritten range during ftruncate
      commit: 949197083545cbff930650f893135d30fd043d4d

Best regards,
-- 
Theodore Ts'o <tytso@mit.edu>