Re: [fstests PATCH v4 3/4] dm-log-writes: allow DAX to be used when possible

2017-11-17 Thread Eryu Guan
On Fri, Nov 17, 2017 at 01:28:27PM -0700, Ross Zwisler wrote: > Enhance _require_dm_target so that a user can request a minimum version of a > given dm target. > > DAX support was added to v1.1.0 of the dm-log-writes kernel module, so > allow the DAX mount option starting with that version. Is

Re: [xfsprogs PATCH 2/2] xfs_io: add a new 'log_writes' command

2017-11-17 Thread Eric Sandeen
On 11/17/17 3:14 PM, Ross Zwisler wrote: > On Fri, Nov 17, 2017 at 03:03:39PM -0600, Eric Sandeen wrote: >> On 11/17/17 2:48 PM, Ross Zwisler wrote: >>> On Fri, Nov 17, 2017 at 02:39:07PM -0600, Eric Sandeen wrote: On 11/17/17 2:25 PM, Ross Zwisler wrote: > Add a new 'log_writes'

Re: [fstests PATCH v4 2/4] dm-log-writes: only replay log to marks that exist

2017-11-17 Thread Eryu Guan
On Fri, Nov 17, 2017 at 01:28:26PM -0700, Ross Zwisler wrote: > The 'replay-log' executable will replay the dm-log-writes log until the > given mark, or until the end of the log if the mark isn't found. > > This means that if the mark you're looking for was never inserted in the > log or if you

Re: [xfsprogs PATCH 1/2] xfs_io: add MAP_SYNC support to mmap()

2017-11-17 Thread Ross Zwisler
On Fri, Nov 17, 2017 at 12:40:21PM -0800, Darrick J. Wong wrote: > On Fri, Nov 17, 2017 at 01:25:23PM -0700, Ross Zwisler wrote: > > Add support for a new -S flag to xfs_io's mmap command. This opens the > > mapping with the (MAP_SYNC | MAP_SHARED_VALIDATE) flags instead of the > > standard

Re: [xfsprogs PATCH 1/2] xfs_io: add MAP_SYNC support to mmap()

2017-11-17 Thread Ross Zwisler
On Fri, Nov 17, 2017 at 12:35:43PM -0800, Dan Williams wrote: > On Fri, Nov 17, 2017 at 12:25 PM, Ross Zwisler > wrote: > > Add support for a new -S flag to xfs_io's mmap command. This opens the > > mapping with the (MAP_SYNC | MAP_SHARED_VALIDATE) flags instead of

Re: [xfsprogs PATCH 2/2] xfs_io: add a new 'log_writes' command

2017-11-17 Thread Ross Zwisler
On Fri, Nov 17, 2017 at 03:03:39PM -0600, Eric Sandeen wrote: > On 11/17/17 2:48 PM, Ross Zwisler wrote: > > On Fri, Nov 17, 2017 at 02:39:07PM -0600, Eric Sandeen wrote: > >> On 11/17/17 2:25 PM, Ross Zwisler wrote: > >>> Add a new 'log_writes' command to xfs_io so that we can add dm-log-writes >

Re: [xfsprogs PATCH 2/2] xfs_io: add a new 'log_writes' command

2017-11-17 Thread Eric Sandeen
On 11/17/17 2:48 PM, Ross Zwisler wrote: > On Fri, Nov 17, 2017 at 02:39:07PM -0600, Eric Sandeen wrote: >> On 11/17/17 2:25 PM, Ross Zwisler wrote: >>> Add a new 'log_writes' command to xfs_io so that we can add dm-log-writes >>> log marks via the external 'dmsetup' executable. It's helpful to

Re: [xfsprogs PATCH 2/2] xfs_io: add a new 'log_writes' command

2017-11-17 Thread Ross Zwisler
On Fri, Nov 17, 2017 at 02:39:07PM -0600, Eric Sandeen wrote: > On 11/17/17 2:25 PM, Ross Zwisler wrote: > > Add a new 'log_writes' command to xfs_io so that we can add dm-log-writes > > log marks via the external 'dmsetup' executable. It's helpful to allow > > users of xfs_io to adds these marks

Re: [xfsprogs PATCH 2/2] xfs_io: add a new 'log_writes' command

2017-11-17 Thread Darrick J. Wong
On Fri, Nov 17, 2017 at 01:25:24PM -0700, Ross Zwisler wrote: > Add a new 'log_writes' command to xfs_io so that we can add dm-log-writes > log marks via the external 'dmsetup' executable. It's helpful to allow > users of xfs_io to adds these marks from within xfs_io instead of waiting > until

Re: [xfsprogs PATCH 1/2] xfs_io: add MAP_SYNC support to mmap()

2017-11-17 Thread Darrick J. Wong
On Fri, Nov 17, 2017 at 01:25:23PM -0700, Ross Zwisler wrote: > Add support for a new -S flag to xfs_io's mmap command. This opens the > mapping with the (MAP_SYNC | MAP_SHARED_VALIDATE) flags instead of the > standard MAP_SHARED flag. > > Signed-off-by: Ross Zwisler

Re: [xfsprogs PATCH 2/2] xfs_io: add a new 'log_writes' command

2017-11-17 Thread Eric Sandeen
On 11/17/17 2:25 PM, Ross Zwisler wrote: > Add a new 'log_writes' command to xfs_io so that we can add dm-log-writes > log marks via the external 'dmsetup' executable. It's helpful to allow > users of xfs_io to adds these marks from within xfs_io instead of waiting > until after xfs_io exits

Re: [xfsprogs PATCH 1/2] xfs_io: add MAP_SYNC support to mmap()

2017-11-17 Thread Dan Williams
On Fri, Nov 17, 2017 at 12:25 PM, Ross Zwisler wrote: > Add support for a new -S flag to xfs_io's mmap command. This opens the > mapping with the (MAP_SYNC | MAP_SHARED_VALIDATE) flags instead of the > standard MAP_SHARED flag. > > Signed-off-by: Ross Zwisler

[fstests PATCH v4 3/4] dm-log-writes: allow DAX to be used when possible

2017-11-17 Thread Ross Zwisler
Enhance _require_dm_target so that a user can request a minimum version of a given dm target. DAX support was added to v1.1.0 of the dm-log-writes kernel module, so allow the DAX mount option starting with that version. Signed-off-by: Ross Zwisler Suggested-by:

[fstests PATCH v4 1/4] common/rc: add _scratch_has_mount_option()

2017-11-17 Thread Ross Zwisler
Allow tests to inquire about whether a mount option is set, rather than just disallowing it via _exclude_scratch_mount_option(). Signed-off-by: Ross Zwisler Suggested-by: Amir Goldstein --- common/rc | 10 ++ 1 file changed, 10

[fstests PATCH v4 2/4] dm-log-writes: only replay log to marks that exist

2017-11-17 Thread Ross Zwisler
The 'replay-log' executable will replay the dm-log-writes log until the given mark, or until the end of the log if the mark isn't found. This means that if the mark you're looking for was never inserted in the log or if you give garbage to _log_writes_replay_log() the entire log will be replayed.

[fstests PATCH v4 4/4] generic: add test for DAX MAP_SYNC support

2017-11-17 Thread Ross Zwisler
This test creates a file and writes to it via an mmap(), but never syncs via fsync/msync. This process is tracked via dm-log-writes, then replayed. If MAP_SYNC is working the dm-log-writes replay will show the test file with 1 MiB of on-media block allocations. This is because each allocating

[fstests PATCH v4 0/4] add test for DAX MAP_SYNC support

2017-11-17 Thread Ross Zwisler
The purpose of this series is to exercise the new MAP_SYNC mmap() functionality [1]. It adds a test which uses dm-log-writes to try and replay filesystem metadata operations for a file that is being written via mmap(). If MAP_SYNC is active the dm-log-writes replay will recreate the file's block

[xfsprogs PATCH 0/2] Add necessary items for MAP_SYNC testing

2017-11-17 Thread Ross Zwisler
As suggested by Dave Chinner: As I say to all these sorts of one-off test prgrams: please add the new MAP_SYNC flag to xfs_io rather than writing a one-off test program to set it and write some data. And if we're going to be adding special custom tests just because we need to

[xfsprogs PATCH 2/2] xfs_io: add a new 'log_writes' command

2017-11-17 Thread Ross Zwisler
Add a new 'log_writes' command to xfs_io so that we can add dm-log-writes log marks via the external 'dmsetup' executable. It's helpful to allow users of xfs_io to adds these marks from within xfs_io instead of waiting until after xfs_io exits because then they are able to replay the