Re: [PATCH v4 11/11] scsi: add support for user-meta interface

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

 



Anuj,

> +/*
> + * Can't check reftag alone or apptag alone
> + */
> +static bool sd_prot_flags_valid(struct scsi_cmnd *scmd)
> +{
> +	struct request *rq = scsi_cmd_to_rq(scmd);
> +	struct bio *bio = rq->bio;
> +
> +	if (bio_integrity_flagged(bio, BIP_CHECK_REFTAG) &&
> +	    !bio_integrity_flagged(bio, BIP_CHECK_APPTAG))
> +		return false;
> +	if (!bio_integrity_flagged(bio, BIP_CHECK_REFTAG) &&
> +	    bio_integrity_flagged(bio, BIP_CHECK_APPTAG))
> +		return false;
> +	return true;
> +}

This breaks reading the partition table.

The BIP_CHECK_* flags should really only control DIX in the SCSI case.
Filling out *PROTECT is left as an exercise for the SCSI disk driver.
It's the only way we can sanely deal with this. Especially given ATO,
GRD_CHK, REF_CHK, and APP_CHK. It just gets too complicated.

You should just drop sd_prot_flags_valid() and things work fine. And
then with BIP_CHECK_* introduced we can drop BIP_CTRL_NOCHECK.

-- 
Martin K. Petersen	Oracle Linux Engineering




[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