Re: [PATCH] iomap: don't override sis->bdev in xfs_iomap_swapfile_activate

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

 



On Tue, Mar 03, 2020 at 08:51:57AM -0800, Darrick J. Wong wrote:
> On Sun, Mar 01, 2020 at 07:49:25AM -0700, Christoph Hellwig wrote:
> > The swapon code itself sets sis->bdev up early, and performs various check
> > on the block devices.  Changing it later in the fact thus will cause a
> > mismatch of capabilities and must be avoided.
> 
> What kind of mismatch?  Are you talking about the bdi_cap_* and
> blk_queue_nonrot() logic in swapon()?  I wonder how much of that could
> be moved to after the ->swapfile_activate call.

The thing I ran into is the zone check with my zoned XFS prototype
code.  But when you look at the nonrot checks that will cause
resource leaks due to the override, and thus is the main is the
main issue for now.

I suspect much of this could be cleaned up one way or another, but
the layering of this code is horrible, so it would be a bigger
job.

btrfs hasn't picked up the iomap changes yet, but the next resend
should drop the bdev assignment as well.



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux