RE: [PATCH] This change sets the LBPRZ flag in EVPD page b2h and READ CAPACITY (16) based on a new unmap_zeroes_data device attribute. This flag is set automatically for iblock based on underlying block device queue's discard_zeroes_data flag.

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

 



________________________________________
From: Nicholas A. Bellinger [nab@xxxxxxxxxxxxxxx]
Sent: Sunday, November 29, 2015 5:54 PM
To: Pocas, Jamie
Cc: target-devel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] This change sets the LBPRZ flag in EVPD page b2h and READ CAPACITY (16) based on a new unmap_zeroes_data device attribute. This flag is set automatically for iblock based on underlying block device queue's discard_zeroes_data flag.
>
> Hi Jamie,
>
> Apologies for the delayed follow-up.  Comments below.

No worries. Thanks for the feedback.

>
> On Thu, 2015-11-19 at 12:30 +0000, Pocas, Jamie wrote:
>> diff --git a/drivers/target/target_core_spc.c b/drivers/target/target_core_spc.c
>> index f87d4ce..440322d 100644
>> --- a/drivers/target/target_core_spc.c
>> +++ b/drivers/target/target_core_spc.c
>> @@ -628,6 +628,18 @@ spc_emulate_evpd_b2(struct se_cmd *cmd, unsigned char *buf)
>>        if (dev->dev_attrib.emulate_tpws != 0)
>>                 buf[5] |= 0x40 | 0x20;
>>
>> +       /*
>> +        * The unmap_zeroes_data set means that the underlying device supports
>> +        * REQ_DISCARD and has the discard_zeroes_data bit set. This satisfies
>> +        * the SBC requirements for LBPRZ, meaning that a subsequent read
>> +        * will return zeroes after an UNMAP or WRITE SAME (16) to an LBA
>> +        * See sbc4r36 6.6.4.
>> +        */
>> +       if (((dev->dev_attrib.emulate_tpu != 0) |
>                                                ^^^^
>
> I assume is a typo and should be a "||".  Fixing up now.

Yes, this is a typo. Good catch. Thankfully for my purposes there is no side-effect.

- JP--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux