Re: [RFC PATCH] btrfs/066: Fix race condition by making 'subvolume stress' task to exit gracefully

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



On Thursday 17 Mar 2016 15:23:39 Eryu Guan wrote:
> A named pipe seems too heavy and complicated to me. How about breaking
> out the loop in _btrfs_stress_subvolume on the existence of some file?
> e.g.
> 
> _btrfs_stress_subvolume():
> 	...
> 	local stop_file=$5
> 	while [ ! -e $stop_file ]; do
> 	...
> 	done
> 
> run_test():
> 	...
> 	local stop_file=$TEST_DIR/$seq.stop.$$
> 	...
> 	# make sure the stop sign is not there
> 	rm -f $stop_file
> 	_btrfs_stress_subvolume $SCRATCH_DEV $SCRATCH_MNT subvol_$$ 
$subvol_mnt
> $stop_file & ...
> 	wait $fsstress_pid
> 	touch $stop_file
> 	kill $scrub_pid
> 	wait
>

Yes, you are right. This above method is much simpler. I will send out a patch
with the new fix.

-- 
chandan

--
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