s390/dasd: enable raw_track_access reads without direct I/O
authorStefan Weinhuber <wein@de.ibm.com>
Fri, 16 Aug 2013 13:57:32 +0000 (15:57 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 22 Aug 2013 10:20:09 +0000 (12:20 +0200)
commit558b9ef00e128b2c97df6e4243152af3d0da3653
treef017c9b3613ea9779bc23371731e217ceac2676a
parent5c474a1e2265c5156e6c63f87a7e99053039b8b9
s390/dasd: enable raw_track_access reads without direct I/O

The ECKD protocol supports reading of tracks with arbitrary format as
raw track images. The DASD device driver supports this in its
raw_track_access mode. In this mode it maps each track to sixteen 4096
byte sectors and rejects all requests that are not properly aligned to
this mapping.

An application that wants to use a DASD in raw_track_access mode will
usually use direct I/O to make sure that properly aligned requests are
directly submitted to the driver. However, applications that are not
aware of this mode, e.g. udev, will encounter I/O errors.

To make the use without direct I/O possible and avoid this kind of
alignment errors, we now pad unaligned read requests with a dummy
page, so that we can always read full tracks.  Please note that
writing is still only possible for full track images that are properly
aligned.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/dasd_eckd.c