Re: [PATCH 11/21] target: Make ABORT and LUN RESET handling synchronous

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

 



On Thu, Jan 07, 2016 at 03:11:38PM +0100, Bart Van Assche wrote:
> Sorry but I do not agree that checking CMD_T_ABORTED without locking is 
> wrong. The worst that can happen if CMD_T_ABORTED is checked without 
> locking is that if this test happens within a few nanoseconds after the 
> CMD_T_ABORTED flag has been set that target_complete_cmd() proceeds with 
> executing the command instead of aborting it. This behavior is compliant 
> with the SCSI specs and would also occur if sending the ABORT command from 
> the initiator to the target is delayed slightly. The Linux kernel contains 
> many optimizations of this kind, namely not using locking to check a flag 
> when it is safe to do leave out locking.

Yes.  The only case where we need to take a lock on the read side
is if we need to test a specific combination of two flags, and even
that is dubious if they are in the same cache line.
--
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