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