namjaejeon/ksmbd

btrfs subvolume invisible on macos

Opened this issue · 6 comments

Hi,

All BTRFS subvolume are invisible on shares from the MacOS native smb client.

All other regulars files and directories are shown and accessible as expected.

Using another MacOS smb client (not native like Filebrowser) do not have the issue, it seems related to native MacOS smb/cifs client.

Mounting with the cli mount_smbfs have the same issue (Finder and terminal path).

Same issue with MacOS 14 (Sonoma) and 15 (Sequoia).

On Linux side, the last 6.10.10 have the issue (since a long time).

Steps to reproduce :

  • mount smb share exported via ksmbd (btrfs filesystem) on MacOS (with Finder or cli mount_smbfs)
  • you should NOT see subvolume
  • if there is no subvolume on the shared volume, just create on (btrfs sub create ./toto_sub)
  • ./toto_sub should be invisible on MacOS client
  • create another regular directory (mkdir ./toto_dir)
  • ./toto_dir show be visible on MacOS client

Thanks.

Hm,, I am not familiar with btfs sub-volume. Can you provide me the two packet dump files using wireshark on problem situation ?

  • wireshark dump using another MacOS smb client (not native like Filebrowser)
  • wireshark dump using native MacOS smb/cifs client.

Hi,

Here are the pcap files (I used tcpdump).

Thanks.

smb_macos_fb_OK.pcap.zip
smb_macos_native_KO.pcap.zip

Thanks for your help:)
I have known MacOS client send request to look-up specific files(e.g. .DS_STORE, DCIM, etc.) that is not in your share. and ksmbd return no-such-file error to MacOS client.
Can you test it with Native MacOS client and samba ? and if it is okay, Please give me wireshark dump.

Thanks!

Sorry for late response. Okay. I am confusing when checking packet dump (smb_macos_fb_OK.pcap.zip)

./toto_sub should be invisible on MacOS client

ksmbd return datas, 'monit', 'pkg', 'vm', 'users', 'services', 'logs' filename to client. there is no toto_sub filename in response buffer of ksmbd. You can see toto_sub file with Filebrowser() ?

Hi,
No problem.
Yes toto_sub is a btrfs subvol and should be visible in MacOS native Finder (but it is not). It is visible in Filebrowser app (which is not native to MacOS).

'monit', 'pkg', 'vm', 'users', 'services', 'logs' are btrfs subvolumes. They are visible in Filebrowser app but NOT in MacOS client (which is an issue).

Only regular directories and files are visible in MacOS native Finder and it is definitely not normal.