Re: [PATCH 9/9] sd_zbc: Do not write lock zones for reset

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

 



Bart,

On 4/22/17 02:15, Bart Van Assche wrote:
> On Fri, 2017-04-21 at 18:16 +0900, damien.lemoal@xxxxxxx wrote:
>> @@ -250,11 +249,6 @@ int sd_zbc_setup_reset_cmnd(struct scsi_cmnd *cmd)
>>                /* Unaligned request */
>>                return BLKPREP_KILL;
>>  
>> -     /* Do not allow concurrent reset and writes */
>> -     if (sdkp->zones_wlock &&
>> -         test_and_set_bit(zno, sdkp->zones_wlock))
>> -             return BLKPREP_DEFER;
>> -
> 
> Hello Damien,
> 
> Since concurrent zone resets and writes are easy to detect and since these
> indicate a bug in the application that submits these, should an error
> message
> be logged if that happens? Otherwise this patch looks fine to me.

Yes, we could easily add a warning, but if we consider the 3 possible
cases of reset+write combinations:
1) Reset comes in while a write is already in the queue: The write will
succeed (assuming it is directed at the zone write pointer) and the
reset will also succeed.
2) A write directed at the current write pointer comes in while a reset
is in the queue: the write will fail.
3) A write directed at the beginning of the zone comes in while a reset
is in the queue: the write will succeed.

The warning would trigger only in case (1), but that case may be
actually intentional by the user. Case (2) will get an "indirect"
warning through the write align error, which clearly signals a bug to
the user. For case (3), that may also be intentional by the user (not
recommended though).

So I am afraid that a warning may trigger false-positives and may not be
that useful in the end.

Best regards.

-- 
Damien Le Moal, Ph.D.
Sr. Manager, System Software Research Group,
Western Digital Corporation
Damien.LeMoal@xxxxxxx
(+81) 0466-98-3593 (ext. 513593)
1 kirihara-cho, Fujisawa,
Kanagawa, 252-0888 Japan
www.wdc.com, www.hgst.com



[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