On Sun, Apr 28, 2024 at 07:58:23PM +0100, Al Viro wrote: > On Wed, Apr 17, 2024 at 02:47:14PM +0200, Stefan Haberland wrote: > > > set_blocksize() does basically also set i_blkbits like it was before. > > The dasd_format ioctl does only work on a disabled device. To achieve this > > all partitions need to be unmounted. > > The tooling also refuses to work on disks actually in use. > > > > So there should be no page cache to evict. > > You mean this? > if (base->state != DASD_STATE_BASIC) { > pr_warn("%s: The DASD cannot be formatted while it is enabled\n", > dev_name(&base->cdev->dev)); > return -EBUSY; > } > > OK, but what would prevent dasd_ioctl_disable() from working while > disk is in use? And I don't see anything that would evict the > page cache in dasd_ioctl_disable() either, actually... > > What am I missing here? BTW, you are updating block size according to new device size, before rc = base->discipline->format_device(base, fdata, 1); if (rc == -EAGAIN) rc = base->discipline->format_device(base, fdata, 0); Unless something very unidiomatic is going on, this attempt to format might fail...