btrfs / btrfs-todo

An issues only repo to organize our TODO items
21 stars 2 forks source link

Support swap without NODATACOW #30

Open DemiMarie opened 2 years ago

DemiMarie commented 2 years ago

Swap on btrfs currently requires NODATACOW, which implies NODATASUM. bcachefs will be able to do swap with the normal I/O path, including CoW and checksumming. This is an RFE for btrfs to have the same ability.

kdave commented 2 years ago

IIRC it should be possible to wire the reads/writes to direct io, but this was not available at the time the support was added initially.

DemiMarie commented 2 years ago

IIRC it should be possible to wire the reads/writes to direct io, but this was not available at the time the support was added initially.

It is, but this is only safe if btrfs does not need to allocate memory in the write path. Otherwise, a deadlock may result.