block: align blkdev_dio inlined bio to a cacheline
authorJens Axboe <axboe@kernel.dk>
Fri, 15 Oct 2021 22:55:05 +0000 (16:55 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 19 Oct 2021 11:55:52 +0000 (05:55 -0600)
We get all sorts of unreliable and funky results since the bio is
designed to align on a cacheline, which it does not when inlined like
this.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/fops.c

index 2c43e49..21d25ee 100644 (file)
@@ -137,7 +137,7 @@ struct blkdev_dio {
        size_t                  size;
        atomic_t                ref;
        unsigned int            flags;
-       struct bio              bio;
+       struct bio              bio ____cacheline_aligned_in_smp;
 };
 
 static struct bio_set blkdev_dio_pool;