Modify

Opened 6 years ago

Closed 6 years ago

#1 closed defect (fixed)

ext2 won't work if FAT is enabled

Reported by: hawke@… Owned by: stepan
Priority: minor Milestone: FILO 0.6
Component: FILO Version:
Keywords: Cc:
Dependencies: Patch Status: patch has been committed

Description

If both the FAT filesystem and the ext2 filesystem are enabled, the ext2 filesystem cannot be used because filo treats any FS as fat.

This may also apply to other filesystems when there are several enabled

Attachments (2)

filo-fat.diff (4.0 KB) - added by stepan 6 years ago.
potential fix for the problem.
filo-fat.2.diff (4.0 KB) - added by oxygene 6 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 6 years ago by stepan

  • Milestone set to FILO 0.6

comment:2 Changed 6 years ago by stepan

  • Owner changed from somebody to stepan

Can you provide more information on this issue please? (ie. compile FILO with debugging for VFS and the filesystems. This problem seems to be very sporadic. I could not reproduce it in any case here, but Patrick told me he had seen it before.

Changed 6 years ago by stepan

potential fix for the problem.

comment:3 Changed 6 years ago by stepan

  • Patch Status changed from there is no patch to patch needs review
  • Status changed from new to assigned

I attached a potential fix for the problem.

According to Wikipedia, the type entries are mandatory in the FAT extended BPB.

Didn't test this, neither with a FAT device, now with an ext2 device. Please report any positive or negative tests.

comment:4 Changed 6 years ago by hawke@…

It works, but has warnings:
/usr/src/filo/fs/fsys_fat.c: In function 'fat_mount':
/usr/src/filo/fs/fsys_fat.c:102: warning: pointer targets in passing argument 1 of 'strcmp' differ in signedness
/usr/src/filo/fs/fsys_fat.c:103: warning: pointer targets in passing argument 1 of 'strcmp' differ in signedness
/usr/src/filo/fs/fsys_fat.c:104: warning: pointer targets in passing argument 1 of 'strcmp' differ in signedness

Changed 6 years ago by oxygene

comment:5 Changed 6 years ago by oxygene

After some talk on IRC, it was clear that the patch only solves the issue part-way: FAT isn't a "grab-all" filesystem anymore, but now it's "grab nothing".

new version of the patch with strcmp(...) replaced by strncmp(..., 5), so the 0x20 padding of the type field doesn't interfere.

hawke tested such a change already, so I think it's good to go, but I'll wait for a day for comments.

comment:6 Changed 6 years ago by oxygene

  • Patch Status changed from patch needs review to patch has been committed
  • Resolution set to fixed
  • Status changed from assigned to closed

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.