Re: [PATCH] nbd: don't update block size after device is started

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux