Re: [PATCH 5/5] null_blk: Zero-initialize read buffers in non-memory-backed mode

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

 



On 2020-05-17 18:12, Damien Le Moal wrote:
> On 2020/05/16 9:19, Bart Van Assche wrote:
>> +static void nullb_zero_rq_data_buffer(const struct request *rq)
>> +{
>> +	struct req_iterator iter;
>> +	struct bio_vec bvec;
>> +
>> +	rq_for_each_bvec(bvec, rq, iter)
>> +		zero_fill_bvec(&bvec);
>> +}
>> +
>> +static void nullb_zero_read_cmd_buffer(struct nullb_cmd *cmd)
>> +{
>> +	struct nullb_device *dev = cmd->nq->dev;
>> +
>> +	if (dev->queue_mode == NULL_Q_BIO && bio_op(cmd->bio) == REQ_OP_READ)
>> +		zero_fill_bio(cmd->bio);
>> +	else if (req_op(cmd->rq) == REQ_OP_READ)
>> +		nullb_zero_rq_data_buffer(cmd->rq);
>> +}
> 
> Shouldn't the definition of these two functions be under a "#ifdef CONFIG_KMSAN" ?

Hi Damien,

It is on purpose that I used IS_ENABLED(CONFIG_KMSAN) below instead of
#ifdef CONFIG_KMSAN. CONFIG_KMSAN is not yet upstream and I want to
expose the above code to the build robot.

Thanks,

Bart.



[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