public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] lib: tst_device.c - /dev/loop0 in use
@ 2018-12-19 16:33 Rafael David Tinoco
  2019-01-02 13:19 ` Cyril Hrubis
  0 siblings, 1 reply; 8+ messages in thread
From: Rafael David Tinoco @ 2018-12-19 16:33 UTC (permalink / raw)
  To: ltp

Hello Cyril,

Apparently, when having "all_filesystems" flag set for one test, there
is a room of opportunity for the subsequent filesystems tests to find
the device, acquired by "tst_acquire_device()", busy.

I suppose, in the case bellow, fsync() caused async work in some kernel
thread to cause the "/dev/loop0 is apparently in use by the system"
error when trying a new mkfs.XXXX call - for the subsequent filesystem -
using the same acquired device.

With the "all_filesystems" logic, the acquired device is not detached,
nor find_free_loopdev() is called again, which *could* mitigate this.

The error:

tst_test.c:1015: INFO: Timeout per run is 0h 15m 00s
fsync01.c:58: PASS: fsync() returned 0
fsync01.c:58: PASS: fsync() returned 0
fsync01.c:58: PASS: fsync() returned 0
fsync01.c:58: PASS: fsync() returned 0
fsync01.c:58: PASS: fsync() returned 0
fsync01.c:58: PASS: fsync() returned 0
fsync01.c:58: PASS: fsync() returned 0
fsync01.c:58: PASS: fsync() returned 0
fsync01.c:58: PASS: fsync() returned 0
fsync01.c:58: PASS: fsync() returned 0
tst_test.c:1076: INFO: Testing on ext3
tst_mkfs.c:83: INFO: Formatting /dev/loop0 with ext3 opts='' extra opts=''
mke2fs 1.43.5 (04-Aug-2017)
[   48.457646] EXT4-fs (loop0): mounting ext3 file system using the ext4
subsystem
[   48.502872] EXT4-fs (loop0): mounted filesystem with ordered data
mode. Opts: (null)
tst_test.c:1015: INFO: Timeout per run is 0h 15m 00s
fsync01.c:58: PASS: fsync() returned 0
fsync01.c:58: PASS: fsync() returned 0
fsync01.c:58: PASS: fsync() returned 0
fsync01.c:58: PASS: fsync() returned 0
fsync01.c:58: PASS: fsync() returned 0
fsync01.c:58: PASS: fsync() returned 0
fsync01.c:58: PASS: fsync() returned 0
fsync01.c:58: PASS: fsync() returned 0
fsync01.c:58: PASS: fsync() returned 0
fsync01.c:58: PASS: fsync() returned 0
tst_test.c:1076: INFO: Testing on ext4
tst_mkfs.c:83: INFO: Formatting /dev/loop0 with ext4 opts='' extra opts=''
mke2fs 1.43.5 (04-Aug-2017)
/dev/loop0 is apparently in use by the system; will not make a
filesystem here!
tst_mkfs.c:94: BROK: mkfs.ext4:1: tst_test.c failed with 729

Thoughts ?

Cheers o/
-- 
Rafael D. Tinoco
Linaro - Kernel Validation

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

end of thread, other threads:[~2025-08-12 11:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-19 16:33 [LTP] lib: tst_device.c - /dev/loop0 in use Rafael David Tinoco
2019-01-02 13:19 ` Cyril Hrubis
2025-08-06  7:44   ` [LTP] [PATCH] tst_umount: Retry open() after umount to handle delayed device release Li Wang via ltp
2025-08-06  9:27     ` Cyril Hrubis
2025-08-11 12:42       ` Li Wang via ltp
2025-08-11 14:20         ` Cyril Hrubis
2025-08-12  3:43           ` Li Wang via ltp
2025-08-12 11:17             ` Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox