Re: [PATCH v6 09/23] scsi: sd: Do not issue commands to suspended disks on shutdown

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

 



On 9/25/23 23:00, Damien Le Moal wrote:
It seems that you are suggesting that we should use some information from the scsi_device->power structure to detect the suspended state...

Yes, that's indeed what I'm suggesting.

But as mentioned before, these are PM internal and should not be touched without the device lock held. So the little "suspended" flag simplifies things a lot.

Hmm ... I think there is plenty of code in the Linux kernel that reads
variables that can be modified by another thread without using locking.
Hasn't the READ_ONCE() macro been introduced for this purpose? Anyway, I
don't have a strong opinion about whether to read directly from the
scsi_device->power data structure or whether to introduce the new
'suspended' member.

Thanks,

Bart.



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux