From: Christoph Hellwig <hch@infradead.org>
To: Damien Le Moal <damien.lemoal@wdc.com>
Cc: linux-block@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH v3 3/9] block: Align max_hw_sectors to logical blocksize
Date: Mon, 16 Nov 2020 16:58:23 +0000	[thread overview]
Message-ID: <20201116165823.GA24227@infradead.org> (raw)
In-Reply-To: <20201111130049.967902-4-damien.lemoal@wdc.com>
On Wed, Nov 11, 2020 at 10:00:43PM +0900, Damien Le Moal wrote:
> Block device drivers do not have to call blk_queue_max_hw_sectors() to
> set a limit on request size if the default limit BLK_SAFE_MAX_SECTORS
> is acceptable. However, this limit (255 sectors) may not be aligned
> to the device logical block size which cannot be used as is for a
> request maximum size. This is the case for the null_blk device driver.
> 
> Modify blk_queue_max_hw_sectors() to make sure that the request size
> limits specified by the max_hw_sectors and max_sectors queue limits
> are always aligned to the device logical block size. Additionally, to
> avoid introducing a dependence on the execution order of this function
> with blk_queue_logical_block_size(), also modify
> blk_queue_logical_block_size() to perform the same alignment when the
> logical block size is set after max_hw_sectors.
> 
> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply	other threads:[~2020-11-16 16:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11 13:00 [PATCH v3 0/9] null_blk fixes, improvements and cleanup Damien Le Moal
2020-11-11 13:00 ` [PATCH v3 1/9] null_blk: Fix zone size initialization Damien Le Moal
2020-11-11 13:00 ` [PATCH v3 2/9] null_blk: Fail zone append to conventional zones Damien Le Moal
2020-11-11 13:00 ` [PATCH v3 3/9] block: Align max_hw_sectors to logical blocksize Damien Le Moal
2020-11-11 15:20   ` Johannes Thumshirn
2020-11-16 16:58   ` Christoph Hellwig [this message]
2020-11-11 13:00 ` [PATCH v3 4/9] null_blk: improve zone locking Damien Le Moal
2020-11-16 17:00   ` Christoph Hellwig
2020-11-17  0:03     ` Damien Le Moal
2020-11-11 13:00 ` [PATCH v3 5/9] null_blk: Improve implicit zone close Damien Le Moal
2020-11-11 18:23   ` Johannes Thumshirn
2020-11-11 13:00 ` [PATCH v3 6/9] null_blk: cleanup discard handling Damien Le Moal
2020-11-11 15:13   ` Johannes Thumshirn
2020-11-11 13:00 ` [PATCH v3 7/9] null_blk: discard zones on reset Damien Le Moal
2020-11-11 13:00 ` [PATCH v3 8/9] null_blk: Allow controlling max_hw_sectors limit Damien Le Moal
2020-11-11 15:19   ` Johannes Thumshirn
2020-11-16 17:00   ` Christoph Hellwig
2020-11-11 13:00 ` [PATCH v3 9/9] null_blk: Move driver into its own directory Damien Le Moal
2020-11-11 15:13   ` Johannes Thumshirn
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=20201116165823.GA24227@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=damien.lemoal@wdc.com \
    --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 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).