Comment # 4 on bug 1201114 from
"What happens if you do rmdir /mnt/chroot after unplug, but before replug?"

Bad things happen.  Commands first, then journal entries follow:

> sudo umount -v -R /mnt/chroot
umount: /mnt/chroot/sys/kernel/security unmounted
umount: /mnt/chroot/sys/fs/cgroup (cgroup2) unmounted
umount: /mnt/chroot/sys/fs/pstore unmounted
umount: /mnt/chroot/sys/firmware/efi/efivars unmounted
umount: /mnt/chroot/sys/fs/bpf (bpf) unmounted
umount: /mnt/chroot/sys/kernel/debug unmounted
umount: /mnt/chroot/sys/kernel/tracing (tracefs) unmounted
umount: /mnt/chroot/sys/fs/fuse/connections (fusectl) unmounted
umount: /mnt/chroot/sys/kernel/config unmounted
umount: /mnt/chroot/sys unmounted
umount: /mnt/chroot unmounted

Jul 07 16:50:27 Mobile-PC sudo[3031]:     gene : TTY=pts/1 ; PWD=/home/gene ;
USER=root ; COMMAND=/usr/bin/umount -v -R /mnt/chroot
Jul 07 16:50:27 Mobile-PC sudo[3031]: pam_unix(sudo:session): session opened
for user root(uid=0) by (uid=1000)
Jul 07 16:50:27 Mobile-PC sudo[3031]: pam_unix(sudo:session): session closed
for user root
Jul 07 16:50:27 Mobile-PC systemd[1]: mnt-chroot-sys-fs-bpf.mount: Deactivated
successfully.
Jul 07 16:50:27 Mobile-PC systemd[1]:
mnt-chroot-sys-firmware-efi-efivars.mount: Deactivated successfully.
Jul 07 16:50:27 Mobile-PC systemd[1]: mnt-chroot-sys-fs-pstore.mount:
Deactivated successfully.
Jul 07 16:50:27 Mobile-PC systemd[1]: mnt-chroot-sys-fs-cgroup.mount:
Deactivated successfully.
Jul 07 16:50:27 Mobile-PC systemd[1]: mnt-chroot-sys-kernel-security.mount:
Deactivated successfully.
Jul 07 16:50:27 Mobile-PC systemd[1]: mnt-chroot-sys-kernel-config.mount:
Deactivated successfully.
Jul 07 16:50:27 Mobile-PC systemd[1]: mnt-chroot-sys-fs-fuse-connections.mount:
Deactivated successfully.
Jul 07 16:50:27 Mobile-PC systemd[1]: mnt-chroot-sys-kernel-tracing.mount:
Deactivated successfully.
Jul 07 16:50:27 Mobile-PC systemd[1]: mnt-chroot-sys-kernel-debug.mount:
Deactivated successfully.
Jul 07 16:50:27 Mobile-PC systemd[1]: mnt-chroot-sys.mount: Deactivated
successfully.
Jul 07 16:50:27 Mobile-PC systemd[1]: mnt-chroot.mount: Deactivated
successfully.
Jul 07 16:50:32 Mobile-PC chronyd[1118]: Selected source 162.159.200.1
(2.opensuse.pool.ntp.org)
Jul 07 16:50:36 Mobile-PC kernel: usb 2-1: USB disconnect, device number 2
Jul 07 16:50:36 Mobile-PC systemd[1]: Stopping Sabrent-Samsung temperature
monitor daemon, started by udev rule...
Jul 07 16:50:36 Mobile-PC systemd[1]: Sabrent-Samsung-tempd.service:
Deactivated successfully.
Jul 07 16:50:36 Mobile-PC systemd[1]: Stopped Sabrent-Samsung temperature
monitor daemon, started by udev rule.
Jul 07 16:50:36 Mobile-PC kernel: sd 2:0:0:0: [sdb] Synchronizing SCSI cache
Jul 07 16:50:36 Mobile-PC kernel: sd 2:0:0:0: [sdb] Synchronize Cache(10)
failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK

> sudo rmdir /mnt/chroot

Jul 07 16:50:49 Mobile-PC sudo[3070]:     gene : TTY=pts/1 ; PWD=/home/gene ;
USER=root ; COMMAND=/usr/bin/rmdir /mnt/chroot
Jul 07 16:50:49 Mobile-PC sudo[3070]: pam_unix(sudo:session): session opened
for user root(uid=0) by (uid=1000)
Jul 07 16:50:49 Mobile-PC kernel: BTRFS error (device sdb2): bdev /dev/sdb2
errs: wr 0, rd 1, flush 0, corrupt 0, gen 0
Jul 07 16:50:49 Mobile-PC kernel: BTRFS error (device sdb2): bdev /dev/sdb2
errs: wr 0, rd 2, flush 0, corrupt 0, gen 0
Jul 07 16:50:49 Mobile-PC kernel: BTRFS error (device sdb2): bdev /dev/sdb2
errs: wr 0, rd 3, flush 0, corrupt 0, gen 0
Jul 07 16:50:49 Mobile-PC kernel: BTRFS error (device sdb2): bdev /dev/sdb2
errs: wr 0, rd 4, flush 0, corrupt 0, gen 0
Jul 07 16:50:49 Mobile-PC kernel: BTRFS error (device sdb2): bdev /dev/sdb2
errs: wr 0, rd 5, flush 0, corrupt 0, gen 0
Jul 07 16:50:49 Mobile-PC kernel: BTRFS error (device sdb2): bdev /dev/sdb2
errs: wr 0, rd 6, flush 0, corrupt 0, gen 0
Jul 07 16:50:49 Mobile-PC kernel: BTRFS error (device sdb2): bdev /dev/sdb2
errs: wr 0, rd 7, flush 0, corrupt 0, gen 0
Jul 07 16:50:49 Mobile-PC kernel: BTRFS error (device sdb2): bdev /dev/sdb2
errs: wr 0, rd 8, flush 0, corrupt 0, gen 0
Jul 07 16:50:49 Mobile-PC kernel: BTRFS error (device sdb2): bdev /dev/sdb2
errs: wr 0, rd 9, flush 0, corrupt 0, gen 0
Jul 07 16:50:49 Mobile-PC kernel: BTRFS error (device sdb2): bdev /dev/sdb2
errs: wr 0, rd 10, flush 0, corrupt 0, gen 0
Jul 07 16:50:49 Mobile-PC kernel: BTRFS: error (device sdb2: state A) in
add_to_free_space_tree:1051: errno=-5 IO failure
Jul 07 16:50:49 Mobile-PC kernel: BTRFS info (device sdb2: state EA): forced
readonly
Jul 07 16:50:49 Mobile-PC kernel: BTRFS: error (device sdb2: state EA) in
do_free_extent_accounting:2874: errno=-5 IO failure
Jul 07 16:50:49 Mobile-PC kernel: BTRFS: error (device sdb2: state EA) in
btrfs_run_delayed_refs:2151: errno=-5 IO failure
Jul 07 16:50:49 Mobile-PC kernel: BTRFS warning (device sdb2: state EA):
Skipping commit of aborted transaction.
Jul 07 16:50:49 Mobile-PC kernel: BTRFS: error (device sdb2: state EA) in
cleanup_transaction:1982: errno=-5 IO failure
Jul 07 16:50:49 Mobile-PC kernel: BTRFS error (device sdb2: state EA): commit
super ret -5
Jul 07 16:50:49 Mobile-PC sudo[3070]: pam_unix(sudo:session): session closed
for user root

The kernel BTRFS driver is very confused at this point.

Gene


You are receiving this mail because: