public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <guan@eryu.me>
To: Ma Xinjian <xinjianx.ma@intel.com>
Cc: fstests@vger.kernel.org, Philip Li <philip.li@intel.com>,
	kernel test robot <lkp@intel.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 2/2] btrfs/091: remove noinode_cache option
Date: Sun, 24 Oct 2021 21:34:15 +0800	[thread overview]
Message-ID: <YXVg1xoLIvwxcjbD@desktop> (raw)
In-Reply-To: <20210927072019.46609-2-xinjianx.ma@intel.com>

On Mon, Sep 27, 2021 at 03:20:19PM +0800, Ma Xinjian wrote:
> inode cache feature has been removed
> 
> Link: https://www.spinics.net/lists/linux-btrfs/msg107910.html

From above link, the inode cache feathre has been removed since v5.11
kernel, which is relatively a recent kernel,  but old kernels may still
need this noinode_cache mount option.  So we'd better to keep this
check.

We could add check for inode_cache option as well, and only check for
noinode_cache when inode cache is supported.

> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Ma Xinjian <xinjianx.ma@intel.com>
> ---
>  tests/btrfs/091 | 21 +--------------------
>  1 file changed, 1 insertion(+), 20 deletions(-)
> 
> diff --git a/tests/btrfs/091 b/tests/btrfs/091
> index 307289b1..f2cd00b2 100755
> --- a/tests/btrfs/091
> +++ b/tests/btrfs/091
> @@ -23,21 +23,12 @@ _require_cp_reflink
>  # use largest node/leaf size (64K) to allow the test to be run on arch with
>  # page size > 4k.
>  NODESIZE=65536
> -SUPPORT_NOINODE_CACHE="yes"
>  
>  run_check _scratch_mkfs "--nodesize $NODESIZE"
>  
> -# inode cache will also take space in fs tree, disable them to get consistent
> -# result.
>  # discard error output since we will check return value manually.
>  # also disable all compression, or output will mismatch with golden output
> -_try_scratch_mount "-o noinode_cache,compress=no,compress-force=no" 2> /dev/null
> -
> -# Check for old kernel which doesn't support 'noinode_cache' mount option
> -if [ $? -ne 0 ]; then
> -	support_noinode_cache="no"

This seems like a type in the original code, it should be in upper case.

Thanks,
Eryu

> -	_scratch_mount
> -fi
> +_try_scratch_mount "-o compress=no,compress-force=no" 2> /dev/null
>  
>  _run_btrfs_util_prog subvolume create $SCRATCH_MNT/subv1
>  _run_btrfs_util_prog subvolume create $SCRATCH_MNT/subv2
> @@ -46,16 +37,6 @@ _run_btrfs_util_prog subvolume create $SCRATCH_MNT/subv3
>  _run_btrfs_util_prog quota enable $SCRATCH_MNT
>  _run_btrfs_util_prog quota rescan -w $SCRATCH_MNT
>  
> -# if we don't support noinode_cache mount option, then we should double check
> -# whether inode cache is enabled before executing the real test payload.
> -if [ $SUPPORT_NOINODE_CACHE == "no" ]; then
> -	EMPTY_SIZE=`$BTRFS_UTIL_PROG qgroup show $units $SCRATCH_MNT | \
> -		$SED_PROG -n '/[0-9]/p' | $AWK_PROG '{print $2}' | head -n1`
> -	if [ $EMPTY_SIZE != $NODESIZE ]; then
> -		_notrun "Kernel doesn't support to disable inode cache"
> -	fi
> -fi
> -
>  $XFS_IO_PROG -f -c "pwrite 0 256K" $SCRATCH_MNT/subv1/file1 | _filter_xfs_io
>  cp --reflink $SCRATCH_MNT/subv1/file1 $SCRATCH_MNT/subv2/file1
>  cp --reflink $SCRATCH_MNT/subv1/file1 $SCRATCH_MNT/subv3/file1
> -- 
> 2.20.1

  parent reply	other threads:[~2021-10-24 13:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210927072019.46609-1-xinjianx.ma@intel.com>
2021-10-10 13:32 ` [PATCH 1/2] btrfs/049: remove the test Eryu Guan
2021-10-11 10:21   ` David Sterba
     [not found] ` <20210927072019.46609-2-xinjianx.ma@intel.com>
2021-10-24 13:34   ` Eryu Guan [this message]
2021-10-25 13:05     ` [PATCH 2/2] btrfs/091: remove noinode_cache option David Sterba

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=YXVg1xoLIvwxcjbD@desktop \
    --to=guan@eryu.me \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=philip.li@intel.com \
    --cc=xinjianx.ma@intel.com \
    /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