Re: [PATCH 3/4] xfs: introduce vectored scrub mode

Christoph Hellwig
2024-04-16T05:33:42Z

On Mon, Apr 15, 2024 at 06:42:12PM -0700, Darrick J. Wong wrote:
> A new pseudo scrub type BARRIER is introduced to force the kernel to
> return to userspace if any corruptions have been found when scrubbing
> the previous scrub types in the array. This enables userspace to
> schedule, for example, the sequence:
>
> 1. data fork
> 2. barrier
> 3. directory
>
> If the data fork scrub is clean, then the kernel will perform the
> directory scrub. If not, the barrier in 2 will exit back to userspace.
>
> When running fstests in "rebuild all metadata after each test" mode, I
> observed a 10% reduction in runtime due to fewer transitions across the
> system call boundary.

Can you record your explanation on why we don't encode the order in
the kernel code here?