From: Damien Le Moal <dlemoal@kernel.org>
To: Jens Axboe <axboe@kernel.dk>, linux-block@vger.kernel.org
Subject: [PATCH 1/5] block: use PAGE_SECTORS_SHIFT to set limits
Date: Tue, 8 Aug 2023 22:56:58 +0900 [thread overview]
Message-ID: <20230808135702.628588-2-dlemoal@kernel.org> (raw)
In-Reply-To: <20230808135702.628588-1-dlemoal@kernel.org>
Replace occurences of "PAGE_SHIFT - 9" in blk-settings.c with the
cleaner PAGE_SECTORS_SHIFT macro.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
block/blk-settings.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/block/blk-settings.c b/block/blk-settings.c
index 0046b447268f..5e2dbd34436b 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -126,7 +126,7 @@ void blk_queue_max_hw_sectors(struct request_queue *q, unsigned int max_hw_secto
unsigned int max_sectors;
if ((max_hw_sectors << 9) < PAGE_SIZE) {
- max_hw_sectors = 1 << (PAGE_SHIFT - 9);
+ max_hw_sectors = 1 << PAGE_SECTORS_SHIFT;
printk(KERN_INFO "%s: set to minimum %d\n",
__func__, max_hw_sectors);
}
@@ -148,7 +148,7 @@ void blk_queue_max_hw_sectors(struct request_queue *q, unsigned int max_hw_secto
if (!q->disk)
return;
- q->disk->bdi->io_pages = max_sectors >> (PAGE_SHIFT - 9);
+ q->disk->bdi->io_pages = max_sectors >> PAGE_SECTORS_SHIFT;
}
EXPORT_SYMBOL(blk_queue_max_hw_sectors);
@@ -398,7 +398,7 @@ void disk_update_readahead(struct gendisk *disk)
*/
disk->bdi->ra_pages =
max(queue_io_opt(q) * 2 / PAGE_SIZE, VM_READAHEAD_PAGES);
- disk->bdi->io_pages = queue_max_sectors(q) >> (PAGE_SHIFT - 9);
+ disk->bdi->io_pages = queue_max_sectors(q) >> PAGE_SECTORS_SHIFT;
}
EXPORT_SYMBOL_GPL(disk_update_readahead);
--
2.41.0
next prev parent reply other threads:[~2023-08-08 17:57 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 13:56 [PATCH 0/5] Some minor cleanups Damien Le Moal
2023-08-08 13:56 ` Damien Le Moal [this message]
2023-08-09 2:04 ` [PATCH 1/5] block: use PAGE_SECTORS_SHIFT to set limits Chaitanya Kulkarni
2023-08-09 6:07 ` Hannes Reinecke
2023-08-15 10:00 ` Johannes Thumshirn
2023-08-08 13:56 ` [PATCH 2/5] block: use pr_xxx() instead of printk() Damien Le Moal
2023-08-09 2:06 ` Chaitanya Kulkarni
2023-08-09 6:08 ` Hannes Reinecke
2023-08-15 10:01 ` Johannes Thumshirn
2023-08-08 13:57 ` [PATCH 3/5] block: use pr_xxx() instead of printk() in partition code Damien Le Moal
2023-08-09 2:07 ` Chaitanya Kulkarni
2023-08-09 3:42 ` Damien Le Moal
2023-08-09 6:09 ` Hannes Reinecke
2023-08-15 10:02 ` Johannes Thumshirn
2023-08-08 13:57 ` [PATCH 4/5] block: Improve efi partition debug messages Damien Le Moal
2023-08-09 2:07 ` Chaitanya Kulkarni
2023-08-09 6:09 ` Hannes Reinecke
2023-08-15 10:03 ` Johannes Thumshirn
2023-08-08 13:57 ` [PATCH 5/5] block: switch ldm partition code to use pr_xxx() functions Damien Le Moal
2023-08-09 2:08 ` Chaitanya Kulkarni
2023-08-09 6:10 ` Hannes Reinecke
2023-08-15 10:06 ` Johannes Thumshirn
2023-08-15 12:41 ` Damien Le Moal
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=20230808135702.628588-2-dlemoal@kernel.org \
--to=dlemoal@kernel.org \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.