- 03 5月, 2013 40 次提交
-
-
由 James Bottomley 提交于
Some arrays synchronize their full non volatile cache when the sd driver sends a SYNCHRONIZE CACHE command. Unfortunately, they can have Terrabytes of this and we send a SYNCHRONIZE CACHE for every barrier if an array reports it has a writeback cache. This leads to massive slowdowns on journalled filesystems. The fix is to allow userspace to turn off the writeback cache setting as a temporary measure (i.e. without doing the MODE SELECT to write it back to the device), so even though the device reported it has a writeback cache, the user, knowing that the cache is non volatile and all they care about is filesystem correctness, can turn that bit off in the kernel and avoid the performance ruinous (and safety irrelevant) SYNCHRONIZE CACHE commands. The way you do this is add a 'temporary' prefix when performing the usual cache setting operations, so echo temporary write through > /sys/class/scsi_disk/<disk>/cache_type Reported-by: NRic Wheeler <rwheeler@redhat.com> Cc: <stable@vger.kernel.org> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Fengguang Wu 提交于
Signed-off-by: NFengguang Wu <fengguang.wu@intel.com> Signed-off-by: NSaurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Armen Baloyan 提交于
Found by 0 day test project Reported-by: NFengguang Wu <fengguang.wu@intel.com> Signed-off-by: NArmen Baloyan <armen.baloyan@qlogic.com> Signed-off-by: NSaurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Akinobu Mita 提交于
provisioning map (map_storep) is a bitmap accessed by bitops. So the allocation size should be a multiple of sizeof(unsigned long) and also the bitmap should be cleared by using bitmap_clear() instead of memset(). Otherwise it will cause problem on big-endian architecture if the number of bits is not a multiple of BITS_PER_LONG. I tried testing the logical block provisioning support in scsi_debug, but it didn't work as I expected. For example, load scsi_debug module with UNMAP command supported and fill the storage with random data. # modprobe scsi_debug lbpu=1 # dd if=/dev/urandom of=/dev/sdb Then, try to unmap LBA 0, but Get LBA status reports: # sg_unmap --lba=0 --num=1 /dev/sdb # sg_get_lba_status --lba=0 /dev/sdb descriptor LBA: 0x0000000000000000 blocks: 16384 mapped This is unexpected result. Because UNMAP command to LBA 0 finished without any errors, but Get LBA status shows that LBA 0 is still mapped. This problem is due to the wrong translation between LBA and index of provisioning map. Fix it by using correct translation functions. Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Acked-by: NMartin K. Petersen <martin.petersen@oracle.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Akinobu Mita 提交于
The function unmap_region() clears memory region specified as the logical block address and the number of logical blocks in ramdisk storage (fake_storep) if lbpu and lbprz module parameters are enabled. In the while loop of unmap_region(), it advances optimal unmap granularity in logical blocks. But it only clears one logical block at LBA 'block' per loop iteration. And furthermore, the 'block' is not pointing to a logical block address which should be cleared, it is a index of probisioning map (map_storep). Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Acked-by: NMartin K. Petersen <martin.petersen@oracle.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Akinobu Mita 提交于
scsi_debug prohibits setting scsi_debug_unmap_alignment to be greater than scsi_debug_unmap_granularity. But setting them to be the same value is not prohibited. In this case, the only difference with scsi_debug_unmap_alignment == 0 is the logical blocks from 0 to scsi_debug_unmap_alignment - 1 cannot be unmapped. But the difference is not properly handled in the current code. So this prohibits such unusual setting. Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Acked-by: NMartin K. Petersen <martin.petersen@oracle.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Akinobu Mita 提交于
If the logical block provisioning is not enabled, map_region() and unmap_region() have no effect and they don't need to be called. So this makes map_region() and unmap_region() to be called only when scsi_debug_lbp() returns true, i.e. logical block provisioning is enabled. While I'm at it, this also removes meaningless non-zero check for scsi_debug_unmap_granularity. Because scsi_debug_unmap_granularity cannot be zero with usual setting: scsi_debug_unmap_granularity is 1 by default, and it can be changed to zero with explicit module parameter setting only when the logical block provisioning is disabled. But it is only meaningful module parameter when the logical block provisioning is enabled. Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Acked-by: NMartin K. Petersen <martin.petersen@oracle.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Jeremy Higdon 提交于
It appears to me that there is a problem with handling of type 1 protection information. It is considering a logical block reference tag of 0xffffffff to be an error, but it is actually valid any time ((lba & 0xffffffff) == 0xffffffff) [for example, 2TiB-1, 4TiB-1, 6TiB-1, etc.]. I'm going by what's written in 4.18.3 of SBC3, where there doesn't appear to be any invalid value for the reference tag. Signed-off-by: NJeremy Higdon <jeremy@sgi.com> Acked-by: NMartin K. Petersen <martin.petersen@oracle.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
Driver passed the wrong IOADL address to IOA adapter. The patch fixes the issue. Signed-off-by: NWen Xiong <wenxiong@linux.vnet.ibm.com> Acked-by: NBrian King <brking@linux.vnet.ibm.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Wei Yongjun 提交于
Fix to return -ENOMEM in the create workqueue error case instead of 0, as done elsewhere in this function. Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Reviewed-by: NMike Christie <michaelc@cs.wisc.edu> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
[SCSI] lpfc 8.3.39: Reduced tmo value set to FLOGI WQE for quick recovery from FLOGI sequence timeout Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
[SCSI] lpfc 8.3.39: Fixed system panic during EEH recovery due to midlayer acting on outstanding I/O Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 James Smart 提交于
Signed-off-by: NJames Smart <james.smart@emulex.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
Add reset adapter after the 6th EEH errors in ipr driver. This triggers the adapter reset via the PCI config space even when the slot is frozen. Signed-off-by: NWen Xiong <wenxiong@linux.vnet.ibm.com> Acked-by: NBrian King <brking@linux.vnet.ibm.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Vikas Chaudhary 提交于
Signed-off-by: NVikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Adheer Chandravanshi 提交于
Assign values using correct datatype in function qla4xxx_copy_to_fwddb_param() Signed-off-by: NAdheer Chandravanshi <adheer.chandravanshi@qlogic.com> Signed-off-by: NVikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Adheer Chandravanshi 提交于
Fix following smatch warnings:- drivers/scsi/qla4xxx/ql4_os.c:6573 qla4xxx_sysfs_ddb_set_param() warn: possible memory leak of 'fw_ddb_entry' drivers/scsi/qla4xxx/ql4_os.c:6596 qla4xxx_sysfs_ddb_delete() warn: variable dereferenced before check 'fnode_sess' (see line 6584) drivers/scsi/qla4xxx/ql4_os.c:6632 qla4xxx_sysfs_ddb_delete() error: potential NULL dereference 'fw_ddb_entry'. Signed-off-by: NAdheer Chandravanshi <adheer.chandravanshi@qlogic.com> Signed-off-by: NVikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Vikas Chaudhary 提交于
Fix following warning: drivers/scsi/qla4xxx/ql4_os.c:5507:5: warning: symbol 'qla4xxx_sysfs_ddb_tgt_create' was not declared. Should it be static? Signed-off-by: NVikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Vikas Chaudhary 提交于
Fix followig gcc warning:- drivers/scsi/qla4xxx/ql4_os.c: In function ‘qla4xxx_sysfs_ddb_get_param’: drivers/scsi/qla4xxx/ql4_os.c:6279: warning: comparison is always true due to limited range of data type drivers/scsi/qla4xxx/ql4_os.c:6290: warning: comparison is always true due to limited range of data type drivers/scsi/qla4xxx/ql4_os.c: In function ‘qla4xxx_sysfs_ddb_delete’: drivers/scsi/qla4xxx/ql4_os.c:6593: warning: ‘ddb_size’ may be used uninitialized in this function Signed-off-by: NVikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Dan Carpenter 提交于
__be32 is already a __bitwise type so we don't need the second __bitwise here. It causes a Sparse error: include/scsi/osd_protocol.h:110:26: error: invalid modifier Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NBenny Halevy <bhalevy@tonian.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Dan Carpenter 提交于
We should unlock here before returning. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NAdam Radford <aradford@gmail.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-