RE: Re: [PATCH] ext4: Remove expensive flush on fast commit

From: Daejun Park
Date: Thu Jan 07 2021 - 21:38:11 EST


> > In the fast commit, it adds REQ_FUA and REQ_PREFLUSH on each fast commit
> > block when barrier is enabled. However, in recovery phase, ext4 compares
> > CRC value in the tail. So it is sufficient adds REQ_FUA and REQ_PREFLUSH
> > on the block that has tail.
>
> Does the tail block *always* contain a CRC, or is that dependent on
> EXT4_FEATURE_RO_COMPAT_METADATA_CSUM, JBD2_FEATURE_INCOMPAT_CSUM_V2,
> or JBD2_FEATURE_INCOMPAT_CSUM_V3 being enabled?

In the fast commit, the tail block always contain a CRC.

> If one of those features is *required* before the FAST_COMMIT feature
> can be used, then this patch looks OK. Otherwise, the CSUM feature
> should be checked before the FUA is skipped for non-tail blocks.

So, I think it is OK without checking other CSUM feature.

Thanks,
Daejun