Does Vero V support btrfs?

Two usb drives which work on my Vero 4K cause random hangs on my Vero V. A usb drive that works formatted with ext4 doesn’t with btrfs.

Hi,

The Vero 4K/4K+ and V share the same kernel (assuming you’re on the latest version of OSMC) so those drives should work identically.

I haven’t tested btrfs under OSMC but my understanding the kernel support is there. The kernel is configured as follows:

CONFIG_BTRFS_FS=m
CONFIG_BTRFS_FS_POSIX_ACL=y
# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set
# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set
# CONFIG_BTRFS_DEBUG is not set
# CONFIG_BTRFS_ASSERT is not set

Sam

The Vero 4 is running Kodi 2018.08-2 so it’s a much older kernel. Used the AppImage to create a usb flash drive and re-install - twice - with same issue. I’ll use ext4 if I decide to use the Vero V. Thanks

That 3.14 kernel in the 2018 version is likely too old to handle btrfs

See the original post - the Vero 4 works and the Vero 5 doesn’t.
I’ve been using btrfs formatted drives with the Vero 4 (that I haven’t updated) for five years with zero issues. Really doesn’t make much sense does it. Thanks.

If I understand correctly:

  1. The Vero 4K / 4K + is on the 3.14 kernel on an old version of OSMC on your system
  2. Vero V is obviously on 4.9 (version we shipped)

It would be interesting to know if btrfs is working on a Vero 4K / 4K+ running the 4.9 kernel / latest version of OSMC.

I am sure we can get this solved once we have some more information.

  1. correct - btrfs formatted works.
  2. correct - I also used the AppImage program to make sure it was up to date and not misconfigured.

I’m probably the only customer you have that uses btrfs so it’s no big deal. Thanks for the assistance.

I can look in to it. So in short, you’re saying btrfs does not work on 4.9.

How do you mount the drive and what error do you get?
I am sure I can mkfs.btrfs on a USB stick somewhere and give it a test

Does not work for long - yes.
Vero mounts it automatically - not sure how.
In kodi I select Video | Files and either the drive will show up with it’s size or select ‘Auto-mounted drives’ and go from there. Sometimes it hangs right away and sometimes it’ll hang after selecting a directory and exiting the directory or playing a video and stopping it. I enabled logging but nothing showed up in the log file - it just stops. I exited to the command shell and plugged in the drive. If I cd thru the /media/ directory it will crash with a bunch of btrfs messages on screen but most of them scroll past and I have no idea how to log them and it hangs.

I’d be surprised if the system doesn’t show the issue in (dmesg).

If you keep the drive as btrfs, I’ll see if I can backport some btrfs fixes that should improve stability for you.

Sam

I formatted a USB drive with btrfs-tools 5.15 from Ubuntu 22.04 LTS.
I could not reproduce an issue with extensive read or write requests on Vero V.

How did you format the drive (device, distro etc)?
Do you have another drive you could format and use a

However, I’ve backported the following BTRFS changes which may yield some improvement. In the worst case, they should cause no regression.

[ d22a21099ff2] btrfs: do not BUG_ON in link_to_fixup_dir
[ 7e2558f360ac] btrfs: fix error handling in btrfs_del_csums
[ 2442499dd83d] btrfs: fixup error handling in fixup_inode_link_counts
[ 439b8329e366] btrfs: return value from btrfs_mark_extent_written() in case of error
[ 879bfaaef0a1] btrfs: clear defrag status of a root if starting transaction fails
[ 074cb154a281] btrfs: abort transaction if we fail to update the delayed inode
[ b0e5b4f5f8e8] btrfs: disable build on platforms having page size 256K
[ bace89f80740] btrfs: mark compressed range uptodate only if all bio succeed
[ 7fcb736e58ac] btrfs: prevent rename2 from exchanging a subvol with a directory from different parents
[ bc32a0eeaca5] btrfs: fix lost error handling when replaying directory deletes
[ 887320f7aefa] btrfs: fix memory ordering between normal and ordered work functions
[ 4a5c7f2035a8] btrfs: remove BUG_ON() in find_parent_nodes()
[ 4b4ca6ac63af] btrfs: send: in case of IO error log it
[ 7ac20c17ce9b] btrfs: unlock newly allocated extent buffer after error
[ ffd151df0b51] btrfs: always log symlinks in full mode
[ 6998f17750d3] btrfs: add "0x" prefix for unsupported optional features
[ 1e6cbce4168b] btrfs: reject log replay if there is unsupported RO compat flag
[ 7b0bd274beaf] btrfs: fix lost error handling when looking up extended ref on log replay
[ 212789cd454c] btrfs: check if root is readonly while setting security xattr
[ f366f8b4d975] btrfs: fix ulist leaks in error paths of qgroup self tests
[ 9c930f5f63ca] btrfs: fix type of parameter generation in btrfs_get_dentry
[ 2fdfbb017137] btrfs: selftests: fix wrong error check in btrfs_free_dummy_root()
[ 96fb80d0c326] btrfs: qgroup: fix sleep from invalid context bug in btrfs_qgroup_inherit()

To test this update:

  1. Login via the command line
  2. Run the following command to add the staging repository:
    echo 'deb http://apt.osmc.tv bullseye-devel main' | sudo tee /etc/apt/sources.list.d/osmc-devel.list
  3. Run the following commands to update: sudo apt-get update && sudo apt-get dist-upgrade && reboot
  4. Your system should have have received the update.

Please see if the issue is resolved.

I also recommend you remove /etc/apt/sources.list.d/osmc-devel.list after updating.

This will deactivate the staging repository. You can do so with the following command:
sudo rm /etc/apt/sources.list.d/osmc-devel.list.

Please note that we will automatically disable this update channel after 14 days on your device in case you forget to do so to ensure that your system reverts to the stable update channel.

Cheers

Sam

I thought I looked at dmesg but I must have missed it. I’ll respond to your last post after I try a few things (I did the update).
I guess I can’t upload a .txt file - here is where it hangs - this is after the staging repository update:

[ 60.796999] audio_ddr_mngr: frddr_set_sharebuffer_enable share lvl: 1, dst_src: 3
[ 60.797200] tdm playback mute: 0, lane_cnt = 4
[ 60.797314] hdmitx: sysfs set hdmi_ch to 0
[ 60.797410] aml_tdm_prepare(), reset fddr
[ 60.797423] ss_prepare() 247, lvl 1
[ 60.797428] spdif_a fifo ctrl, frddr:1 type:4, 24 bits, chmask 0x3, swap 0x10
[ 60.797433] iec_info: rate: 44100, codec_type:0x0, channel status L:0x100, R:0x100
[ 60.797437] hdmitx: audio: aout notify rate 44100
[ 60.797438] hdmitx: audio: aout notify size 32
[ 60.797440] hdmitx: audio: hdmi_ch: 0 speaker_layout: 0
[ 60.797443] audio_ddr_mngr: frddr_set_sharebuffer_enable share lvl: 1, dst_src: 3
[ 60.797579] tdm playback mute: 0, lane_cnt = 4
[ 60.799529] ss_free() lvl 1
[ 60.799537] audio_ddr_mngr: frddr_set_sharebuffer_enable share lvl: 1, dst_src: 3
[ 60.799546] aml_tdm_hw_setting_free(), disable mclk for tdm-2
[ 60.799573] tdm playback mute: 1, lane_cnt = 4
[ 60.799635] audio_ddr_mngr: frddrs[1] released by device fe330000.audiobus:tdm@2
[ 63.881382] Unable to handle kernel NULL pointer dereference at virtual address 00000044
[ 63.881753] pgd = 00000000aa69a86b
[ 63.882201] [0000000000000044] *pgd=0000000000000000, *pud=0000000000000000
[ 63.883101] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[ 63.883826] Modules linked in: btrfs xor raid6_pq sg 8021q 8822cs aes_ce_blk ablk_helper aes_ce_cipher ghash_ce sha2_ce sha1_ce wifi_scan mali_kbase ir_lirc_codec lirc_dev meson_ir amvdec_ports(O) amvdec_av1(O) amvdec_mmpeg4(O) amvdec_mh264(O) amvdec_h264mvc(O) amvdec_mmpeg12(O) amvdec_vp9(O) amvdec_vc1(O) amvdec_h265(O) stream_input(O) decoder_common(O) firmware(O) media_clock(O) video_framerate_adapter(O)
[ 63.885399] CPU: 2 PID: 3035 Comm: btrfs-transacti Tainted: G O 4.9.269-39-osmc #1
[ 63.885400] Hardware name: VeroV (DT)
[ 63.885402] task: 000000007d8c20a8 task.stack: 00000000c14873a7
[ 63.885412] PC is at __do_page_cache_readahead+0x4c/0x24c
[ 63.885415] LR is at ondemand_readahead.isra.0+0x1e0/0x288
[ 63.885418] R16 : ffffff8009120864, PFN: 1120
[ 63.885419] R29 : ffffff80203f3560, PFN:d4cf6
[ 63.885420] R30 : ffffff800919e61c, PFN: 119e
[ 63.885422] pc : [] lr : [] pstate: 80c00149

GParted 0.32.0 debian 10

I formatted another usb flash drive with btrfs and it hangs. It seems when it hangs in the UI dmesg doesn’t show anything.
Copied the same video files to an ext4 formatted usb flash drive and no issues.

In summary: it’s really random - some times it hangs on the first change directory and sometimes I can play multiple videos (I just play a few seconds) before it hangs. I’ve tried two different usb flash drives and two external ssds. The update may have helped a bit as it doesn’t seem to crash as quickly (maybe? I haven’t kept notes). I think formatting to ext4 is the way to go forward.

That’s annoying. I’ll keep the changes in as they don’t seem to cause a regrerssion but we may have to wait until 5.15 to see this properly fixed.

Sam