OSDN Git Service

s390/dasd: Add dynamic formatting support for ESE volumes
authorJan Höppner <hoeppner@linux.ibm.com>
Fri, 27 Apr 2018 14:51:22 +0000 (16:51 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Thu, 11 Jul 2019 18:39:53 +0000 (20:39 +0200)
commit5e2b17e712cf10cc3cc98fde28a88e8f1a1267e9
tree62dbb4a3d1a83bead5ec3c1b57d21d16afa24b89
parentc729696bcf8b23450043dd9c9972c15e53419ae4
s390/dasd: Add dynamic formatting support for ESE volumes

A dynamic formatting is issued whenever a write request returns with
either a No Record Found error (Command Mode), Incorrect Length error
(Transport Mode), or File Protected error (Transport Mode). All three
cases mean that the tracks in question haven't been initialized in a
desired format yet.

The part of the volume that was tried to be written on is then formatted
and the original request is re-queued.

As the formatting will happen during normal I/O operations, it is quite
likely that there won't be any memory available to build the respective
request. Another two pages of memory are allocated per volume
specifically for the dynamic formatting.

The dasd_eckd_build_format() function is extended to make sure that the
original startdev is reused. Also, all formatting and format check
functions use the new memory pool exclusively now to reduce complexity.

Read operations will always return zero data when unformatted areas are
read.

Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
drivers/s390/block/dasd.c
drivers/s390/block/dasd_eckd.c
drivers/s390/block/dasd_int.h