]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
s390/dasd: fix no record found for raw_track_access
authorStefan Haberland <sth@linux.ibm.com>
Wed, 23 Nov 2022 16:07:18 +0000 (17:07 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 14 Dec 2022 13:00:28 +0000 (14:00 +0100)
commit20698f1f9b6bf29f9895a5738b4af4d72356fac8
treef2e3a95c651a67bed27ac9d8faa8021ed28f2eba
parentfedac22ddcff23d880c16741185253c940be534a
s390/dasd: fix no record found for raw_track_access

[ Upstream commit 590ce6d96d6a224b470a3862c33a483d5022bfdb ]

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: e4dbb0f2b5dd ("[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>
(cherry picked from commit 67d638f8efc49cd9115402b1274bbbe0a5db11e8)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
drivers/s390/block/dasd_eckd.c