block: better packing for struct request
authorChristoph Hellwig <hch@lst.de>
Thu, 9 Jun 2016 14:00:35 +0000 (16:00 +0200)
committerJens Axboe <axboe@fb.com>
Thu, 9 Jun 2016 15:52:09 +0000 (09:52 -0600)
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>
include/linux/blkdev.h

index 0c9f8793c87e9e09a2ec0cac13f2a781cffb57b6..9746d223494c4cd985ebd53ae644ff9ccaae7058 100644 (file)
@@ -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 */