All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] generic/520: use fsync instead of sync during clean_dir
@ 2019-12-13  5:45 Yang Xu
  2019-12-13 20:42 ` Darrick J. Wong
  2019-12-20 12:32 ` Filipe Manana
  0 siblings, 2 replies; 9+ messages in thread
From: Yang Xu @ 2019-12-13  5:45 UTC (permalink / raw)
  To: fstests; +Cc: Yang Xu

When I test this case on xfs, it may fail as below:
--------------------------------------------
 === link SCRATCH_MNT/A/foo SCRATCH_MNT/bar  with fsync SCRATCH_MNT/A ===
+umount: /mnt/xfstests/scratch: target is busy.
+        (In some cases useful info about processes that use
+         the device is found by lsof(8) or fuser(1))
---------------------------------------------

I think we don't need to sync all fs and fsync SCRATCH_MNT is enough.

Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
---
 tests/generic/520 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/generic/520 b/tests/generic/520
index 167d7077..a16467ca 100755
--- a/tests/generic/520
+++ b/tests/generic/520
@@ -58,7 +58,7 @@ clean_dir()
 {
 	_mount_flakey
 	rm -rf $(find $SCRATCH_MNT/* | grep -v "lost+found")
-	sync
+	$XFS_IO_PROG -c "fsync" $SCRATCH_MNT
 	_unmount_flakey
 }
 
-- 
2.18.0




^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-12-23  5:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-13  5:45 [PATCH] generic/520: use fsync instead of sync during clean_dir Yang Xu
2019-12-13 20:42 ` Darrick J. Wong
2019-12-16  6:24   ` Yang Xu
2019-12-17 22:36     ` Darrick J. Wong
2019-12-18  2:37       ` Yang Xu
2019-12-19 17:08         ` Darrick J. Wong
2019-12-20  2:48           ` Yang Xu
2019-12-20 12:32 ` Filipe Manana
2019-12-23  5:01   ` Yang Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.