Re: [PATCH v5 RESEND 4/5] dm verity: Fix I/O priority lost when read FEC and hash

From: Hongyu Jin
Date: Tue Dec 19 2023 - 20:15:27 EST


Eric Biggers <ebiggers@xxxxxxxxxx> 于2023年12月20日周三 06:48写道:
>
> On Mon, Dec 18, 2023 at 09:27:45AM +0800, Hongyu Jin wrote:
> > From: Hongyu Jin <hongyu.jin@xxxxxxxxxx>
> >
> > To fix this problem, when read FEC and hash from disk, I/O priority are
> > inconsistent with data block and blocked by other I/O with low I/O
> > priority.
> >
> > Make I/O for FEC and hash has same I/O priority with original data I/O.
>
> "To fix this problem" is supposed to be in the second paragraph, not the first,
> right?
Yes, The verification and error correction process takes effect after
obtaining the data.
>
> > @@ -728,6 +730,7 @@ static void verity_submit_prefetch(struct dm_verity *v, struct dm_verity_io *io)
> > sector_t block = io->block;
> > unsigned int n_blocks = io->n_blocks;
> > struct dm_verity_prefetch_work *pw;
> > + struct bio *bio = dm_bio_from_per_bio_data(io, v->ti->per_io_data_size);
> >
> > if (v->validated_blocks) {
> > while (n_blocks && test_bit(block, v->validated_blocks)) {
>
> The caller has the bio pointer already, so maybe just add it as a parameter to
> verity_submit_prefetch()?
>
> - Eric
ok, I will change it.