Commit 8f5c866
committed
Call to btrfs device ready ioctl
That helps when we build btrfs RAID0 and fixes following race condition
in tests:
[ 1.608465] booster: loading module btrfs
[ 1.695250] Btrfs loaded, crc32c=crc32c-intel, zoned=yes, fsverity=yes
[ 1.695410] booster: udev event {Action:add KObj:/devices/virtual/misc/btrfs-control Env:map[ACTION:add DEVNAME:btrfs-control DEVPATH:/devices/virtual/misc/btrfs-control MAJOR:10 MINOR:234 SEQNUM:1156 SUBSYSTEM:misc]}
[ 1.698089] booster: udev event {Action:add KObj:/module/btrfs Env:map[ACTION:add DEVPATH:/module/btrfs SEQNUM:1157 SUBSYSTEM:module]}
[ 1.699492] booster: mounting /dev/sda1->/booster.root, fs=btrfs, flags=0x0, options=
[ 1.700392] BTRFS: device fsid 5eaa0c1c-e1dc-4be7-9b03-9f1ed5a87289 devid 1 transid 8 /dev/sda1 scanned by init (129)
[ 1.701508] booster: udev event {Action:add KObj:/devices/virtual/bdi/btrfs-1 Env:map[ACTION:add DEVPATH:/devices/virtual/bdi/btrfs-1 SEQNUM:1158 SUBSYSTEM:bdi]}
[ 1.703030] BTRFS info (device sda1): using crc32c (crc32c-intel) checksum algorithm
[ 1.703796] BTRFS info (device sda1): using free space tree
[ 1.704984] BTRFS error (device sda1): devid 2 uuid c815d0ba-796d-4b7c-a5a9-3e6852c6ed0a is missing
[ 1.705846] BTRFS error (device sda1): failed to read the system array: -2
[ 1.706784] BTRFS error (device sda1): open_ctree failed
[ 1.707380] booster: mount(/dev/sda1): invalid argument
[ 1.707924] booster: mounting /dev/sda2->/booster.root, fs=btrfs, flags=0x0, options=
[ 1.708708] booster: udev event {Action:remove KObj:/devices/virtual/bdi/btrfs-1 Env:map[ACTION:remove DEVPATH:/devices/virtual/bdi/btrfs-1 SEQNUM:1159 SUBSYSTEM:bdi]}
[ 1.708780] BTRFS: device fsid 5eaa0c1c-e1dc-4be7-9b03-9f1ed5a87289 devid 2 transid 8 /dev/sda2 scanned by init (129)
[ 1.711416] booster: udev event {Action:add KObj:/devices/virtual/bdi/btrfs-2 Env:map[ACTION:add DEVPATH:/devices/virtual/bdi/btrfs-2 SEQNUM:1160 SUBSYSTEM:bdi]}
[ 1.711548] BTRFS info (device sda2): using crc32c (crc32c-intel) checksum algorithm
[ 1.714017] BTRFS info (device sda2): using free space tree
[ 1.715232] BTRFS error (device sda2): devid 1 uuid 58a3e858-0b27-4f7c-8aa5-0dfed774177a is missing
[ 1.716119] BTRFS error (device sda2): failed to read the system array: -2
[ 1.717021] BTRFS error (device sda2): open_ctree failed
[ 1.717599] booster: mount(/dev/sda2): invalid argument
[ 1.718186] booster: udev event {Action:remove KObj:/devices/virtual/bdi/btrfs-2 Env:map[ACTION:remove DEVPATH:/devices/virtual/bdi/btrfs-2 SEQNUM:1161 SUBSYSTEM:bdi]}
btrfs_test.go:17:
Error Trace: /home/anatol/sources/golang/booster/tests/btrfs_test.go:17
Error: Received unexpected error:
EOF
Test: TestBtrfsRaid0
2023/02/28 17:53:15 Got error while waiting for Qemu process completion: signal: killed
--- FAIL: TestBtrfsRaid0 (41.28s)
Issue #1941 parent b8c0604 commit 8f5c866
1 file changed
+28
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
368 | 369 | | |
369 | 370 | | |
370 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
371 | 378 | | |
372 | 379 | | |
373 | 380 | | |
| |||
390 | 397 | | |
391 | 398 | | |
392 | 399 | | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
393 | 421 | | |
394 | 422 | | |
395 | 423 | | |
| |||
0 commit comments