All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>, linux-block@vger.kernel.org
Subject: Re: [PATCH] block: Cleanup set_capacity()/bdev_set_nr_sectors()
Date: Sun, 23 Apr 2023 22:54:17 -0700	[thread overview]
Message-ID: <ZEYZiWPzuFdb8aS6@infradead.org> (raw)
In-Reply-To: <20230421043101.3079-1-dlemoal@kernel.org>

On Fri, Apr 21, 2023 at 01:31:01PM +0900, Damien Le Moal wrote:
> The code for setting a block device capacity (bd_nr_sectors field of
> struct block_device) is duplicated in set_capacity() and
> bdev_set_nr_sectors(). Clean this up by turning set_capacity() into an
> inline function calling bdev_set_nr_sectors() and move
> bdev_set_nr_sectors() code to block/bdev.c instead of having this
> function in block/partitions/core.c.

I don't think bdev_set_nr_sectors should be exported.  So given that
all this is a slow path anyway, please keep set_capacity out of
line as well and don't export bdev_set_nr_sectors.

      parent reply	other threads:[~2023-04-24  5:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21  4:31 [PATCH] block: Cleanup set_capacity()/bdev_set_nr_sectors() Damien Le Moal
2023-04-21  7:04 ` Chaitanya Kulkarni
2023-04-24  5:54 ` Christoph Hellwig [this message]

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=ZEYZiWPzuFdb8aS6@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=dlemoal@kernel.org \
    --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.