[PATCH 1/6] block: add support for REQ_OP_VERIFY
Chaitanya Kulkarni
chaitanyak at nvidia.com
Tue Jul 5 18:32:01 PDT 2022
>>>> +int __blkdev_issue_verify(struct block_device *bdev, sector_t sector,
>>>> + sector_t nr_sects, gfp_t gfp_mask, struct bio **biop)
>>>> +{
>>>> + unsigned int max_verify_sectors = bdev_verify_sectors(bdev);
>>>> + sector_t min_io_sect = (BIO_MAX_VECS << PAGE_SHIFT) >> 9;
>>>> + struct bio *bio = *biop;
>>>> + sector_t curr_sects;
>>>> + char *buf;
>>>> +
>>>> + if (!max_verify_sectors) {
>>>> + int ret = 0;
>>>> +
>>>> + buf = kzalloc(min_io_sect << 9, GFP_KERNEL);
>>>
>>> k*z*alloc? I don't think you need to zero a buffer that we're reading
>>> into, right?
>>>
>>> --D
>>
>> we don't need to but I guess it is just a habit to make sure alloced
>> buffer is zeored, should I remove it for any particular reason ?
>
> What's the point in wasting CPU time zeroing a buffer if you're just
> going to DMA into it?
>
> --D
>
true, will remove it ...
>> -ck
>>
>>
More information about the Linux-nvme
mailing list