Patch "s390/dasd: fix no record found for raw_track_access" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    s390/dasd: fix no record found for raw_track_access

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     s390-dasd-fix-no-record-found-for-raw_track_access.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 778aa8a9cae8e34b8a3c71c4abc2a4d8878973bd
Author: Stefan Haberland <sth@xxxxxxxxxxxxx>
Date:   Wed Nov 23 17:07:18 2022 +0100

    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@xxxxxxxxxxxxx>
    Reviewed-by: Jan Hoeppner <hoeppner@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221123160719.3002694-4-sth@xxxxxxxxxxxxx
    Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
index a2e34c853ca9..4d6fd3205be7 100644
--- a/drivers/s390/block/dasd_eckd.c
+++ b/drivers/s390/block/dasd_eckd.c
@@ -3788,7 +3788,6 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_raw(struct dasd_device *startdev,
 	struct dasd_device *basedev;
 	struct req_iterator iter;
 	struct dasd_ccw_req *cqr;
-	unsigned int first_offs;
 	unsigned int trkcount;
 	unsigned long *idaws;
 	unsigned int size;
@@ -3822,7 +3821,6 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_raw(struct dasd_device *startdev,
 	last_trk = (blk_rq_pos(req) + blk_rq_sectors(req) - 1) /
 		DASD_RAW_SECTORS_PER_TRACK;
 	trkcount = last_trk - first_trk + 1;
-	first_offs = 0;
 
 	if (rq_data_dir(req) == READ)
 		cmd = DASD_ECKD_CCW_READ_TRACK;
@@ -3866,13 +3864,13 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_raw(struct dasd_device *startdev,
 
 	if (use_prefix) {
 		prefix_LRE(ccw++, data, first_trk, last_trk, cmd, basedev,
-			   startdev, 1, first_offs + 1, trkcount, 0, 0);
+			   startdev, 1, 0, trkcount, 0, 0);
 	} else {
 		define_extent(ccw++, data, first_trk, last_trk, cmd, basedev, 0);
 		ccw[-1].flags |= CCW_FLAG_CC;
 
 		data += sizeof(struct DE_eckd_data);
-		locate_record_ext(ccw++, data, first_trk, first_offs + 1,
+		locate_record_ext(ccw++, data, first_trk, 0,
 				  trkcount, cmd, basedev, 0, 0);
 	}
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux