Re: [PATCH v4 1/3] block: move ref_tag calculation func to the block layer

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

 



On 7/27/18 9:21 AM, Jens Axboe wrote:
> On 7/25/18 9:46 AM, Max Gurtovoy wrote:
>> Currently this function is implemented in the scsi layer, but it's
>> actual place should be the block layer since T10-PI is a general
>> data integrity feature that is used in the nvme protocol as well.
> 
> Applied 1-3 for 4.19.

This:

static inline u32 t10_pi_ref_tag(struct request *rq)
{
        return blk_rq_pos(rq) >>
                (rq->q->integrity.interval_exp - 9) & 0xffffffff;
}

won't work for !CONFIG_BLK_DEV_INTEGRITY. I didn't want to make the
change, but looks like it should either return -1U as we the value
should mean nothing if BLK_DEV_INTEGRITY isn't set, or just ignore the
shift and return blk_rq_pos(rq) & 0xffffffff.

Please fixup and resend the series.

-- 
Jens Axboe




[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