Re: [PATCH 5/9] block: introduce holder ops

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

 



On Fri, May 05, 2023 at 11:51:19AM -0700, Darrick J. Wong wrote:
> Fun question: What happens when the swap disk falls off the bus?

Your system is toast.

> > -	if (IS_ERR(blkdev_get_by_dev(bdev->bd_dev, mode | FMODE_EXCL, &bdev)))
> > +	if (IS_ERR(blkdev_get_by_dev(bdev->bd_dev, mode | FMODE_EXCL, &bdev,
> > +			NULL)))
> >  		return -EBUSY;
> >  	ret = set_blocksize(bdev, n);
> >  	blkdev_put(bdev, mode | FMODE_EXCL);
> 
> Somewhat related question: Should we allow userspace to initiate a fs
> shutdown through the block device?  Let's say you're preparing to yank
> /dev/sda and want to kill anything attached to it or its partitions?
> Without having to walk through however many mount namespaces there are
> to find the mountpoints?

That's kinda what we're doing here.  Or do you mean even more advanced
notice by having another callout before stopping I/O so that we could
write out all log buffers?  It's probably doable, but I'm not convinced
that this use case is worth maintaining and testing the kernel code for
it.



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

  Powered by Linux