/* tape_request->status can be: */ enum tape_request_status {
TAPE_REQUEST_INIT, /* request is ready to be processed */
TAPE_REQUEST_QUEUED, /* request is queued to be processed */
TAPE_REQUEST_IN_IO, /* request is currently in IO */
TAPE_REQUEST_DONE, /* request is completed. */
TAPE_REQUEST_CANCEL, /* request should be canceled. */
TAPE_REQUEST_LONG_BUSY, /* request has to be restarted after long busy */
};
/* Tape CCW request */ struct tape_request { struct list_head list; /* list head for request queueing. */ struct tape_device *device; /* tape device of this request */ struct ccw1 *cpaddr; /* address of the channel program. */ void *cpdata; /* pointer to ccw data. */ enum tape_request_status status;/* status of this request */ int options; /* options for execution. */ int retries; /* retry counter for error recovery. */ int rescnt; /* residual count from devstat. */ struct timer_list timer; /* timer for std_assign_timeout(). */
/* Callback for delivering final status. */ void (*callback)(struct tape_request *, void *); void *callback_data;
enum tape_op op; int rc;
};
/* Function type for magnetic tape commands */ typedefint (*tape_mtop_fn)(struct tape_device *, int);
/* Size of the array containing the mtops for a discipline */ #define TAPE_NR_MTOPS (MTMKPART+1)
/* Tape Discipline */ struct tape_discipline { struct module *owner; int (*setup_device)(struct tape_device *); void (*cleanup_device)(struct tape_device *); int (*irq)(struct tape_device *, struct tape_request *, struct irb *); struct tape_request *(*read_block)(struct tape_device *, size_t); struct tape_request *(*write_block)(struct tape_device *, size_t); void (*process_eov)(struct tape_device*); /* ioctl function for additional ioctls. */ int (*ioctl_fn)(struct tape_device *, unsignedint, unsignedlong); /* Array of tape commands with TAPE_NR_MTOPS entries */
tape_mtop_fn *mtop_array;
};
/* * The discipline irq function either returns an error code (<0) which * means that the request has failed with an error or one of the following:
*/ #define TAPE_IO_SUCCESS 0 /* request successful */ #define TAPE_IO_PENDING 1 /* request still running */ #define TAPE_IO_RETRY 2 /* retry to current request */ #define TAPE_IO_STOP 3 /* stop the running request */ #define TAPE_IO_LONG_BUSY 4 /* delay the running request */
/* Char Frontend Data */ struct tape_char_data { struct idal_buffer *idal_buf; /* idal buffer for user char data */ int block_size; /* of size block_size. */
};
/* Tape Info */ struct tape_device { /* entry in tape_device_list */ struct list_head node;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.