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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 20, 2023 at 06:03:32PM +0800, Hongyu Jin wrote:
> +static inline struct dm_verity_io *verity_io(struct dm_verity *v, struct dm_verity_fec_io *fio)
> +{
> +	return (struct dm_verity_io *)
> +		((char *)fio + sizeof(struct dm_verity_fec_io) - v->ti->per_io_data_size);
> +}
[...]
> @@ -129,8 +136,10 @@ static int fec_decode_bufs(struct dm_verity *v, struct dm_verity_fec_io *fio,
>  	struct dm_buffer *buf;
>  	unsigned int n, i, offset;
>  	u8 *par, *block;
> +	struct dm_verity_io *io = verity_io(v, fio);
> +	struct bio *bio = dm_bio_from_per_bio_data(io, v->ti->per_io_data_size);

How about passing 'io' as an argument to fec_decode_bufs() instead of adding the
verity_io() helper function?

- Eric




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux