Opened 3 years ago

Closed 2 years ago

#11787 closed defect (fixed)

ext2 filesystem corrupted by mkdir

Reported by: Quozl Owned by: Quozl
Priority: normal Milestone: 1.75-firmware
Component: ofw - open firmware Version: Development firmware
Keywords: Cc: wmb@…
Blocked By: Blocking:
Deployments affected: Action Needed: no action
Verified: no


ok mkdir int:\test
# e2fsck -f /dev/mmcblk0p1
e2fsck 1.42 (29-Nov-2011)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Inode 14 ref count is 1, should be 2.  Fix<y>? yes

Pass 5: Checking group summary information
Directories count wrong for group #0 (2, counted=3).
Fix<y>? yes

Boot: 68/16384 files (4.4% non-contiguous), 16872/65536 blocks

Change History (5)

comment:1 Changed 3 years ago by Quozl

  • Action Needed changed from diagnose to code

The inode reference count error is due +link-count not checking filesystem feature bits.

The directory count wrong error is due to the bg_used_dirs_count value in the group descriptor not being maintained by Open Firmware when a directory is created, or deleted. used-dirs+! is easily implemented, but the call to it needs to be placed properly in the $mkdir and $rmdir flow.

comment:2 Changed 3 years ago by Quozl

  • Action Needed changed from code to review
  • Cc wmb@… added

Change made in svn 2947. It fixes both symptoms here. Mitch, could you please review?

comment:3 Changed 3 years ago by wmb@…

svn 2947 looks good.

comment:4 Changed 3 years ago by Quozl

  • Action Needed changed from review to add to build


comment:5 Changed 2 years ago by Quozl

  • Action Needed changed from add to build to no action
  • Resolution set to fixed
  • Status changed from new to closed

Is in Q4D11.

Note: See TracTickets for help on using tickets.