public inbox for linux-unionfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Chengguang Xu <cgxu519@icloud.com>
Cc: eguan@redhat.com, amir73il@gmail.com, fstests@vger.kernel.org,
	linux-unionfs@vger.kernel.org
Subject: Re: [PATCH v2 1/3] common/rc: add scratch shutdown support for overlayfs
Date: Fri, 8 Dec 2017 11:05:45 +1100	[thread overview]
Message-ID: <20171208000545.GK5858@dastard> (raw)
In-Reply-To: <1512613327-218016-1-git-send-email-cgxu519@icloud.com>

On Thu, Dec 07, 2017 at 10:22:05AM +0800, Chengguang Xu wrote:
> Signed-off-by: Chengguang Xu <cgxu519@icloud.com>

Commit message explaining why overlay requires special handling?

> ---
> 
> Changes since v1:
> _scratch_shutdown() does not call notrun.
> 
>  common/rc | 24 ++++++++++++++++++++++--
>  1 file changed, 22 insertions(+), 2 deletions(-)
> 
> diff --git a/common/rc b/common/rc
> index 4c053a5..911dba3 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -382,6 +382,15 @@ _scratch_cycle_mount()
>      _scratch_mount "$opts"
>  }
>  
> +_scratch_shutdown()
> +{
> +	if [ $FSTYP = "overlay" ]; then
> +		src/godown -f $OVL_BASE_SCRATCH_MNT
> +	else
> +		src/godown -f $SCRATCH_MNT
> +	fi
> +}
> +
>  _test_mount()
>  {
>      if [ "$FSTYP" == "overlay" ]; then
> @@ -2908,8 +2917,19 @@ _require_scratch_shutdown()
>  
>  	_scratch_mkfs > /dev/null 2>&1
>  	_scratch_mount
> -	src/godown -f $SCRATCH_MNT 2>&1 \
> -		|| _notrun "$FSTYP does not support shutdown"
> +
> +	if [ $FSTYP = "overlay" ]; then
> +		if [ -z $OVL_BASE_SCRATCH_DEV ]; then
> +			_notrun "$SCRATCH_DEV is not a block device"
> +		else
> +			src/godown -f $OVL_BASE_SCRATCH_MNT 2>&1 \
> +			|| _notrun "Underlying filesystem does not support shutdown"
> +		fi
> +	else
> +		src/godown -f $SCRATCH_MNT 2>&1 \
> +			|| _notrun "$FSTYP does not support shutdown"
> +	fi

Comment explaining why overlay requires special handling.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

      parent reply	other threads:[~2017-12-08  0:07 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07  2:22 [PATCH v2 1/3] common/rc: add scratch shutdown support for overlayfs Chengguang Xu
2017-12-07  2:22 ` [PATCH v2 2/3] common/rc: add a check case in _require_xfs_io_command() to support syncfs Chengguang Xu
2017-12-07  2:22 ` [PATCH v2 3/3] generic/470: add syncfs test Chengguang Xu
2017-12-07  3:04   ` Amir Goldstein
2017-12-07  3:31     ` Chengguang Xu
2017-12-07  3:43       ` Amir Goldstein
2017-12-07  5:44   ` Eryu Guan
2017-12-07  6:20     ` Chengguang Xu
2017-12-07  7:13       ` Eryu Guan
2017-12-07  7:42         ` Chengguang Xu
2017-12-07  8:17           ` Amir Goldstein
2017-12-11 10:03             ` Chengguang Xu
2017-12-11 10:46               ` Amir Goldstein
2017-12-11 12:33                 ` Chengguang Xu
2017-12-11 12:44                   ` Amir Goldstein
2017-12-11 13:20                     ` Chengguang Xu
2017-12-11 14:31                       ` Chengguang Xu
2017-12-11 14:47                         ` Amir Goldstein
2017-12-12  0:18                     ` Dave Chinner
2017-12-07  2:54 ` [PATCH v2 1/3] common/rc: add scratch shutdown support for overlayfs Amir Goldstein
2017-12-07  5:31 ` Eryu Guan
2017-12-08  0:05 ` Dave Chinner [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=20171208000545.GK5858@dastard \
    --to=david@fromorbit.com \
    --cc=amir73il@gmail.com \
    --cc=cgxu519@icloud.com \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --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