scsi: Add STARGET_CREATED_REMOVE state to scsi_target_state
[linux-2.6-block.git] / include / scsi / scsi_device.h
index 05641aebd1811f5141b2bdf63a0f1d82cdace9c1..b41ee9d8a042512622f7aba8418a35f817d36545 100644 (file)
@@ -181,7 +181,6 @@ struct scsi_device {
        unsigned no_dif:1;      /* T10 PI (DIF) should be disabled */
        unsigned broken_fua:1;          /* Don't set FUA bit */
        unsigned lun_in_cdb:1;          /* Store LUN bits in CDB[1] */
-       unsigned synchronous_alua:1;    /* Synchronous ALUA commands */
 
        atomic_t disk_events_disable_depth; /* disable depth for disk events */
 
@@ -207,6 +206,7 @@ struct scsi_device {
        void                    *handler_data;
 
        unsigned char           access_state;
+       struct mutex            state_mutex;
        enum scsi_device_state sdev_state;
        unsigned long           sdev_data[0];
 } __attribute__((aligned(sizeof(unsigned long))));
@@ -248,6 +248,7 @@ enum scsi_target_state {
        STARGET_CREATED = 1,
        STARGET_RUNNING,
        STARGET_REMOVE,
+       STARGET_CREATED_REMOVE,
        STARGET_DEL,
 };
 
@@ -472,9 +473,9 @@ static inline int scsi_device_created(struct scsi_device *sdev)
                sdev->sdev_state == SDEV_CREATED_BLOCK;
 }
 
-int scsi_internal_device_block(struct scsi_device *sdev, bool wait);
-int scsi_internal_device_unblock(struct scsi_device *sdev,
-                                enum scsi_device_state new_state);
+int scsi_internal_device_block_nowait(struct scsi_device *sdev);
+int scsi_internal_device_unblock_nowait(struct scsi_device *sdev,
+                                       enum scsi_device_state new_state);
 
 /* accessor functions for the SCSI parameters */
 static inline int scsi_device_sync(struct scsi_device *sdev)