Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1654222 > unrolled thread

[xfstests PATCH v3 0/5] add a test for reporting writeback errors across all fds on fsync

Started byJeff Layton <jlayton@redhat.com>
First post2017-05-31 15:10 +0200
Last post2017-06-06 11:10 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [xfstests PATCH v3 0/5] add a test for reporting writeback errors across all fds on fsync Jeff Layton <jlayton@redhat.com> - 2017-05-31 15:10 +0200
    [xfstests PATCH v3 2/5] ext4: allow ext4 to use $SCRATCH_LOGDEV Jeff Layton <jlayton@redhat.com> - 2017-05-31 15:20 +0200
      Re: [xfstests PATCH v3 2/5] ext4: allow ext4 to use $SCRATCH_LOGDEV Eryu Guan <eguan@redhat.com> - 2017-06-06 11:10 +0200

#1654222 — [xfstests PATCH v3 0/5] add a test for reporting writeback errors across all fds on fsync

FromJeff Layton <jlayton@redhat.com>
Date2017-05-31 15:10 +0200
Subject[xfstests PATCH v3 0/5] add a test for reporting writeback errors across all fds on fsync
Message-ID<tNbxT-5ao-13@gated-at.bofh.it>
This patchset is a companion to the Linux kernel patch series I recently
posted with the cover letter:

    [PATCH v5 00/17] fs: introduce new writeback error reporting and convert ext2 and ext4 to use it

That patchset adds a new userland-visible change to report errors on
all open file descriptions when there is an error on fsync, not just
the first one to race in.

Note that this set contains a patch to emulate $SCRATCH_LOGDEV on btrfs,
but the kernel patches for that are not quite ready yet. The test did
pass on btrfs in an earlier incarnation of the set, however.

Jeff Layton (5):
  generic: add a writeback error handling test
  ext4: allow ext4 to use $SCRATCH_LOGDEV
  generic: test writeback error handling on dmerror devices
  ext3: allow it to put journal on a separate device when doing
    scratch_mkfs
  btrfs: allow it to use $SCRATCH_LOGDEV

 common/dmerror             |  13 ++--
 common/rc                  |  16 ++++-
 doc/auxiliary-programs.txt |   8 +++
 src/Makefile               |   2 +-
 src/fsync-err.c            | 161 +++++++++++++++++++++++++++++++++++++++++++++
 tests/generic/998          |  64 ++++++++++++++++++
 tests/generic/998.out      |   2 +
 tests/generic/999          |  76 +++++++++++++++++++++
 tests/generic/999.out      |   3 +
 tests/generic/group        |   2 +
 tools/dmerror              |  44 +++++++++++++
 11 files changed, 384 insertions(+), 7 deletions(-)
 create mode 100644 src/fsync-err.c
 create mode 100755 tests/generic/998
 create mode 100644 tests/generic/998.out
 create mode 100755 tests/generic/999
 create mode 100644 tests/generic/999.out
 create mode 100755 tools/dmerror

-- 
2.9.4

[toc] | [next] | [standalone]


#1654224 — [xfstests PATCH v3 2/5] ext4: allow ext4 to use $SCRATCH_LOGDEV

FromJeff Layton <jlayton@redhat.com>
Date2017-05-31 15:20 +0200
Subject[xfstests PATCH v3 2/5] ext4: allow ext4 to use $SCRATCH_LOGDEV
Message-ID<tNbHA-5dQ-13@gated-at.bofh.it>
In reply to#1654222
The writeback error handling test requires that you put the journal on a
separate device. This allows us to use dmerror to simulate data
writeback failure, without affecting the journal.

xfs already has infrastructure for this (a'la $SCRATCH_LOGDEV), so wire
up the ext4 code so that it can do the same thing when _scratch_mkfs is
called.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 common/rc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/rc b/common/rc
index 743df427c047..391d36f373cd 100644
--- a/common/rc
+++ b/common/rc
@@ -676,6 +676,9 @@ _scratch_mkfs_ext4()
 	local tmp=`mktemp`
 	local mkfs_status
 
+	[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
+	    $mkfs_cmd -O journal_dev $SCRATCH_LOGDEV && \
+	    mkfs_cmd="$mkfs_cmd -J device=$SCRATCH_LOGDEV"
 
 	_scratch_do_mkfs "$mkfs_cmd" "$mkfs_filter" $* 2>$tmp.mkfserr 1>$tmp.mkfsstd
 	mkfs_status=$?
-- 
2.9.4

[toc] | [prev] | [next] | [standalone]


#1658502 — Re: [xfstests PATCH v3 2/5] ext4: allow ext4 to use $SCRATCH_LOGDEV

FromEryu Guan <eguan@redhat.com>
Date2017-06-06 11:10 +0200
SubjectRe: [xfstests PATCH v3 2/5] ext4: allow ext4 to use $SCRATCH_LOGDEV
Message-ID<tPiEW-6IR-15@gated-at.bofh.it>
In reply to#1654224
On Wed, May 31, 2017 at 09:08:17AM -0400, Jeff Layton wrote:
> The writeback error handling test requires that you put the journal on a
> separate device. This allows us to use dmerror to simulate data
> writeback failure, without affecting the journal.
> 
> xfs already has infrastructure for this (a'la $SCRATCH_LOGDEV), so wire
> up the ext4 code so that it can do the same thing when _scratch_mkfs is
> called.
> 
> Signed-off-by: Jeff Layton <jlayton@redhat.com>
> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  common/rc | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/common/rc b/common/rc
> index 743df427c047..391d36f373cd 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -676,6 +676,9 @@ _scratch_mkfs_ext4()
>  	local tmp=`mktemp`
>  	local mkfs_status
>  
> +	[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
> +	    $mkfs_cmd -O journal_dev $SCRATCH_LOGDEV && \
> +	    mkfs_cmd="$mkfs_cmd -J device=$SCRATCH_LOGDEV"

Need $MKFS_OPTIONS too when creating journal device, otherwise mkfs will
fail when making non-default block size ext4, i.e. journal device has 4k
block size, but ext4 has 1k block size if we have MKFS_OPTIONS="-b 1024"

Thanks,
Eryu

>  
>  	_scratch_do_mkfs "$mkfs_cmd" "$mkfs_filter" $* 2>$tmp.mkfserr 1>$tmp.mkfsstd
>  	mkfs_status=$?
> -- 
> 2.9.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web