Description of problem: dosfsck'ing a newly created fs fails on ppc64 with: "Logical sector size (2 bytes) is not a multiple of the physical sector size." Version-Release number of selected component (if applicable): Found in f19, still occurs in latest from ppc.koji: dosfstools-3.0.23-1.fc21.ppc64.rpm How reproducible: Always Steps to Reproduce: 1. mkdosfs -C /tmp/t.img 1024 2. dosfsck /tmp/t.img Actual results: # mkdosfs -C /tmp/t.img 1024 mkfs.fat 3.0.23 (2013-10-15) # dosfsck /tmp/t.img fsck.fat 3.0.23 (2013-10-15) Logical sector size (2 bytes) is not a multiple of the physical sector size. # echo $? 1 Expected results: # mkdosfs -C /tmp/t.img 1024 mkfs.fat 3.0.23 (2013-10-15) # dosfsck /tmp/t.img fsck.fat 3.0.23 (2013-10-15) # echo $? 0 Additional info: Reverting the change to GET_UNALIGNED_W from commit 4a265c6 fixes this: http://daniel-baumann.ch/gitweb/?p=software/dosfstools.git;a=commitdiff;h=4a265c6#patch2
Thanks for the report, it seems the problem is in the double conversion on big endians. The first conversion is done by the explicit conversion to __u16, so the secondary conversion by le16toh is redundant.
Created attachment 827840 [details] Proposed fix sent upstream
dosfstools-3.0.22-3.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/dosfstools-3.0.22-3.fc19
dosfstools-3.0.23-2.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/dosfstools-3.0.23-2.fc20
Package dosfstools-3.0.22-3.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing dosfstools-3.0.22-3.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-21876/dosfstools-3.0.22-3.fc19 then log in and leave karma (feedback).
dosfstools-3.0.24-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/dosfstools-3.0.24-1.fc20
dosfstools-3.0.22-3.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
dosfstools-3.0.24-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.