Re: [PATCH 05/10] block, nvme: modify rq_integrity_vec function

Kanchan Joshi
2024-04-29T11:34:39Z

On 4/27/2024 12:48 PM, Christoph Hellwig wrote:
> The subjet is about as useless as it gets :)
>
> The essence is that it should take the iter into account, so name that.

Sure.

>> --- a/include/linux/blk-integrity.h
>> +++ b/include/linux/blk-integrity.h
>> @@ -109,11 +109,12 @@ static inline bool blk_integrity_rq(struct request *rq)
>> * Return the first bvec that contains integrity data. Only drivers that are
>> * limited to a single integrity segment should use this helper.
>> */
>
> The comment really needs an update. With this rq_integrity_vec now
> is a "normal" iter based operation, that can actually be used by
> drivers with multiple integrity segments if it is properly advanced.

Right, will update.

>> +static inline struct bio_vec rq_integrity_vec(struct request *rq)
>> {
>> - return NULL;
>> + return (struct bio_vec){0};
>
> No need for the 0 here.
Um, I did not follow. Need that to keep the compiler happy.
Do you suggest to change the prototype.