Re: [PATCH] generic: add test for fsync of directory after creating hard link

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



On Mon, Jun 11, 2018 at 07:24:35PM +0100, fdmanana@xxxxxxxxxx wrote:
> From: Filipe Manana <fdmanana@xxxxxxxx>
> 
> Test that if we create a new hard link for a file which was previously
> fsync'ed, fsync a parent directory of the new hard link and power fail,
> the parent directory exists after mounting the filesystem again. The
> parent directory must be a new directory, not yet persisted.
> 
> This test is motivated by a bug found in btrfs, where the fsync'ed parent
> directory was lost after a power failure. The bug in btrfs is fixed by a
> patch for the linux kernel titled:
> 
>  "Btrfs: sync log after logging new name"
> 
> Signed-off-by: Filipe Manana <fdmanana@xxxxxxxx>

Looks good to me.

> ---
>  tests/generic/498     | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  tests/generic/498.out |  2 ++
>  tests/generic/group   |  1 +
>  3 files changed, 68 insertions(+)
>  create mode 100755 tests/generic/498
>  create mode 100644 tests/generic/498.out
> 
> diff --git a/tests/generic/498 b/tests/generic/498
> new file mode 100755
> index 00000000..1cf73bda
> --- /dev/null
> +++ b/tests/generic/498
> @@ -0,0 +1,65 @@
> +#! /bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +# Copyright (C) 2018 SUSE Linux Products GmbH. All Rights Reserved.
> +#
> +# FS QA Test No. 498
> +#
> +# Test that if we create a new hard link for a file which was previously
> +# fsync'ed, fsync a parent directory of the new hard link and power fail,
> +# the parent directory exists after mounting the filesystem again.
> +#

Thanks a lot for using new test template!

Eryu
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux