arter97 / exfat-linux

EOL exFAT filesystem module for Linux kernel. Everyone should be using https://github.com/namjaejeon/linux-exfat-oot instead.
Other
262 stars 61 forks source link

exfat mount option codepage not work #8

Closed ptpt52 closed 4 years ago

ptpt52 commented 4 years ago
mount -t exfat -o codepage=cp437 /dev/sda1 /mnt/sda1
mount: mounting /dev/sda1 on /mnt/sda1/ failed: Invalid argument

and

mount -t exfat /dev/sda1 /mnt/sda1
work and codepage is default to cp936 on my ubuntu
arter97 commented 4 years ago

Please post kernel log(dmesg) after the failing command.

ptpt52 commented 4 years ago

log:

[ 6472.167084] exFAT-fs (sda1[8:1]): trying to mount...
[ 6472.172248] exFAT-fs (sda1[8:1]): failed to parse options
[ 6472.177764] exFAT-fs (sda1[8:1]): failed to mount! (-22)
ptpt52 commented 4 years ago

also these option on works

delayed_meta
bps=512
ptpt52 commented 4 years ago

I notice it

codepage=936

works

but

ls -l sda1/
ls: sda1/xxx.txt: No such file or directory
ls: sda1/1234.img: No such file or directory

cannot read files in /mnt/sda1/

ptpt52 commented 4 years ago

more info: I touch /mnt/sda1/xxx.txt on my Ubuntu x86_64 with exfat-linux and try to read on Openwrt mips_24k, failed to read files

and if I touch /mnt/sda1/abc.txt on Openwrt mips_24k with exfat-linux and try to read on Ubuntu, failed....

ptpt52 commented 4 years ago

@arter97 hi any progress?

ptpt52 commented 4 years ago

Please help fix this bug?

arter97 commented 4 years ago

I'm sorry, I've been busy with my Uni past few weeks.

Can you explain why you're customizing charset? Does default not work as expected?

ptpt52 commented 4 years ago

for now it is not about charset My usb disk format in linux with exfat-nofuse and create some files into it

then put it to system with exfat-linux, it could not read files logs:

ls -l sda1/
ls: sda1/xxx.txt: No such file or directory
ls: sda1/1234.img: No such file or directory
arter97 commented 4 years ago

Is codepage 437 and charset utf8 available in your kernel? Please check your kernel config and look for these: CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_UTF8=y

ptpt52 commented 4 years ago

yes, codepage 437 and charset utf8 is ready in my kernel.

arter97 commented 4 years ago

So to sum up, your x86's Ubuntu setup works nicely but your MIPS based OpenWrt have encoding issues?

ptpt52 commented 4 years ago

x86 Ubuntu with exfat-linux not work too

Park Ju Hyung notifications@github.com 于 2019年12月23日周一 17:41写道:

So to sum up, your x86's Ubuntu setup works nicely but your MIPS based OpenWrt have encoding issues?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/arter97/exfat-linux/issues/8?email_source=notifications&email_token=ABIVTYTCNYGJQF7LRHEKVCLQ2CBVFA5CNFSM4JSODG6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHQWVZA#issuecomment-568421092, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIVTYQC5DSIPWE4TZK3JMTQ2CBVFANCNFSM4JSODG6A .

arter97 commented 4 years ago

more info: I touch /mnt/sda1/xxx.txt on my Ubuntu x86_64 with exfat-linux and try to read on Openwrt mips_24k, failed to read files

and if I touch /mnt/sda1/abc.txt on Openwrt mips_24k with exfat-linux and try to read on Ubuntu, failed....

Is this still the main issue? I'm failing to understand what really is the issue now.

ptpt52 commented 4 years ago

yes

arter97 commented 4 years ago

Did you change CONFIG_EXFAT_DEFAULT_CODEPAGE or CONFIG_EXFAT_DEFAULT_IOCHARSET on your MIPS kernel?

ptpt52 commented 4 years ago

no, I never change the CONFIG_EXFAT_DEFAULT_CODEPAGE....

it maybe some bug related to mips vs x86

arter97 commented 4 years ago

Were there any build warnings when you were building exFAT on MIPS? What kernel version is your router running?

ptpt52 commented 4 years ago

I do test again I format my usb disk on windows 10 to exfat and copy some files into it.

then put the usb disk to my Openwrt mips router with exfat-linux read failed:

root@X-WRT:~# ls /mnt/sda1/
ls: /mnt/sda1/System Volume Information: No such file or directory
ls: /mnt/sda1/node.exe: No such file or directory
ls: /mnt/sda1/node_etw_provider.man: No such file or directory
ls: /mnt/sda1/nodevars.bat: No such file or directory
ls: /mnt/sda1/npm: No such file or directory
ls: /mnt/sda1/npm.cmd: No such file or directory
ls: /mnt/sda1/npx: No such file or directory
ls: /mnt/sda1/npx.cmd: No such file or directory

kernel 4.19.86

build with no warnning.

ptpt52 commented 4 years ago

and more info to you: on mipsel system, exfat-linux work fine

root@X-WRT:~# ls -l /mnt/sda1/
drwxrwxrwx    2 lede     lede        131072 Dec 23 19:37 System Volume Information
-rwxrwxrwx    1 lede     lede      28787352 Dec 17 06:55 node.exe
-rwxrwxrwx    1 lede     lede          8969 Oct 10 06:01 node_etw_provider.man
-rwxrwxrwx    1 lede     lede           702 Oct 10 06:01 nodevars.bat
-rwxrwxrwx    1 lede     lede           930 Dec 13 06:01 npm
-rwxrwxrwx    1 lede     lede           483 Oct 10 06:01 npm.cmd
-rwxrwxrwx    1 lede     lede           922 Dec 13 06:01 npx
-rwxrwxrwx    1 lede     lede           539 Oct 10 06:01 npx.cmd
arter97 commented 4 years ago

So this could be a big endian issue, I believe this particular driver wasn't tested on a big endian system. I'll have a look after the holidays.

ptpt52 commented 4 years ago

Thank you for your time and wish you a happy holiday

ptpt52 commented 4 years ago

I am trying to fix it, Please review

arter97 commented 4 years ago

Endian sanity check needs to be done more thoroughly, I'll review the entire code after the holidays. Meanwhile, it'll be great if you can confirm whether your attempt fixes your issue.

Thanks.

arter97 commented 4 years ago

The master branch is now rebased to a different base, and all existing previous issues need to be re-evaluated.

https://github.com/arter97/exfat-linux/releases/tag/5.8-1arter97

Please re-open this if you believe the new base is still susceptible to this issue.