btrfs-progs 4.17.1
kernel 4.18.12

I've got another Samsung SDHC card that's gone read only, and any
writes cause it to hang. So I've use blockdev --setro on all the
partitions and block device to make sure nothing can write to it, and
then mount with

# mount -o ro,nologreplay /dev/mmcblk0p3 /mnt/sd

There is a log tree entry in the super. Next I want to do a scrub to
see if there are any corruptions detected. I'm curious if any
corruptions have happened in transactions near the time the device
failed and went read only.

# btrfs scrub start -Bdr /mnt/sd

And that results in a warning and call trace. Seems like a bug.

[97696.976887] mmc0: new ultra high speed SDR104 SDHC card at address 59b4
[97696.980825] mmcblk0: mmc0:59b4 EB2MW 29.8 GiB
[97696.996102]  mmcblk0: p1 p2 p3
[100363.736000] r8169 0000:03:00.0: invalid large VPD tag 7f at offset 0
[103726.761878] BTRFS info (device mmcblk0p3): disabling log replay at
mount time
[103726.764476] BTRFS info (device mmcblk0p3): using free space tree
[103726.767036] BTRFS info (device mmcblk0p3): has skinny extents
[103726.811136] BTRFS info (device mmcblk0p3): enabling ssd optimizations
[103780.058008] BTRFS warning (device mmcblk0p3): Skipping commit of
aborted transaction.
[103780.065633] ------------[ cut here ]------------
[103780.070470] BTRFS: Transaction aborted (error -28)
[103780.070631] WARNING: CPU: 0 PID: 6670 at
fs/btrfs/transaction.c:1847 cleanup_transaction+0x8a/0xd0 [btrfs]
[103780.075561] Modules linked in: mmc_block veth xt_nat
ipt_MASQUERADE xt_addrtype br_netfilter bridge stp llc ccm
nf_conntrack_netbios_ns nf_conntrack_broadcast xt_CT ip6t_rpfilter
ip6t_REJECT nf_reject_ipv6 xt_conntrack ebtable_nat ip6table_nat
nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle
ip6table_raw ip6table_security iptable_nat nf_conntrack_ipv4
nf_defrag_ipv4 nf_nat_ipv4 nf_nat iptable_mangle iptable_raw
iptable_security nf_conntrack ip_set nfnetlink ebtable_filter ebtables
ip6table_filter ip6_tables sunrpc vfat fat arc4 intel_rapl iwlmvm
intel_powerclamp coretemp mac80211 kvm_intel kvm snd_hda_codec_hdmi
irqbypass btusb snd_hda_codec_realtek iwlwifi crct10dif_pclmul
snd_hda_codec_generic btrtl btbcm crc32_pclmul ghash_clmulni_intel
btintel bluetooth iTCO_wdt iTCO_vendor_support
[103780.097996]  intel_cstate cfg80211 snd_hda_intel snd_hda_codec
ecdh_generic intel_xhci_usb_role_switch roles rfkill ir_rc6_decoder
snd_hda_core snd_hwdep snd_seq snd_seq_device snd_pcm rc_rc6_mce
mei_txe mei ite_cir snd_timer snd rc_core pcc_cpufreq soundcore
intel_int0002_vgpio i2c_i801 lpc_ich dm_crypt btrfs libcrc32c xor
zstd_decompress zstd_compress xxhash raid6_pq i915 i2c_algo_bit
crc32c_intel drm_kms_helper sdhci_pci drm cqhci r8169 sdhci mii
mmc_core video pwm_lpss_platform pwm_lpss lz4 lz4_compress
[103780.117383] CPU: 0 PID: 6670 Comm: btrfs-transacti Not tainted
4.18.12-300.fc29.x86_64 #1
[103780.123984] Hardware name:  /NUC5PPYB, BIOS
PYBSWCEL.86A.0074.2018.0709.1332 07/09/2018
[103780.130401] RIP: 0010:cleanup_transaction+0x8a/0xd0 [btrfs]
[103780.136079] Code: 83 f8 01 77 63 f0 48 0f ba ab 08 23 00 00 02 72
1b 41 83 fc fb 0f 84 45 30 08 00 44 89 e6 48 c7 c7 70 6f 6c c0 e8 60
1f a8 ec <0f> 0b 44 89 e1 ba 37 07 00 00 4d 8d 65 28 48 89 ef 48 c7 c6
70 b0
[103780.142943] RSP: 0018:ffffb45401483dd0 EFLAGS: 00010286
[103780.150032] RAX: 0000000000000000 RBX: ffff90d8f4724000 RCX:
0000000000000006
[103780.157155] RDX: 0000000000000007 RSI: 0000000000000086 RDI:
ffff90d93fc16930
[103780.164218] RBP: ffff90d928f99750 R08: 0000000000000038 R09:
0000000000000007
[103780.171238] R10: 0000000000000000 R11: 0000000000000001 R12:
00000000ffffffe4
[103780.178171] R13: ffff90d8c44ce600 R14: 00000000ffffffe4 R15:
ffff90d8f4725df8
[103780.185134] FS:  0000000000000000(0000) GS:ffff90d93fc00000(0000)
knlGS:0000000000000000
[103780.192265] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[103780.199458] CR2: 000055764829c720 CR3: 000000017420a000 CR4:
00000000001006f0
[103780.206756] Call Trace:
[103780.214090]  ? finish_wait+0x80/0x80
[103780.221519]  btrfs_commit_transaction+0x86d/0x8b0 [btrfs]
[103780.228946]  ? join_transaction+0x22/0x3e0 [btrfs]
[103780.236448]  ? start_transaction+0x9c/0x3e0 [btrfs]
[103780.243856]  transaction_kthread+0x155/0x170 [btrfs]
[103780.251166]  ? btrfs_cleanup_transaction+0x550/0x550 [btrfs]
[103780.258368]  kthread+0x112/0x130
[103780.265481]  ? kthread_create_worker_on_cpu+0x70/0x70
[103780.272535]  ret_from_fork+0x35/0x40
[103780.279436] ---[ end trace 7470f1b607c73b6c ]---
[103780.285841] BTRFS warning (device mmcblk0p3):
cleanup_transaction:1847: Aborting unused transaction(No space left).
[103780.289891] BTRFS info (device mmcblk0p3): delayed_refs has NO entry


-- 
Chris Murphy

Reply via email to