From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: Damien Le Moal <dlemoal@kernel.org>,
Niklas Cassel <cassel@kernel.org>, Song Liu <song@kernel.org>,
Yu Kuai <yukuai3@huawei.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Alim Akhtar <alim.akhtar@samsung.com>,
Avri Altman <avri.altman@wdc.com>,
Bart Van Assche <bvanassche@acm.org>,
linux-block@vger.kernel.org, linux-ide@vger.kernel.org,
linux-raid@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: [PATCH 3/7] block: rename BLK_FLAG_MISALIGNED
Date: Tue, 25 Jun 2024 13:05:43 +0200 [thread overview]
Message-ID: <20240625110603.50885-4-hch@lst.de> (raw)
In-Reply-To: <20240625110603.50885-1-hch@lst.de>
This is a flag for ->flags and not a feature for ->features.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
block/blk-settings.c | 18 +++++++++---------
include/linux/blkdev.h | 2 +-
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/block/blk-settings.c b/block/blk-settings.c
index ec7dbe93d5c324..2ae7f8579de3fd 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -351,7 +351,7 @@ static int blk_validate_limits(struct queue_limits *lim)
if (lim->alignment_offset) {
lim->alignment_offset &= (lim->physical_block_size - 1);
- lim->features &= ~BLK_FEAT_MISALIGNED;
+ lim->features &= ~BLK_FLAG_MISALIGNED;
}
if (!(lim->features & BLK_FEAT_WRITE_CACHE))
@@ -564,7 +564,7 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
if (!(b->features & BLK_FEAT_POLL))
t->features &= ~BLK_FEAT_POLL;
- t->flags |= (b->flags & BLK_FEAT_MISALIGNED);
+ t->flags |= (b->flags & BLK_FLAG_MISALIGNED);
t->max_sectors = min_not_zero(t->max_sectors, b->max_sectors);
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,
/* Verify that top and bottom intervals line up */
if (max(top, bottom) % min(top, bottom)) {
- t->flags |= BLK_FEAT_MISALIGNED;
+ t->flags |= BLK_FLAG_MISALIGNED;
ret = -1;
}
}
@@ -625,28 +625,28 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
/* Physical block size a multiple of the logical block size? */
if (t->physical_block_size & (t->logical_block_size - 1)) {
t->physical_block_size = t->logical_block_size;
- t->flags |= BLK_FEAT_MISALIGNED;
+ t->flags |= BLK_FLAG_MISALIGNED;
ret = -1;
}
/* Minimum I/O a multiple of the physical block size? */
if (t->io_min & (t->physical_block_size - 1)) {
t->io_min = t->physical_block_size;
- t->flags |= BLK_FEAT_MISALIGNED;
+ t->flags |= BLK_FLAG_MISALIGNED;
ret = -1;
}
/* Optimal I/O a multiple of the physical block size? */
if (t->io_opt & (t->physical_block_size - 1)) {
t->io_opt = 0;
- t->flags |= BLK_FEAT_MISALIGNED;
+ t->flags |= BLK_FLAG_MISALIGNED;
ret = -1;
}
/* chunk_sectors a multiple of the physical block size? */
if ((t->chunk_sectors << 9) & (t->physical_block_size - 1)) {
t->chunk_sectors = 0;
- t->flags |= BLK_FEAT_MISALIGNED;
+ t->flags |= BLK_FLAG_MISALIGNED;
ret = -1;
}
@@ -656,7 +656,7 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
/* Verify that new alignment_offset is on a logical block boundary */
if (t->alignment_offset & (t->logical_block_size - 1)) {
- t->flags |= BLK_FEAT_MISALIGNED;
+ t->flags |= BLK_FLAG_MISALIGNED;
ret = -1;
}
@@ -809,7 +809,7 @@ int bdev_alignment_offset(struct block_device *bdev)
{
struct request_queue *q = bdev_get_queue(bdev);
- if (q->limits.flags & BLK_FEAT_MISALIGNED)
+ if (q->limits.flags & BLK_FLAG_MISALIGNED)
return -1;
if (bdev_is_partition(bdev))
return queue_limit_alignment_offset(&q->limits,
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index b2f1362c46814f..1a7e9d9c16d78b 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -347,7 +347,7 @@ enum {
BLK_FLAG_WRITE_CACHE_DISABLED = (1u << 0),
/* I/O topology is misaligned */
- BLK_FEAT_MISALIGNED = (1u << 1),
+ BLK_FLAG_MISALIGNED = (1u << 1),
};
struct queue_limits {
--
2.43.0
next prev parent reply other threads:[~2024-06-25 11:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-25 11:05 queue_limits fixups and tidyups Christoph Hellwig
2024-06-25 11:05 ` [PATCH 1/7] md: set md-specific flags for all queue limits Christoph Hellwig
2024-06-26 11:32 ` kernel test robot
2024-06-25 11:05 ` [PATCH 2/7] block: correctly report cache type Christoph Hellwig
2024-06-25 11:05 ` Christoph Hellwig [this message]
2024-06-25 11:24 ` [PATCH 3/7] block: rename BLK_FLAG_MISALIGNED John Garry
2024-06-25 14:34 ` Christoph Hellwig
2024-06-25 11:05 ` [PATCH 4/7] block: conding style fixup for blk_queue_max_guaranteed_bio Christoph Hellwig
2024-06-25 11:26 ` John Garry
2024-06-25 11:05 ` [PATCH 5/7] block: remove disk_update_readahead Christoph Hellwig
2024-06-25 11:05 ` [PATCH 6/7] block: remove the fallback case in queue_dma_alignment Christoph Hellwig
2024-06-25 12:03 ` John Garry
2024-06-25 14:34 ` Christoph Hellwig
2024-06-25 11:05 ` [PATCH 7/7] block: move dma_pad_mask into queue_limits Christoph Hellwig
2024-06-26 4:44 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240625110603.50885-4-hch@lst.de \
--to=hch@lst.de \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=song@kernel.org \
--cc=yukuai3@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).