Re: [PATCH 1/6] block: add support for REQ_OP_VERIFY

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

 



>>>> +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
>>
>>




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux