public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, lining <lining2020x@163.com>,
	Josef Bacik <josef@toxicpanda.com>, Jan Kara <jack@suse.cz>
Subject: Re: [PATCH] nbd: don't update block size after device is started
Date: Thu, 29 Oct 2020 16:40:27 +0800	[thread overview]
Message-ID: <20201029084027.GA1970901@T590> (raw)
In-Reply-To: <20201029075149.GA1602@infradead.org>

On Thu, Oct 29, 2020 at 07:51:49AM +0000, Christoph Hellwig wrote:
> On Wed, Oct 28, 2020 at 03:24:34PM +0800, Ming Lei wrote:
> > Mounted NBD device can be resized, one use case is rbd-nbd.
> > 
> > Fix the issue by setting up default block size, then not touch it
> > in nbd_size_update() any more. This kind of usage is aligned with loop
> > which has same use case too.
> 
> I think the only reasonable fix here is to remove the set_blocksize
> call entirely.  The concept of block size set by it is a file system
> construct and nbd has not business setting it at all.

I think the idea is reasonable, we have several drivers(loop, nbd, zram,
pktcdvd, bcache) which call into set_blocksize().

Also ioctl(BLKBSZSET) which is used by 'blockdev --setbsz', still not
understand which kind of use case is served for.


Thanks,
Ming


      reply	other threads:[~2020-10-29  8:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-28  7:24 [PATCH] nbd: don't update block size after device is started Ming Lei
2020-10-29  3:13 ` lining
2020-10-29  3:24 ` Jens Axboe
2020-10-29  7:51 ` Christoph Hellwig
2020-10-29  8:40   ` Ming Lei [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=20201029084027.GA1970901@T590 \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=josef@toxicpanda.com \
    --cc=lining2020x@163.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