From: Dave Chinner <david@fromorbit.com>
To: Lukas Czerner <lczerner@redhat.com>
Cc: Stefan Behrens <sbehrens@giantdisaster.de>, xfs@oss.sgi.com
Subject: Re: [PATCH 4/5] xfstests: sync before umount to avoid device busy problems
Date: Fri, 13 Apr 2012 21:58:12 +1000 [thread overview]
Message-ID: <20120413115812.GP6734@dastard> (raw)
In-Reply-To: <alpine.LFD.2.00.1204131249390.14961@dhcp-27-109.brq.redhat.com>
On Fri, Apr 13, 2012 at 12:57:20PM +0200, Lukas Czerner wrote:
> On Fri, 13 Apr 2012, Stefan Behrens wrote:
> > On 4/13/2012 11:49 AM, tmarek@redhat.com wrote:
> > > From: Tom Marek <tmarek@redhat.com>
> > >
> > > Some tests might fail because of 'device or resource busy' when unmounting
> > > either the SCRATCH or the TEST device. The reason this happenes is that
> > > some processes might not have time to finish properly, or they are still
> > > waiting for IO. The sync command was added before unmount into
> > > _scratch_unmount() and umount_or_remount_ro which should help processes to
> > > finish before unmounting takes place and thus it solves the problem.
> > > This fixes for example tests 226 and 247.
> > >
> > > Test 226 uses plain umount command which suffers from exactly the same problem
> > > as described above. Use fixed _scratch_unmount() instead of plain umount fixes
> > > this problem.
....
> >
> > If a xfstest process is still running when _scratch_umount() is called,
> > that xfstest is wrong and needs to be fixed IMO.
>
> I agree, however some tests does not explicitly wait for all processes
> to finish. It is kind of hard to see why 226 has this problem, since
> there are no processes running on background, but sync certainly seems
> to help. It seems to be just a matter of timing though.
Which indicates a problem that needs to be understood, not hidden.
> > If a system or filesystem thread is still running and umount fails to
> > handle it, the system or filesystem needs to be fixed IMO.
> >
> > xfstests shall uncover issues, not hide them.
>
> I do not think this is fs issue at all.
There are no background threads in 226, so if the unmount is failing
then there is something wrong with the unmount process. Indeed, 226
is doing direct Io writes prior to unmount, so the only dirty
objects should be the inode and free space indexing metadata. If
unmount is failing to handle this, we need to know why....
So I definitely agree with Stefan on this one - adding a sync before
unmount looks like hiding a problem rather than solving it...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2012-04-13 11:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-13 9:49 [PATCH 1/5] xfstests 062: fix support for ext4 and SELinux tmarek
2012-04-13 9:49 ` [PATCH 2/5] xfstests 233: fix user fsgqa access to fsstress tmarek
2012-04-13 9:49 ` [PATCH 3/5] xfstests 198, 240: added check for aiodio-sparse2 tmarek
2012-04-13 11:49 ` Dave Chinner
2012-04-13 9:49 ` [PATCH 4/5] xfstests: sync before umount to avoid device busy problems tmarek
2012-04-13 10:26 ` Stefan Behrens
2012-04-13 10:57 ` Lukas Czerner
2012-04-13 11:58 ` Dave Chinner [this message]
2012-04-16 6:57 ` Lukas Czerner
2012-04-13 11:15 ` Tom Marek
2012-04-13 9:49 ` [PATCH 5/5] xfstests 273: fix of reading scratch size and removing lost+found tmarek
2012-04-16 2:46 ` [PATCH 1/5] xfstests 062: fix support for ext4 and SELinux Eric Sandeen
2012-04-16 2:56 ` Eric Sandeen
2012-04-16 7:03 ` Lukas Czerner
2012-04-16 14:06 ` Eric Sandeen
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=20120413115812.GP6734@dastard \
--to=david@fromorbit.com \
--cc=lczerner@redhat.com \
--cc=sbehrens@giantdisaster.de \
--cc=xfs@oss.sgi.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