Re: [PATCH 1/2] scsi: Change scsi device boolean fields to single bit flags

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

 



On 11/19/23 23:35, Damien Le Moal wrote:
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 10480eb582b2..1fb460dfca0c 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -167,19 +167,19 @@ struct scsi_device {
  	 * power state for system suspend/resume (suspend to RAM and
  	 * hibernation) operations.
  	 */
-	bool manage_system_start_stop;
+	unsigned manage_system_start_stop:1;
/*
  	 * If true, let the high-level device driver (sd) manage the device
  	 * power state for runtime device suspand and resume operations.
  	 */
-	bool manage_runtime_start_stop;
+	unsigned manage_runtime_start_stop:1;
/*
  	 * If true, let the high-level device driver (sd) manage the device
  	 * power state for system shutdown (power off) operations.
  	 */
-	bool manage_shutdown;
+	unsigned manage_shutdown:1;
unsigned removable:1;
  	unsigned changed:1;	/* Data invalid due to media change */

Is there any code that modifies the above flags from different
threads simultaneously? I'm wondering whether this patch introduces
one or more race conditions related to changing these flags.

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