Re: [PATCH v8 6/6] Btrfs: support swap files

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

 



On Thu, Sep 20, 2018 at 10:22:57AM -0700, Omar Sandoval wrote:
> > > +	/*
> > > +	 * Balance or device remove/replace/resize can move stuff around from
> > > +	 * under us. The EXCL_OP flag makes sure they aren't running/won't run
> > > +	 * concurrently while we are mapping the swap extents, and
> > > +	 * fs_info->swapfile_pins prevents them from running while the swap file
> > > +	 * is active and moving the extents. Note that this also prevents a
> > > +	 * concurrent device add which isn't actually necessary, but it's not
> > > +	 * really worth the trouble to allow it.
> > > +	 */
> > > +	if (test_and_set_bit(BTRFS_FS_EXCL_OP, &fs_info->flags))
> > > +		return -EBUSY;
> > 
> > This could be also accompanied by a message, "why does not my swapfile
> > activate?" -> "there's an exclusive operation running". I've checked if
> > there are similar messages for the other exclusive ops. There are.
> 
> Sounds good. I addressed all of your comments and pushed to
> https://github.com/osandov/linux/tree/btrfs-swap. The only thing I
> didn't change was the btrfs_info about not being able to relocate an
> active swapfile. I think it makes sense as btrfs_info since we already
> log every block group we are relocating as info (see
> describe_relocation()).

Ok, then it's consistent with the relocation mesages. I'll do another
pass just to see if the log level is sane for all messages but this can
be tuned later too, so this is only a minor issue.



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux