On Wed, Dec 07, 2016 at 05:15:42PM -0500, Chris Mason wrote: > > > On 12/07/2016 04:45 PM, Liu Bo wrote: > > This has implemented DAX support for btrfs with nocow and single-device. > > > > DAX is developed for block devices that are memory-like in order to avoid > > double buffer in both page cache and the storage, so DAX can performs reads > > and > > writes directly to the storage device, and for those who prefer to using > > filesystem, filesystem dax support can help to map the storage into > > userspace > > for file-mapping. > > > > Since I haven't figure out how to map multiple devices to userspace without > > pagecache, this DAX support is only for single-device, and I don't think > > DAX(Direct Access) can work with cow, this is limited to nocow case. I made > > this by setting nodatacow in dax mount option. > > Interesting, this is a nice small start. It might make more sense to limit > snapshots to readonly in DAX mode until we can figure out how to cow > properly.
Sounds good and easy to do. > I think it can be done, I just need to sit down with the dax code > to do a good review. > > But bigger picture, if we can't cow and we can't crc and we can't > multi-device, I'd rather let XFS/ext4 sort out the dax space until we pull > in more of the btrfs features too. Well, I agree with that, initially I thought dax doesn't fit with btrfs's expectation as it's mainly used to bypass kernel stuff and offers a bridge between application and pmem devices, but one benefit I forgot to mention in the commit log is that btrfs can do DUP metadata which is mirroring, and it has a slightly bigger chance than ext4/xfs to get metadata corruption fixed online. Thanks, -liubo -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html