Skip to content
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

wrong disk size #577

Closed
FireStorma opened this issue Aug 17, 2022 · 18 comments
Closed

wrong disk size #577

FireStorma opened this issue Aug 17, 2022 · 18 comments
Labels
no issue This is not ksmbd issue

Comments

@FireStorma
Copy link

Hi

In previous commit
the way sector size is handled changed. That causes a weird bug / problem with the right sector size. The size of a hard drive shows double or even more of the acutal size of a mapped hard drive.

The issue with wrong disk size is only visible when the share is mapped to a network drive (e.g. Z) otherwise the right size is shown.

@namjaejeon
Copy link
Member

Hi

Can you tell me how to reproduce it ? I can not reproduce it on ksmbd & ext4(local fs) ?

@namjaejeon
Copy link
Member

Let me know what local fs is used for share (ext4? zfs?) ?

@FireStorma
Copy link
Author

FireStorma commented Aug 18, 2022

Sorry my fault, using NTFS MBR. And thank you for taking my issue as serious. Beside that, I am not sure if this fits to the topic. However, there is another problem:

Android / Smart TV does not recognize the smb anymore, which makes it very difficult on SMART TV's as simply the smb folder does not show up. Same on Android, but for Android if I use xplorer app it works. However, it used to work with default files manager. And Smart TV there is no work around possible. Nevertheless, I can confirm in past it worked with both, with no problems.

@namjaejeon
Copy link
Member

? NTFS MBR ? When I tried to reproduce it on ksmbd & ntfs3 filesytem, I can not reproduce it.

Can you help me reproduce your issue ?

Android / Smart TV does not recognize the smb anymore, which makes it very difficult on SMART TV's as simply the smb folder does not show up. Same on Android, but for Android if I use xplorer app it works. However, it used to work with default files manager. And Smart TV there is no work around possible. Nevertheless, I can confirm in past it worked with both, with no problems

Sorry, Is it ksmbd issue ?

@namjaejeon
Copy link
Member

Can I try to reproduce it with network drive in windows client ?

@the-j0k3r
Copy link

the-j0k3r commented Aug 18, 2022

So this has more detailed information since @FireStorma just omitted entirely, I took it upon myself to try to duplicate in order to gather relevant information much needed to try make some head or tails of these reports.

ksmbd is being used in DD-WRT along with wdds2 and ntf3 in this case, the information below was pulled from the following report downstream at out community forums where we have aggregated several other similar reports from various other users.

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1269700#1269700

Capture
The drive is 500GB HDD NTFS formatted not that it matters.

The below screenshot shows the test samba configuration and included the share Mapped to a Network Drive Y:
Capture

Clearly shows a 1.81TB drive, which is a nice way to turn a 500GB drive into more than triple the size ;)

This is a common report across DD-WT after the commit cca2e29 was merged in (see corresponding commit downstream https://svn.dd-wrt.com/changeset/48606)

Please dont hesitate to ask for any further information I will try to find time to pull it.

and shameless ping to @BrainSlayer

@FireStorma please try to stick to the topic, your woes with share visibility SmartTV side is offtopic, that is a separate issue unrelated to ksmbd.

@namjaejeon
Copy link
Member

@the-j0k3r There are some suspicious code, but this issue can't be reproduced on my windows client, so I can't confirm whether it improves or not even though I make the patch. Are you reproducible? Or can any of the dd-wrt users reproduce the problem?

@namjaejeon
Copy link
Member

@the-j0k3r @BrainSlayer When I checked ksmbd source in dd-wrt is different with mainline ksmbd.
FS_SIZE_INFORMATION and FS_FULL_SIZE_INFORMATION in smb2pdu.c is different with mainline ksmbd.
FS_SIZE_INFORMATION and FS_FULL_SIZE_INFORMATION is related with disk size info.
if you make it same with mainline ksmbd, I think that this issue will be clear.
Please update ksmbd in dd-wrt.

@namjaejeon namjaejeon added wontfix This will not be worked on no issue This is not ksmbd issue and removed wontfix This will not be worked on labels Aug 19, 2022
@the-j0k3r
Copy link

Right. thanks for the info, I thought that mostly ksmbd was like for like, but will indeed pass this along and retest.

@FireStorma
Copy link
Author

@the-j0k3r
Can you tell me where I can report the issue with Android / Smart TV as this is truly a bug that occured as well with an firmware update long time ago.

@the-j0k3r
Copy link

the-j0k3r commented Aug 19, 2022

@namjaejeon seems the issue is now fixed downstream with the following patch https://svn.dd-wrt.com/changeset/49776

Capture

Indeed that in future we shouldn't report any issues here ksmbd, since the DD-WRT ksmbd is not in sync, perhaps due to backporting issues to kernel 4.x which is a shame. So I have to apologize for this noise it was my fault to begin with ;)

Thank you so much for having us around anyway, feel free to close this.

@namjaejeon
Copy link
Member

namjaejeon commented Aug 19, 2022

@the-j0k3r No problem, I am always grateful for the use of ksmbd in the dd-wrt project. As long as I know how to reproduce, I can help with ksmbd issues in dd-wrt.

@BrainSlayer I think this is my mistake. Perhaps you applied the patch I reverted. When ksmbd mainline patches are applied to ksmbd of dd-wrt, if you take the patches when I release the version, we can avoid this problem in the future.

@the-j0k3r
Copy link

@the-j0k3r No problem, I am always grateful for the use of ksmbd in the dd-wrt project. As long as I know how to reproduce, I can help with ksmbd issues in dd-wrt.

Thank you, our ksmbd version being quite dissimilar and our kernels not permitting a synced version this makes your offer welcome and interesting.

It would be nicer to get something more up to date but Im not complaining. ;)

take care and thanks again.

@BrainSlayer
Copy link

@namjaejeon i used codepieces now from the current version. it seems to have fixed the issue so far. unfortunatly i cannot keep everything up to date right now since you switched to use xarray which is unsupported by older kernels. i havent found yet a way to do a proper backport of it

@namjaejeon
Copy link
Member

@the-j0k3r Thanks!

@BrainSlayer Hm.. There is nothing I can do about xarray for now. I recommend upgrading the dd-wrt kernel to 5.4 or higher if possible. The cost of backporting it to support lower versions than 5.4 is too expensive for me. Actually, I also have a lot of work... If it is difficult to upgrade the 5.4 kernel, please exclude that patch... anyway, Thanks for your ksmbd works in dd-wrt. Let me know if there is some issue in ksmbd of dd-wrt. I will help!

@BrainSlayer
Copy link

@namjaejeon unfortunaly impossible for alot of devices. the more recent kernels are simply to big and consuming too much ram and flash space. so i have still to maintain the backport version based on your sources.

@the-j0k3r
Copy link

@namjaejeon sorry for bothering you, didn't know how to reach you regarding downstream, a minor issue with NTFS causing misbehavior https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1272277

Any patches we could pull in that would help this or any suggestions?

Thanks in advance.

@the-j0k3r
Copy link

pong @namjaejeon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no issue This is not ksmbd issue
Projects
None yet
Development

No branches or pull requests

4 participants