Re: [RFC PATCH V3 1/1] block: reject I/O for same fd if block size changed

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

 



On Mon, Jan 04, 2021 at 10:06:59PM +0900, Minwoo Im wrote:
> +	if (q->backing_dev_info && q->backing_dev_info->owner &&
> +			limits->logical_block_size != size) {
> +		bdev = blkdev_get_no_open(q->backing_dev_info->owner->devt);
> +		bdev->bd_disk->flags |= GENHD_FL_BLOCK_SIZE_CHANGED;
> +		blkdev_put_no_open(bdev);
> +	}

We really need the backpointer from the queue to the gendisk I've wanted
to add for a while.  Can we at least restrict this to a live gendisk?

Also I think the size change flag should go into the ->state field and
use the atomic bitops helpers to avoid concurrency problems.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux