linux-stable/drivers/s390/block
Stefan Haberland 1fb660ff7f s390/dasd: fix no record found for raw_track_access
[ Upstream commit 590ce6d96d ]

For DASD devices in raw_track_access mode only full track images are
read and written.
For this purpose it is not necessary to do search operation in the
locate record extended function. The documentation even states that
this might fail if the searched record is not found on a track.

Currently the driver sets a value of 1 in the search field for the first
record after record zero. This is the default for disks not in
raw_track_access mode but record 1 might be missing on a completely
empty track.

There has not been any problem with this on IBM storage servers but it
might lead to errors with DASD devices on other vendors storage servers.

Fix this by setting the search field to 0. Record zero is always available
even on a completely empty track.

Fixes: e4dbb0f2b5 ("[S390] dasd: Add support for raw ECKD access.")
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com>
Link: https://lore.kernel.org/r/20221123160719.3002694-4-sth@linux.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-02 17:43:08 +01:00
..
dasd.c s390/dasd: drop unexpected word 'for' in comments 2022-08-04 16:19:15 -06:00
dasd_3990_erp.c s390/dasd: handle request magic consistently as unsigned int 2021-10-20 08:10:41 -06:00
dasd_alias.c s390/dasd: fix Oops in dasd_alias_get_start_dev due to missing pavgroup 2022-09-19 10:19:28 -06:00
dasd_devmap.c s390/dasd: use default_groups in kobj_type 2022-01-08 17:44:05 +01:00
dasd_diag.c s390/dasd: Establish DMA alignment 2022-08-04 16:19:15 -06:00
dasd_diag.h
dasd_eckd.c s390/dasd: fix no record found for raw_track_access 2022-12-02 17:43:08 +01:00
dasd_eckd.h s390/dasd: summarize dasd configuration data in a separate structure 2021-10-20 08:10:42 -06:00
dasd_eer.c
dasd_erp.c s390/dasd: handle request magic consistently as unsigned int 2021-10-20 08:10:41 -06:00
dasd_fba.c dasd: don't set the discard_alignment queue limit 2022-05-03 10:38:50 -06:00
dasd_fba.h
dasd_genhd.c block: simplify disk shutdown 2022-06-28 06:30:26 -06:00
dasd_int.h blk-mq: Drop blk_mq_ops.timeout 'reserved' arg 2022-07-06 06:33:53 -06:00
dasd_ioctl.c s390/dasd: fix kernel doc comment 2021-10-20 08:10:41 -06:00
dasd_proc.c
dcssblk.c s390/dcssblk: fix deadlock when adding a DCSS 2022-11-26 09:27:51 +01:00
Kconfig dax: remove CONFIG_DAX_DRIVER 2021-12-04 08:58:51 -08:00
Makefile s390: remove xpram device driver 2021-09-07 13:38:42 +02:00
scm_blk.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
scm_blk.h block: remove genhd.h 2022-02-02 07:49:59 -07:00
scm_drv.c s390/scm: Make struct scm_driver::remove return void 2021-07-21 11:53:42 +02:00