Re: [PATCH] generic/446: make sure all background processes are dead before umount

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



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
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux