Re: [PATCH] block: set rq->cmd_flags with bio->opf instead of data->cmd_flags when bio is not Null

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

 





在 2019/1/28 23:57, Christoph Hellwig 写道:
On Mon, Jan 28, 2019 at 03:36:58PM +0000, John Garry wrote:
As I understood, the problem is the scenario of calling
blk_mq_make_request()->bio_integrity_prep() where we then allocate a bio
integrity payload in calling bio_integrity_alloc().

In this case, bio_integrity_alloc() sets bio->bi_opf |= REQ_INTEGRITY, which
is no longer consistent with data.cmd_flags.
I don't see how that could happen:

static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio)
{
	...

	if (!bio_integrity_prep(bio))
		return BLK_QC_T_NONE;

	...

	data.cmd_flags = bio->bi_opf;
         rq = blk_mq_get_request(q, bio, &data);

Sorry to disturb, i used kernel 5.0-rc1 which has the issue, and it is fixed on linux-next branch.



.






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux