Re: [PATCH v2 00/15] btrfs dax support

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

 



On Tue, Mar 26, 2019 at 02:09:08PM -0500, Goldwyn Rodrigues wrote:
> This patch set adds support for dax on the BTRFS filesystem.

This patchset doesn't seem to support MAP_SYNC, which is the usual way to
use (and detect) DAX.  Basically, it requests for page faults to be
synchronous -- ie, when a page fault returns, the mapping points to actual
memory rather than to some buffer that'll be written back to the destination
at some point in the future.

Also, not really understanding these parts of the kernel, I can't tell if
the snapshots are atomic.  Ie, while the kernel walks over pages to set
mprotect flags, the process does two writes:
   RRRRRRRRRRRRRRRRRRRWWWWWWWWWWWWWWWWWWWWWW (R=ro W=rw)
        A                       B
The write at A causes a page fault, which clones the page, CoWing it and
letting the write into only one of the replicas.  After this, write to B
happens before the mprotect, thus goes into both replicas -- and despite
the process having issued proper memory barriers, the other replica has
B but not A.  To fix this, earlier page faults can't get finalized until
all mprotects are in place.  (I'm writing this as a query rather than a
problem report -- I'm an ignoramus here.)


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Did ya know that typing "test -j8" instead of "ctest -j8"
⢿⡄⠘⠷⠚⠋⠀ will make your testsuite pass much faster, and fix bugs?
⠈⠳⣄⠀⠀⠀⠀



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux