From: Eryu Guan <eguan@redhat.com>
To: Xiao Yang <yangx.jy@cn.fujitsu.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] generic/446: make sure all background processes are dead before umount
Date: Tue, 25 Jul 2017 15:50:34 +0800 [thread overview]
Message-ID: <20170725075034.GN9167@eguan.usersys.redhat.com> (raw)
In-Reply-To: <5976F6BF.1040401@cn.fujitsu.com>
On Tue, Jul 25, 2017 at 03:43:59PM +0800, Xiao Yang wrote:
> > > > # run mapped write to the same hole as dio read
> > > > -for i in `seq 0 999`; do
> > > > +while true; do
> > > > $XFS_IO_PROG -c "mmap 0 $filesz" -c "mwrite 0 $filesz" $SCRATCH_MNT/file \
> > > > > /dev/null
> > > > $XFS_IO_PROG -c "fpunch 0 $filesz" $SCRATCH_MNT/file> /dev/null
> > > > + if ! kill -s 0 $dread_pid>/dev/null 2>&1; then
> > > > + break
> > > > + fi
> > > > done
> Could we simplify this break, as below:
> while kill -s 0 $dread_pid >/dev/null 2>&1; do
> $XFS_IO_PROG -c "mmap 0 $filesz" -c "mwrite 0 $filesz" $SCRATCH_MNT/file
> \
> > /dev/null
> $XFS_IO_PROG -c "fpunch 0 $filesz" $SCRATCH_MNT/file > /dev/null
> done
This looks better, thanks! I'll send v2.
Eryu
next prev parent reply other threads:[~2017-07-25 7:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-24 10:11 [PATCH] generic/446: make sure all background processes are dead before umount Eryu Guan
2017-07-25 1:39 ` Xiao Yang
2017-07-25 6:31 ` Eryu Guan
2017-07-25 7:43 ` Xiao Yang
2017-07-25 7:50 ` Eryu Guan [this message]
2017-07-25 8:04 ` [PATCH v2] " Eryu Guan
2017-07-27 5:22 ` Eryu Guan
2017-07-27 6:30 ` Xiao Yang
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=20170725075034.GN9167@eguan.usersys.redhat.com \
--to=eguan@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=yangx.jy@cn.fujitsu.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