From 8fd575200db5b53f6ea6818dd017f1b43190db12 Mon Sep 17 00:00:00 2001 From: Jan Höppner Date: Wed, 19 Aug 2015 13:41:20 +0200 Subject: s390/dasd: Add new ioctl BIODASDCHECKFMT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implement new DASD IOCTL BIODASDCHECKFMT to check a range of tracks on a DASD volume for correct formatting. The following characteristics are checked: - Block size - ECKD key length - ECKD record ID - Number of records per track Signed-off-by: Jan Höppner Signed-off-by: Martin Schwidefsky --- drivers/s390/block/dasd_int.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'drivers/s390/block/dasd_int.h') diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h index 6132733bcd95..ac7027e6d52b 100644 --- a/drivers/s390/block/dasd_int.h +++ b/drivers/s390/block/dasd_int.h @@ -236,6 +236,13 @@ struct dasd_ccw_req { * stolen. Should not be combined with * DASD_CQR_FLAGS_USE_ERP */ +/* + * The following flags are used to suppress output of certain errors. + * These flags should only be used for format checks! + */ +#define DASD_CQR_SUPPRESS_NRF 4 /* Suppress 'No Record Found' error */ +#define DASD_CQR_SUPPRESS_FP 5 /* Suppress 'File Protected' error*/ +#define DASD_CQR_SUPPRESS_IL 6 /* Suppress 'Incorrect Length' error */ /* Signature for error recovery functions. */ typedef struct dasd_ccw_req *(*dasd_erp_fn_t) (struct dasd_ccw_req *); @@ -318,7 +325,8 @@ struct dasd_discipline { * Device operation functions. build_cp creates a ccw chain for * a block device request, start_io starts the request and * term_IO cancels it (e.g. in case of a timeout). format_device - * returns a ccw chain to be used to format the device. + * formats the device and check_device_format compares the format of + * a device with the expected format_data. * handle_terminated_request allows to examine a cqr and prepare * it for retry. */ @@ -329,7 +337,9 @@ struct dasd_discipline { int (*term_IO) (struct dasd_ccw_req *); void (*handle_terminated_request) (struct dasd_ccw_req *); int (*format_device) (struct dasd_device *, - struct format_data_t *, int enable_pav); + struct format_data_t *, int); + int (*check_device_format)(struct dasd_device *, + struct format_check_t *, int); int (*free_cp) (struct dasd_ccw_req *, struct request *); /* -- cgit v1.2.3