mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
block: split scsi_request out of struct request
And require all drivers that want to support BLOCK_PC to allocate it as the first thing of their private data. To support this the legacy IDE and BSG code is switched to set cmd_size on their queues to let the block layer allocate the additional space. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
parent
8ae94eb65b
commit
82ed4db499
49 changed files with 457 additions and 409 deletions
|
@ -128,8 +128,6 @@ typedef __u32 __bitwise req_flags_t;
|
|||
#define RQF_NOMERGE_FLAGS \
|
||||
(RQF_STARTED | RQF_SOFTBARRIER | RQF_FLUSH_SEQ | RQF_SPECIAL_PAYLOAD)
|
||||
|
||||
#define BLK_MAX_CDB 16
|
||||
|
||||
/*
|
||||
* Try to put the fields that are referenced together in the same cacheline.
|
||||
*
|
||||
|
@ -227,17 +225,7 @@ struct request {
|
|||
|
||||
int errors;
|
||||
|
||||
/*
|
||||
* when request is used as a packet command carrier
|
||||
*/
|
||||
unsigned char __cmd[BLK_MAX_CDB];
|
||||
unsigned char *cmd;
|
||||
unsigned short cmd_len;
|
||||
|
||||
unsigned int extra_len; /* length of alignment and padding */
|
||||
unsigned int sense_len;
|
||||
unsigned int resid_len; /* residual count */
|
||||
void *sense;
|
||||
|
||||
unsigned long deadline;
|
||||
struct list_head timeout_list;
|
||||
|
@ -925,7 +913,6 @@ extern void blk_rq_init(struct request_queue *q, struct request *rq);
|
|||
extern void blk_put_request(struct request *);
|
||||
extern void __blk_put_request(struct request_queue *, struct request *);
|
||||
extern struct request *blk_get_request(struct request_queue *, int, gfp_t);
|
||||
extern void blk_rq_set_block_pc(struct request *);
|
||||
extern void blk_requeue_request(struct request_queue *, struct request *);
|
||||
extern int blk_lld_busy(struct request_queue *q);
|
||||
extern int blk_rq_prep_clone(struct request *rq, struct request *rq_src,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue