-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
btrfs subvolume invisible on macos #487
Comments
Hm,, I am not familiar with btfs sub-volume. Can you provide me the two packet dump files using wireshark on problem situation ?
|
Hi, Here are the pcap files (I used tcpdump). Thanks. |
Thanks for your help:) Thanks! |
Hi,Sorry but I don’t have any samba install available.I would be a complicated task in my context.Is there something else that can I do to help ?Thanks On 20 Sep 2024, at 03:03, Namjae Jeon ***@***.***> wrote:
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!
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Sorry for late response. Okay. I am confusing when checking packet dump (smb_macos_fb_OK.pcap.zip)
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, '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. |
same problem here. MacOS builtin smb client not showing btrfs-subvolume "directories" |
It seems that cause of the problem is same inode number for all subvolumes and the "." entry (the btrfs mount itself) |
all btrfs subvolumes have inode number 256. Here is a ksmbd hack that seems to workaround that - map 256 to 0. Clients seem to be required to support value of zero - when they see 0, they are required to do some client side inode number generation.
|
@gatispei Thanks for your check and help:) I can see this code in btrfs. Can we use ->subvol of kstat if result_mask has STATX_SUBVOL?
|
That seems useful, you would need to xor subvol with inode or combine them some other way to get semi unique file id, as files that appear in multiple subvolumes also have same inode number in respective subvolumes. Now for some reason non-uniuque inodes in different directories did not seem to upset the macos client, but maybe it is because it reverted to local id generation for -all- files upon seeing first zero fileid. Not the first to hit the problem: |
Can you suggest the patch for this ?
I have checked it. But it seems that NFS did not apply the patch mentioned in the article. |
|
@gatispei Looks good to me:) Can you update the patch description and add the subject using git command ? |
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 :
Thanks.
The text was updated successfully, but these errors were encountered: