Skip to content

Commit

Permalink
block: align blkdev_dio inlined bio to a cacheline
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jens Axboe committed Oct 19, 2021
1 parent e028f16 commit 6155631
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6155631

Please sign in to comment.