Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: scsi_dh_alua: remove synchronous STPG support

Since 9c58b395 ("scsi: scsi_devinfo: remove synchronous ALUA for NETAPP
devices") this code is unused.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Christoph Hellwig and committed by
Martin K. Petersen
6934be4f 496c91bb

+5 -23
+5 -22
drivers/scsi/device_handler/scsi_dh_alua.c
··· 57 57 /* device handler flags */ 58 58 #define ALUA_OPTIMIZE_STPG 0x01 59 59 #define ALUA_RTPG_EXT_HDR_UNSUPP 0x02 60 - #define ALUA_SYNC_STPG 0x04 61 60 /* State machine flags */ 62 61 #define ALUA_PG_RUN_RTPG 0x10 63 62 #define ALUA_PG_RUN_STPG 0x20 ··· 69 70 static LIST_HEAD(port_group_list); 70 71 static DEFINE_SPINLOCK(port_group_lock); 71 72 static struct workqueue_struct *kaluad_wq; 72 - static struct workqueue_struct *kaluad_sync_wq; 73 73 74 74 struct alua_port_group { 75 75 struct kref kref; ··· 378 380 } 379 381 380 382 spin_lock_irqsave(&pg->lock, flags); 381 - if (sdev->synchronous_alua) 382 - pg->flags |= ALUA_SYNC_STPG; 383 383 if (pg_updated) 384 384 list_add_rcu(&h->node, &pg->dh_list); 385 385 spin_unlock_irqrestore(&pg->lock, flags); ··· 781 785 int err = SCSI_DH_OK; 782 786 struct alua_queue_data *qdata, *tmp; 783 787 unsigned long flags; 784 - struct workqueue_struct *alua_wq = kaluad_wq; 785 788 786 789 spin_lock_irqsave(&pg->lock, flags); 787 790 sdev = pg->rtpg_sdev; ··· 791 796 kref_put(&pg->kref, release_port_group); 792 797 return; 793 798 } 794 - if (pg->flags & ALUA_SYNC_STPG) 795 - alua_wq = kaluad_sync_wq; 796 799 pg->flags |= ALUA_PG_RUNNING; 797 800 if (pg->flags & ALUA_PG_RUN_RTPG) { 798 801 int state = pg->state; ··· 803 810 pg->flags &= ~ALUA_PG_RUNNING; 804 811 pg->flags |= ALUA_PG_RUN_RTPG; 805 812 spin_unlock_irqrestore(&pg->lock, flags); 806 - queue_delayed_work(alua_wq, &pg->rtpg_work, 813 + queue_delayed_work(kaluad_wq, &pg->rtpg_work, 807 814 pg->interval * HZ); 808 815 return; 809 816 } ··· 815 822 pg->flags &= ~ALUA_PG_RUNNING; 816 823 pg->flags |= ALUA_PG_RUN_RTPG; 817 824 spin_unlock_irqrestore(&pg->lock, flags); 818 - queue_delayed_work(alua_wq, &pg->rtpg_work, 825 + queue_delayed_work(kaluad_wq, &pg->rtpg_work, 819 826 pg->interval * HZ); 820 827 return; 821 828 } ··· 832 839 pg->interval = 0; 833 840 pg->flags &= ~ALUA_PG_RUNNING; 834 841 spin_unlock_irqrestore(&pg->lock, flags); 835 - queue_delayed_work(alua_wq, &pg->rtpg_work, 842 + queue_delayed_work(kaluad_wq, &pg->rtpg_work, 836 843 pg->interval * HZ); 837 844 return; 838 845 } ··· 867 874 { 868 875 int start_queue = 0; 869 876 unsigned long flags; 870 - struct workqueue_struct *alua_wq = kaluad_wq; 871 - 872 877 if (WARN_ON_ONCE(!pg) || scsi_device_get(sdev)) 873 878 return false; 874 879 ··· 891 900 } 892 901 } 893 902 894 - if (pg->flags & ALUA_SYNC_STPG) 895 - alua_wq = kaluad_sync_wq; 896 903 spin_unlock_irqrestore(&pg->lock, flags); 897 904 898 905 if (start_queue) { 899 - if (queue_delayed_work(alua_wq, &pg->rtpg_work, 906 + if (queue_delayed_work(kaluad_wq, &pg->rtpg_work, 900 907 msecs_to_jiffies(ALUA_RTPG_DELAY_MSECS))) 901 908 sdev = NULL; 902 909 else ··· 1155 1166 /* Temporary failure, bypass */ 1156 1167 return SCSI_DH_DEV_TEMP_BUSY; 1157 1168 } 1158 - kaluad_sync_wq = create_workqueue("kaluad_sync"); 1159 - if (!kaluad_sync_wq) { 1160 - destroy_workqueue(kaluad_wq); 1161 - return SCSI_DH_DEV_TEMP_BUSY; 1162 - } 1169 + 1163 1170 r = scsi_register_device_handler(&alua_dh); 1164 1171 if (r != 0) { 1165 1172 printk(KERN_ERR "%s: Failed to register scsi device handler", 1166 1173 ALUA_DH_NAME); 1167 - destroy_workqueue(kaluad_sync_wq); 1168 1174 destroy_workqueue(kaluad_wq); 1169 1175 } 1170 1176 return r; ··· 1168 1184 static void __exit alua_exit(void) 1169 1185 { 1170 1186 scsi_unregister_device_handler(&alua_dh); 1171 - destroy_workqueue(kaluad_sync_wq); 1172 1187 destroy_workqueue(kaluad_wq); 1173 1188 } 1174 1189
-1
include/scsi/scsi_device.h
··· 181 181 unsigned no_dif:1; /* T10 PI (DIF) should be disabled */ 182 182 unsigned broken_fua:1; /* Don't set FUA bit */ 183 183 unsigned lun_in_cdb:1; /* Store LUN bits in CDB[1] */ 184 - unsigned synchronous_alua:1; /* Synchronous ALUA commands */ 185 184 186 185 atomic_t disk_events_disable_depth; /* disable depth for disk events */ 187 186