public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Lukas Czerner <lczerner@redhat.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: "Darrick J. Wong" <darrick.wong@oracle.com>,
	linux-ext4@vger.kernel.org, Paul Menzel <pmenzel@molgen.mpg.de>
Subject: Re: [PATCH] e2scrub_all: refactor device probe loop
Date: Thu, 21 Mar 2019 11:15:21 +0100	[thread overview]
Message-ID: <20190321101521.pej52dcrvf635gt2@work> (raw)
In-Reply-To: <20190320161708.GA32021@mit.edu>

On Wed, Mar 20, 2019 at 12:17:08PM -0400, Theodore Ts'o wrote:
> On Tue, Mar 19, 2019 at 11:58:24AM +0100, Lukas Czerner wrote:
> > >  # Find scrub targets, make sure we only do this once.
> > > -ls_scrub_targets() {
> > > -	lsblk -o NAME,FSTYPE,MOUNTPOINT -p -P -n | while read vars; do
> > > +ls_scan_targets() {
> > > +	lvs --name-prefixes -o vg_name,lv_name,lv_path \
> > > +			-S lv_active=active,lv_role=public --noheadings | \
> > 
> > You're not using vg_name, nor lv_name so you can drop it maybe ? Also
> > you're missing lv_role since you're checking it later, however you can
> > do this instead
> > 
> > 	-S lv_active=active,lv_role=public -S lv_role!=snapshot
> 
> We don't need to check lv_role at all, since the command already
> included:
> 
> 	-S lv_active=active,lv_role=public

You actually need to check the lv_role for snapshot, because snapshot can
be "public" as well.

> 
> And we need to do lv_role=public and not lv_role!=snapshot, since we
> need to also exclude thinpools.

No, you need to check both if you want to exclude snapshots.


I think that specifying -S twice tricked you, sorry about that. But
again you can do:

	-S lv_active=active,lv_role=public,lv_role!=snapshot

Thanks!
-Lukas

      reply	other threads:[~2019-03-21 10:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-19  0:17 [PATCH] e2scrub_all: refactor device probe loop Darrick J. Wong
2019-03-19 10:58 ` Lukas Czerner
2019-03-20 16:17   ` Theodore Ts'o
2019-03-21 10:15     ` Lukas Czerner [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=20190321101521.pej52dcrvf635gt2@work \
    --to=lczerner@redhat.com \
    --cc=darrick.wong@oracle.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=pmenzel@molgen.mpg.de \
    --cc=tytso@mit.edu \
    /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