Revision dd4b3c83b9efac10d48a94c61372119fc555a077 authored by Jan Höppner on 19 December 2019, 08:43:50 UTC, committed by Jens Axboe on 20 December 2019, 18:52:01 UTC
The max data count (mdc) is an unsigned 16-bit integer value as per AR
documentation and is received via ccw_device_get_mdc() for a specific
path mask from the CIO layer. The function itself also always returns a
positive mdc value or 0 in case mdc isn't supported or couldn't be
determined.

Though, the comment for this function describes a negative return value
to indicate failures.

As a result, the DASD device driver interprets the return value of
ccw_device_get_mdc() incorrectly. The error case is essentially a dead
code path.

To fix this behaviour, check explicitly for a return value of 0 and
change the comment for ccw_device_get_mdc() accordingly.

This fix merely enables the error code path in the DASD functions
get_fcx_max_data() and verify_fcx_max_data(). The actual functionality
stays the same and is still correct.

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
Acked-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent b3c6a59
History
File Mode Size
Kconfig -rw-r--r-- 3.3 KB
Makefile -rw-r--r-- 459 bytes
aops.c -rw-r--r-- 51.7 KB
aops.h -rw-r--r-- 3.2 KB
attrib.c -rw-r--r-- 88.8 KB
attrib.h -rw-r--r-- 3.5 KB
bitmap.c -rw-r--r-- 4.7 KB
bitmap.h -rw-r--r-- 2.8 KB
collate.c -rw-r--r-- 2.8 KB
collate.h -rw-r--r-- 934 bytes
compress.c -rw-r--r-- 28.0 KB
debug.c -rw-r--r-- 4.0 KB
debug.h -rw-r--r-- 1.5 KB
dir.c -rw-r--r-- 50.8 KB
dir.h -rw-r--r-- 908 bytes
endian.h -rw-r--r-- 1.4 KB
file.c -rw-r--r-- 59.9 KB
index.c -rw-r--r-- 14.0 KB
index.h -rw-r--r-- 4.7 KB
inode.c -rw-r--r-- 95.5 KB
inode.h -rw-r--r-- 10.3 KB
layout.h -rw-r--r-- 96.2 KB
lcnalloc.c -rw-r--r-- 31.6 KB
lcnalloc.h -rw-r--r-- 4.9 KB
logfile.c -rw-r--r-- 27.4 KB
logfile.h -rw-r--r-- 12.8 KB
malloc.h -rw-r--r-- 2.3 KB
mft.c -rw-r--r-- 98.6 KB
mft.h -rw-r--r-- 3.2 KB
mst.c -rw-r--r-- 6.2 KB
namei.c -rw-r--r-- 13.3 KB
ntfs.h -rw-r--r-- 4.2 KB
quota.c -rw-r--r-- 2.9 KB
quota.h -rw-r--r-- 432 bytes
runlist.c -rw-r--r-- 58.7 KB
runlist.h -rw-r--r-- 2.6 KB
super.c -rw-r--r-- 98.8 KB
sysctl.c -rw-r--r-- 1.5 KB
sysctl.h -rw-r--r-- 613 bytes
time.h -rw-r--r-- 2.8 KB
types.h -rw-r--r-- 1.3 KB
unistr.c -rw-r--r-- 11.4 KB
upcase.c -rw-r--r-- 3.1 KB
usnjrnl.c -rw-r--r-- 1.9 KB
usnjrnl.h -rw-r--r-- 8.4 KB
volume.h -rw-r--r-- 6.1 KB

back to top