Skip to content

Commit

Permalink
block: better packing for struct request
Browse files Browse the repository at this point in the history
Keep the 32-bit CPU and cmd_type flags together to avoid holes on 64-bit
architectures.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Jun 9, 2016
1 parent 60a4009 commit ca93e45
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,11 @@ struct request {
struct request_queue *q;
struct blk_mq_ctx *mq_ctx;

u64 cmd_flags;
int cpu;
unsigned cmd_type;
u64 cmd_flags;
unsigned long atomic_flags;

int cpu;

/* the following two fields are internal, NEVER access directly */
unsigned int __data_len; /* total data len */
sector_t __sector; /* sector cursor */
Expand Down

0 comments on commit ca93e45

Please sign in to comment.