linux/drivers/scsi
Martin K. Petersen f08bb1e0db sd: Fix excessive capacity printing on devices with blocks bigger than 512 bytes
During revalidate we check whether device capacity has changed before we
decide whether to output disk information or not.

The check for old capacity failed to take into account that we scaled
sdkp->capacity based on the reported logical block size. And therefore
the capacity test would always fail for devices with sectors bigger than
512 bytes and we would print several copies of the same discovery
information.

Avoid scaling sdkp->capacity and instead adjust the value on the fly
when setting the block device capacity and generating fake C/H/S
geometry.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Cc: <stable@vger.kernel.org>
Reported-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Reviewed-by: Ewan Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2016-03-31 20:59:08 -04:00
..
aacraid aacraid: add missing curly braces 2016-03-21 20:25:31 -04:00
aic7xxx aic7xxx: Fix queue depth handling 2016-02-23 21:27:02 -05:00
aic94xx
arcmsr
arm scsi: fas216: avoid fas216_log_setup for loadable module 2016-02-23 21:27:02 -05:00
be2iscsi be2iscsi: set the boot_kset pointer to NULL in case of failure 2016-03-14 15:50:11 -04:00
bfa bfa: deinline __bfa_trc() and __bfa_trc32() 2016-02-23 21:27:02 -05:00
bnx2fc bnx2fc: bnx2fc_eh_abort(): fix wrong return code. 2016-02-23 21:27:02 -05:00
bnx2i
csiostor
cxgbi
cxlflash cxlflash: Move to exponential back-off when cmd_room is not available 2016-03-28 20:43:34 -04:00
device_handler scsi_dh_alua: Fix a recently introduced deadlock 2016-03-29 20:32:02 -04:00
dpt
esas2r esas2r: Fix array overrun 2016-02-23 21:27:02 -05:00
fcoe fcoe: fix reset of fip selection time. 2016-02-29 21:02:20 -05:00
fnic fnic: move printk()s outside of the critical code section. 2016-03-18 15:28:17 -04:00
hisi_sas hisi_sas: update driver version to 1.3 2016-02-29 21:00:03 -05:00
ibmvscsi ibmvfc: byteswap scsi_id, wwpn, and node_name prior to logging 2016-02-23 21:27:02 -05:00
isci
libfc
libsas
lpfc lpfc: fix misleading indentation 2016-03-18 15:21:23 -04:00
megaraid megaraid_sas: add missing curly braces in ioctl handler 2016-03-18 15:22:55 -04:00
mpt3sas mpt3sas: Don't overreach ioc->reply_post[] during initialization 2016-03-23 16:33:09 -04:00
mvsas
osd osd: remove deadcode 2016-02-25 21:11:42 -05:00
pcmcia
pm8001
qla2xxx qla2xxx: avoid maybe_uninitialized warning 2016-03-18 15:25:07 -04:00
qla4xxx scsi: qla4xxx: shut up warning for rd_reg_indirect 2016-02-23 21:27:02 -05:00
snic snic: correctly check for array overrun on overly long version number 2016-03-01 20:08:49 -05:00
sym53c8xx_2
ufs scsi: ufs: select CONFIG_NLS 2016-03-18 15:35:23 -04:00
.gitignore
3w-9xxx.c
3w-9xxx.h
3w-sas.c
3w-sas.h
3w-xxxx.c
3w-xxxx.h
53c700_d.h_shipped
53c700.c
53c700.h
53c700.scr
a100u2w.c
a100u2w.h
a2091.c
a2091.h
a3000.c
a3000.h
a4000t.c
advansys.c
aha152x.c
aha152x.h
aha1542.c scsi: aha1542: avoid uninitialized variable warnings 2016-02-23 21:27:02 -05:00
aha1542.h
aha1740.c
aha1740.h
am53c974.c
atari_NCR5380.c ncr5380: Call scsi_eh_prep_cmnd() and scsi_eh_restore_cmnd() as and when appropriate 2016-03-01 09:38:58 -05:00
atari_scsi.c
atp870u.c
atp870u.h
BusLogic.c
BusLogic.h
bvme6000_scsi.c
ch.c
constants.c
dc395x.c
dc395x.h
dmx3191d.c
dpt_i2o.c dpt_i2o: fix build warning 2016-02-23 21:27:02 -05:00
dpti.h
dtc.c
dtc.h
eata_generic.h
eata_pio.c
eata_pio.h
eata.c
esp_scsi.c
esp_scsi.h
fdomain.c scsi: fdomain: drop fdomain_pci_tbl when built-in 2016-02-23 21:27:02 -05:00
fdomain.h
FlashPoint.c
g_NCR5380_mmio.c
g_NCR5380.c
g_NCR5380.h
gdth_ioctl.h
gdth_proc.c gdth: replace struct timeval with ktime_get_real_seconds() 2016-02-25 21:16:49 -05:00
gdth_proc.h
gdth.c gdth: replace struct timeval with ktime_get_real_seconds() 2016-02-25 21:16:49 -05:00
gdth.h
gvp11.c
gvp11.h
hosts.c scsi: Use ida for host number management 2016-02-23 21:27:02 -05:00
hpsa_cmd.h hpsa: update copyright information 2016-02-23 21:27:02 -05:00
hpsa.c hpsa: update copyright information 2016-02-23 21:27:02 -05:00
hpsa.h hpsa: update copyright information 2016-02-23 21:27:02 -05:00
hptiop.c
hptiop.h
imm.c imm: check parport_claim 2016-02-25 21:10:53 -05:00
imm.h
in2000.c
in2000.h
initio.c
initio.h
ipr.c Initial roundup of 4.5 merge window patches 2016-01-23 18:45:06 -08:00
ipr.h
ips.c
ips.h
iscsi_boot_sysfs.c
iscsi_tcp.c
iscsi_tcp.h
jazz_esp.c
Kconfig scsi: storvsc: Fix a build issue reported by kbuild test robot 2016-03-05 17:01:04 -05:00
lasi700.c
libiscsi_tcp.c
libiscsi.c
mac53c94.c
mac53c94.h
mac_esp.c
mac_scsi.c
Makefile
megaraid.c
megaraid.h
mesh.c
mesh.h
mvme16x_scsi.c
mvme147.c
mvme147.h
mvumi.c scsi: mvumi: use __maybe_unused to hide pm functions 2016-03-05 17:07:46 -05:00
mvumi.h
ncr53c8xx.c
ncr53c8xx.h
NCR53c406a.c
NCR5380.c ncr5380: Call scsi_eh_prep_cmnd() and scsi_eh_restore_cmnd() as and when appropriate 2016-03-01 09:38:58 -05:00
NCR5380.h
NCR_D700.c
NCR_D700.h
NCR_Q720.c
NCR_Q720.h
nsp32_debug.c
nsp32_io.h
nsp32.c
nsp32.h
osst_detect.h
osst_options.h
osst.c
osst.h
pas16.c
pas16.h
pmcraid.c
pmcraid.h
ppa.c scsi: ppa: use new parport device model 2016-02-23 21:27:02 -05:00
ppa.h
ps3rom.c
qla1280.c
qla1280.h
qlogicfas408.c
qlogicfas408.h
qlogicfas.c
qlogicpti.c qlogicpti: Return correct error code 2016-03-01 20:06:49 -05:00
qlogicpti.h
raid_class.c
script_asm.pl
scsi_common.c scsi_common: do not clobber fixed sense information 2016-03-18 15:49:44 -04:00
scsi_debug.c
scsi_devinfo.c scsi_dh_alua: Add new blacklist flag 'BLIST_SYNC_ALUA' 2016-02-23 21:27:02 -05:00
scsi_dh.c
scsi_error.c
scsi_ioctl.c
scsi_lib_dma.c
scsi_lib.c scsi_dh: add 'rescan' callback 2016-02-23 21:27:02 -05:00
scsi_logging.c
scsi_logging.h
scsi_module.c
scsi_netlink.c
scsi_pm.c
scsi_priv.h
scsi_proc.c
scsi_sas_internal.h scsi_transport_sas: add 'scsi_target_id' sysfs attribute 2016-03-14 21:05:04 -04:00
scsi_scan.c scsi_dh: add 'rescan' callback 2016-02-23 21:27:02 -05:00
scsi_sysctl.c
scsi_sysfs.c scsi: Declare local symbols static 2016-03-29 20:29:55 -04:00
scsi_trace.c
scsi_transport_api.h
scsi_transport_fc.c
scsi_transport_iscsi.c scsi_transport_iscsi: Add 25G and 40G speed definition 2016-02-23 21:27:02 -05:00
scsi_transport_sas.c scsi_transport_sas: add 'scsi_target_id' sysfs attribute 2016-03-14 21:05:04 -04:00
scsi_transport_spi.c
scsi_transport_srp.c
scsi_typedefs.h
scsi.c
scsi.h
scsicam.c
sd_dif.c
sd.c sd: Fix excessive capacity printing on devices with blocks bigger than 512 bytes 2016-03-31 20:59:08 -04:00
sd.h sd: Fix excessive capacity printing on devices with blocks bigger than 512 bytes 2016-03-31 20:59:08 -04:00
ses.c
sg.c sg: fix dxferp in from_to case 2016-03-14 15:50:25 -04:00
sgiwd93.c
sim710.c scsi: sim710: fix build warning 2016-02-23 21:27:02 -05:00
sni_53c710.c
sr_ioctl.c
sr_vendor.c
sr.c SCSI: fix crashes in sd and sr runtime PM 2016-01-26 17:24:16 -08:00
sr.h
st_options.h
st.c st: Fix MTMKPART to work with newer drives 2016-02-23 21:27:02 -05:00
st.h
stex.c stex: Add S3/S4 support 2016-02-23 21:27:02 -05:00
storvsc_drv.c scsi: storvsc: fix SRB_STATUS_ABORTED handling 2016-03-14 15:50:16 -04:00
sun3_scsi_vme.c
sun3_scsi.c
sun3_scsi.h
sun3x_esp.c
sun_esp.c
sym53c416.c
sym53c416.h
t128.c
t128.h
u14-34f.c
ultrastor.c
ultrastor.h
virtio_scsi.c
vmw_pvscsi.c
vmw_pvscsi.h
wd33c93.c
wd33c93.h
wd719x.c
wd719x.h
wd7000.c
xen-scsifront.c
zalon.c
zorro7xx.c