linux-stable/drivers/s390
Stefan Haberland aa3b1fb463 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-08 11:18:30 +01:00
..
block s390/dasd: fix no record found for raw_track_access 2022-12-08 11:18:30 +01:00
char s390/zcore: fix race when reading from hardware system area 2022-08-25 11:15:23 +02:00
cio vfio/ccw: Do not change FSM state in subchannel event 2022-08-25 11:15:21 +02:00
crypto s390/zcrypt: Fix ZCRYPT_PERDEV_REQCNT ioctl 2020-10-01 13:14:54 +02:00
net s390/lcs: fix variable dereferenced before check 2022-05-18 09:42:48 +02:00
scsi scsi: zfcp: Fix missing auto port scan and thus missing target ports 2022-08-25 11:15:27 +02:00
virtio virtio/s390: implement virtio-ccw revision 2 correctly 2021-03-07 12:18:53 +01:00
Makefile