Bug 203621

Summary: filefrag on ro-blockdevice btrfs causes delayed_refs has NO entry / btrfs_update_root:136: Aborting unused transaction(No space left).
Product: File System Reporter: Christoph Anton Mitterer (calestyo)
Component: btrfsAssignee: BTRFS virtual assignee (fs_btrfs)
Status: NEW ---    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.19.37 Tree: Mainline
Regression: No

Description Christoph Anton Mitterer 2019-05-16 09:11:30 UTC
from: https://www.spinics.net/lists/linux-btrfs/msg87585.html

As described in the thread above (log messages attached there), when filefrag is used on a btrfs which is on a blockdevice that is set readonly, it leads errors like:
Mar 16 18:27:28 heisenberg kernel: BTRFS warning (device dm-2): Skipping commit of aborted transaction.
Mar 16 18:27:28 heisenberg kernel: BTRFS warning (device dm-2): cleanup_transaction:1846: Aborting unused transaction(No space left).
Mar 16 18:27:28 heisenberg kernel: BTRFS info (device dm-2): delayed_refs has NO entry
Mar 16 18:27:28 heisenberg kernel: BTRFS warning (device dm-2): btrfs_update_root:136: Aborting unused transaction(No space left).
Mar 16 18:27:28 heisenberg kernel: BTRFS warning (device dm-2): Skipping commit of aborted transaction.
Mar 16 18:27:28 heisenberg kernel: BTRFS warning (device dm-2): cleanup_transaction:1846: Aborting unused transaction(No space left).
Mar 16 18:27:28 heisenberg kernel: BTRFS info (device dm-2): delayed_refs has NO entry
Mar 16 18:27:28 heisenberg kernel: BTRFS warning (device dm-2): btrfs_update_root:136: Aborting unused transaction(No space left).
Mar 16 18:27:28 heisenberg kernel: BTRFS warning (device dm-2): Skipping commit of aborted transaction.
Mar 16 18:27:28 heisenberg kernel: BTRFS warning (device dm-2): cleanup_transaction:1846: Aborting unused transaction(No space left).
Mar 16 18:27:28 heisenberg kernel: BTRFS info (device dm-2): delayed_refs has NO entry
Mar 16 18:27:28 heisenberg kernel: BTRFS warning (device dm-2): btrfs_update_root:136: Aborting unused transaction(No space left).
Mar 16 18:27:28 heisenberg kernel: BTRFS warning (device dm-2): Skipping commit of aborted transaction.
Mar 16 18:27:28 heisenberg kernel: BTRFS warning (device dm-2): cleanup_transaction:1846: Aborting unused transaction(No space left).
Mar 16 18:27:28 heisenberg kernel: BTRFS info (device dm-2): delayed_refs has NO entry
Mar 16 18:27:28 heisenberg kernel: BTRFS warning (device dm-2): btrfs_update_root:136: Aborting unused transaction(No space left).
Mar 16 18:27:28 heisenberg kernel: BTRFS warning (device dm-2): Skipping commit of aborted transaction.
Mar 16 18:27:28 heisenberg kernel: BTRFS warning (device dm-2): cleanup_transaction:1846: Aborting unused transaction(No space left).
Mar 16 18:27:28 heisenberg kernel: BTRFS info (device dm-2): delayed_refs has NO entry
Mar 16 18:27:28 heisenberg kernel: BTRFS warning (device dm-2): btrfs_update_root:136: Aborting unused transaction(No space left).
Mar 16 18:27:28 heisenberg kernel: BTRFS info (device dm-2): delayed_refs has NO entry

See https://www.spinics.net/lists/linux-btrfs/msg88573.html for a reproducer.