From: "Luís Henriques" <lhenriques@suse.de>
To: Zorro Lang <zlang@redhat.com>
Cc: fstests@vger.kernel.org, ceph-devel@vger.kernel.org
Subject: Re: [PATCH v2] ceph/001: skip metrics check if no copyfrom mount option is used
Date: Tue, 7 Jun 2022 15:33:07 +0100 [thread overview]
Message-ID: <Yp9ho/m0m3Su8ZzA@suse.de> (raw)
In-Reply-To: <20220524165926.dkighy46hi75mg6s@zlang-mailbox>
On Wed, May 25, 2022 at 12:59:26AM +0800, Zorro Lang wrote:
> On Tue, May 24, 2022 at 10:42:56AM +0100, Luís Henriques wrote:
> > Checking the metrics is only valid if 'copyfrom' mount option is
> > explicitly set, otherwise the kernel won't be doing any remote object
> > copies. Fix the logic to skip this metrics checking if 'copyfrom' isn't
> > used.
> >
> > Signed-off-by: Luís Henriques <lhenriques@suse.de>
> > ---
> > tests/ceph/001 | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > Changes since v1:
> > - Quoted 'hascopyfrom' variable in 'if' statement; while there, added
> > quotes to the 'if' statement just above.
>
> Good to me,
> Reviewed-by: Zorro Lang <zlang@redhat.com>
Ping.
Cheers,
--
Luís
> >
> > diff --git a/tests/ceph/001 b/tests/ceph/001
> > index 7970ce352bab..060c4c450091 100755
> > --- a/tests/ceph/001
> > +++ b/tests/ceph/001
> > @@ -86,11 +86,15 @@ check_copyfrom_metrics()
> > local copies=$4
> > local c1=$(get_copyfrom_total_copies)
> > local s1=$(get_copyfrom_total_size)
> > + local hascopyfrom=$(_fs_options $TEST_DEV | grep "copyfrom")
> > local sum
> >
> > - if [ ! -d $metrics_dir ]; then
> > + if [ ! -d "$metrics_dir" ]; then
> > return # skip metrics check if debugfs isn't mounted
> > fi
> > + if [ -z "$hascopyfrom" ]; then
> > + return # ... or if we don't have copyfrom mount option
> > + fi
> >
> > sum=$(($c0+$copies))
> > if [ $sum -ne $c1 ]; then
> >
>
next prev parent reply other threads:[~2022-06-07 14:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-24 9:42 [PATCH v2] ceph/001: skip metrics check if no copyfrom mount option is used Luís Henriques
2022-05-24 16:59 ` Zorro Lang
2022-06-07 14:33 ` Luís Henriques [this message]
2022-06-07 14:57 ` Luís Henriques
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=Yp9ho/m0m3Su8ZzA@suse.de \
--to=lhenriques@suse.de \
--cc=ceph-devel@vger.kernel.org \
--cc=fstests@vger.kernel.org \
--cc=zlang@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.