linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Chengguang Xu <cgxu519@mykernel.net>
Cc: Eryu Guan <guaneryu@gmail.com>, fstests <fstests@vger.kernel.org>,
	overlayfs <linux-unionfs@vger.kernel.org>
Subject: Re: [PATCH] overlay/079: test for parent directory consistancy in copy-up
Date: Sat, 26 Feb 2022 20:44:32 +0200	[thread overview]
Message-ID: <CAOQ4uxjs83s7YdMFLTYOA2BOODme4XSymQHzDQ4DEgG4zQ7ykw@mail.gmail.com> (raw)
In-Reply-To: <20220226152520.289069-1-cgxu519@mykernel.net>

On Sat, Feb 26, 2022 at 8:15 PM Chengguang Xu <cgxu519@mykernel.net> wrote:
>
> Make sure the change for parent direcotry get synced in copy-up.
>
> Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
> ---
>  tests/overlay/079     | 50 +++++++++++++++++++++++++++++++++++++++++++
>  tests/overlay/079.out |  2 ++
>  2 files changed, 52 insertions(+)
>  create mode 100755 tests/overlay/079
>  create mode 100644 tests/overlay/079.out
>
> diff --git a/tests/overlay/079 b/tests/overlay/079
> new file mode 100755
> index 00000000..c542cfc9
> --- /dev/null
> +++ b/tests/overlay/079
> @@ -0,0 +1,50 @@
> +#! /bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +# Copyright (c) 2022 Chengguang Xu <cgxu519@mykernel.net>.
> +# All Rights Reserved.
> +#
> +# FS QA Test 079
> +#
> +# Test copy up consistency for parent directory.
> +#
> +. ./common/preamble
> +_begin_fstest copyup quick
> +
> +# get standard environment, filters and checks
> +. ./common/rc
> +. ./common/filter
> +
> +# remove previous $seqres.full before test
> +rm -f $seqres.full
> +
> +# real QA test starts here
> +
> +# Modify as appropriate.
> +_supported_fs overlay
> +_require_scratch
> +#_require_command "$FLOCK_PROG" flock
> +_require_scratch_shutdown
> +
> +
> +# Remove all files from previous tests
> +_scratch_mkfs
> +
> +lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER
> +upperdir=$OVL_BASE_SCRATCH_MNT/$OVL_UPPER
> +mkdir -p $lowerdir/foo_dir
> +echo a > /tmp/foo
> +echo a > $lowerdir/foo_dir/foo
> +
> +# Mounting overlay
> +_scratch_mount
> +
> +touch $SCRATCH_MNT/foo_dir/foo
> +_scratch_shutdown
> +_scratch_cycle_mount
> +
> +echo "Silence is golden"
> +diff /tmp/foo $upperdir/foo_dir/foo
> +

NACK.

Absolutely no reason for us to guarantee that file is copied up
if the user did not request explicit sync on the file or the directory.

Really, what is driving you to make this change and test?
If it is a real world use case, then please encode the real use case
in the form of a test.

Thanks,
Amir.

      reply	other threads:[~2022-02-26 18:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-26 15:25 [PATCH] overlay/079: test for parent directory consistancy in copy-up Chengguang Xu
2022-02-26 18:44 ` Amir Goldstein [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOQ4uxjs83s7YdMFLTYOA2BOODme4XSymQHzDQ4DEgG4zQ7ykw@mail.gmail.com \
    --to=amir73il@gmail.com \
    --cc=cgxu519@mykernel.net \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=linux-unionfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).