Re: btrfs and swap files on SSD's ?

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

 



On Tue, 2009-01-20 at 09:35 -0700, Anthony Roberts wrote:
> > The second is an implementation detail of the linux swap file code.  It
> > expects filesystems don't move blocks around, and takes a mapping of the
> > blocks in the FS once.
> > 
> > This doesn't work with btrfs because we do move blocks around all the
> > time.
> 
> That's interesting. I have a few questions:
> 
> -Is creating a loopback device from the file any different, or does that
> lead to the same problems?

The loopback device would probably work.  At least it would cover blocks
that move around.

> 
> -Would mounting a filesystem image via loopback device cause similar
> problems?

loopback goes through safer APIs.

> 
> -Would this be viable if using a dedicated nodatacow subvolume, or is that
> still too risky because of the odd case where you do cow?

nodatacow is allowed to COW  when there are snapshots or clones.  I
wouldn't recommend swapfiles on it just because people can easily forget
about the swapfile restriction.

I plan on sending a patch to at least disable swapfiles for btrfs in
this kernel cycle.  Later on we can work out the swap bmapping apis with
the VM maintainers.

> 
> -Does online defragmentation hurt this as well?
> 

Yes.  Online defrag in XFS may have problems with this too, I'm asking
the xfs people if they have worked around this.

-chris


--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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