Skip to content

Commit ec9b1cf

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: rename BLK_FEAT_MISALIGNED
This is a flag for ->flags and not a feature for ->features. And fix the one place that actually incorrectly cleared it from ->features. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: John Garry <[email protected]> Reviewed-by: Damien Le Moal <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 78887d0 commit ec9b1cf

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

block/blk-settings.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ static int blk_validate_limits(struct queue_limits *lim)
351351

352352
if (lim->alignment_offset) {
353353
lim->alignment_offset &= (lim->physical_block_size - 1);
354-
lim->features &= ~BLK_FEAT_MISALIGNED;
354+
lim->flags &= ~BLK_FLAG_MISALIGNED;
355355
}
356356

357357
if (!(lim->features & BLK_FEAT_WRITE_CACHE))
@@ -564,7 +564,7 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
564564
if (!(b->features & BLK_FEAT_POLL))
565565
t->features &= ~BLK_FEAT_POLL;
566566

567-
t->flags |= (b->flags & BLK_FEAT_MISALIGNED);
567+
t->flags |= (b->flags & BLK_FLAG_MISALIGNED);
568568

569569
t->max_sectors = min_not_zero(t->max_sectors, b->max_sectors);
570570
t->max_user_sectors = min_not_zero(t->max_user_sectors,
@@ -603,7 +603,7 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
603603

604604
/* Verify that top and bottom intervals line up */
605605
if (max(top, bottom) % min(top, bottom)) {
606-
t->flags |= BLK_FEAT_MISALIGNED;
606+
t->flags |= BLK_FLAG_MISALIGNED;
607607
ret = -1;
608608
}
609609
}
@@ -625,28 +625,28 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
625625
/* Physical block size a multiple of the logical block size? */
626626
if (t->physical_block_size & (t->logical_block_size - 1)) {
627627
t->physical_block_size = t->logical_block_size;
628-
t->flags |= BLK_FEAT_MISALIGNED;
628+
t->flags |= BLK_FLAG_MISALIGNED;
629629
ret = -1;
630630
}
631631

632632
/* Minimum I/O a multiple of the physical block size? */
633633
if (t->io_min & (t->physical_block_size - 1)) {
634634
t->io_min = t->physical_block_size;
635-
t->flags |= BLK_FEAT_MISALIGNED;
635+
t->flags |= BLK_FLAG_MISALIGNED;
636636
ret = -1;
637637
}
638638

639639
/* Optimal I/O a multiple of the physical block size? */
640640
if (t->io_opt & (t->physical_block_size - 1)) {
641641
t->io_opt = 0;
642-
t->flags |= BLK_FEAT_MISALIGNED;
642+
t->flags |= BLK_FLAG_MISALIGNED;
643643
ret = -1;
644644
}
645645

646646
/* chunk_sectors a multiple of the physical block size? */
647647
if ((t->chunk_sectors << 9) & (t->physical_block_size - 1)) {
648648
t->chunk_sectors = 0;
649-
t->flags |= BLK_FEAT_MISALIGNED;
649+
t->flags |= BLK_FLAG_MISALIGNED;
650650
ret = -1;
651651
}
652652

@@ -656,7 +656,7 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
656656

657657
/* Verify that new alignment_offset is on a logical block boundary */
658658
if (t->alignment_offset & (t->logical_block_size - 1)) {
659-
t->flags |= BLK_FEAT_MISALIGNED;
659+
t->flags |= BLK_FLAG_MISALIGNED;
660660
ret = -1;
661661
}
662662

@@ -809,7 +809,7 @@ int bdev_alignment_offset(struct block_device *bdev)
809809
{
810810
struct request_queue *q = bdev_get_queue(bdev);
811811

812-
if (q->limits.flags & BLK_FEAT_MISALIGNED)
812+
if (q->limits.flags & BLK_FLAG_MISALIGNED)
813813
return -1;
814814
if (bdev_is_partition(bdev))
815815
return queue_limit_alignment_offset(&q->limits,

include/linux/blkdev.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ enum {
347347
BLK_FLAG_WRITE_CACHE_DISABLED = (1u << 0),
348348

349349
/* I/O topology is misaligned */
350-
BLK_FEAT_MISALIGNED = (1u << 1),
350+
BLK_FLAG_MISALIGNED = (1u << 1),
351351
};
352352

353353
struct queue_limits {

0 commit comments

Comments
 (0)