• Ross Zwisler's avatar
    dm log writes: add support for DAX · 98d82f48
    Ross Zwisler authored
    Now that we have the ability log filesystem writes using a flat buffer, add
    support for DAX.
    
    The motivation for this support is the need for an xfstest that can test
    the new MAP_SYNC DAX flag.  By logging the filesystem activity with
    dm-log-writes we can show that the MAP_SYNC page faults are writing out
    their metadata as they happen, instead of requiring an explicit
    msync/fsync.
    
    Unfortunately we can't easily track data that has been written via
    mmap() now that the dax_flush() abstraction was removed by commit
    c3ca015f ("dax: remove the pmem_dax_ops->flush abstraction").
    Otherwise we could just treat each flush as a big write, and store the
    data that is being synced to media.  It may be worthwhile to add the
    dax_flush() entry point back, just as a notifier so we can do this
    logging.
    Signed-off-by: default avatarRoss Zwisler <ross.zwisler@linux.intel.com>
    Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
    98d82f48
dm-log-writes.c 24.9 KB