From: Dave Chinner <david@fromorbit.com>
To: Eryu Guan <eguan@redhat.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] generic/081: wait for lv to be settled before creating fs on it
Date: Thu, 7 May 2015 09:13:18 +1000 [thread overview]
Message-ID: <20150506231318.GK21261@dastard> (raw)
In-Reply-To: <20150506073251.GF1187@dhcp-13-216.nay.redhat.com>
On Wed, May 06, 2015 at 03:32:51PM +0800, Eryu Guan wrote:
> On Mon, May 04, 2015 at 04:27:08PM +1000, Dave Chinner wrote:
> > On Fri, Apr 03, 2015 at 05:41:15PM +0800, Eryu Guan wrote:
> > > Call 'udevadm settle' or 'udevsettle' or 'sleep 1' to make sure new lv
> > > is ready for use before making filesystem on it, depends on which
> > > command is available on the system.
> > >
> > > Also sleep 1 before removing the test vg, as the snapshot may block the
> > > test vg from removal for a while.
> > >
> > > Signed-off-by: Eryu Guan <eguan@redhat.com>
> > > ---
> > > tests/generic/081 | 22 ++++++++++++++++++++++
> > > 1 file changed, 22 insertions(+)
> > >
> > > diff --git a/tests/generic/081 b/tests/generic/081
> > > index e242c4c..8e1828b 100755
> > > --- a/tests/generic/081
> > > +++ b/tests/generic/081
> > > @@ -36,6 +36,9 @@ _cleanup()
> > > rm -f $tmp.*
> > > # lvm may have umounted it on I/O error, but in case it does not
> > > $UMOUNT_PROG $mnt >/dev/null 2>&1
> > > + # fsync from xfs_io pins the snapshot in use for a while and blocks
> > > + # vgremove, sleep 1 to avoid such failure
> > > + sleep 1
> >
> > Doesn't this indicate a bug in the LVM code? unmount flushes block
> > device caches, so there should be no IO remaining on the device
> > pinning it when unmount completes, right?
>
> Maybe, I'm not sure here.. But it does cause problems to fstests, I have
> two workarounds now, adding sleep 1 before removing vg, delete fsync
> from xfs_io command. I preper to delete fsync, as bug is still
> reproducible without it and no extra workaround(sleep 1) is needed.
>
> What do you think?
I think the bug should be triaged and fixed, not hidden by changing
or removing something from the test. I'd suggest trying to find what
the fsync is pinning in the filesyste/block device....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2015-05-06 23:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-03 9:41 [PATCH] generic/081: wait for lv to be settled before creating fs on it Eryu Guan
2015-05-04 6:27 ` Dave Chinner
2015-05-06 7:32 ` Eryu Guan
2015-05-06 7:58 ` [PATCH v2] " Eryu Guan
2015-05-06 23:13 ` Dave Chinner [this message]
2015-05-07 3:11 ` [PATCH] " Eryu Guan
2015-05-07 3:33 ` [PATCH v3] " Eryu Guan
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=20150506231318.GK21261@dastard \
--to=david@fromorbit.com \
--cc=eguan@redhat.com \
--cc=fstests@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