Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#15730 closed bug (fixed)

Allow delete "bad data" files

Reported by: X512 Owned by: axeld
Priority: normal Milestone: R1/beta2
Component: File Systems/BFS Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by X512)

This is hrev53888.

Because of file system corruption "bad data" files appear sometimes. Any attempts to delete such files fails. It should be possible to delete "bad data" files.

Following contents are written to syslog when attempting to delete "bad data" file with rm command:

KERN: bfs: InitCheck:325: Bad data
KERN: bfs: KERN: inode at 2881058 is already deleted!
KERN: bfs: InitCheck:325: Bad data
KERN: bfs: KERN: inode at 2881058 is already deleted!

Problem is likely here: https://xref.landonf.org/source/xref/haiku/src/add-ons/kernel/file_systems/bfs/Inode.cpp#2507. Deletion is refused if opening inode fails. BFS driver should delete file entry in directory even if inode can't be opened.

Change History (5)

comment:1 by X512, 5 years ago

Description: modified (diff)

comment:2 by X512, 5 years ago

Proposed fix: https://review.haiku-os.org/c/haiku/+/2257.

After manually deleting all "bad data" files, file system is recovered and no checkfs errors are reported.

comment:3 by X512, 5 years ago

Fixed in hrev53943.

comment:4 by diver, 5 years ago

Resolution: fixed
Status: newclosed

comment:5 by nielx, 5 years ago

Milestone: UnscheduledR1/beta2

Assign tickets with status=closed and resolution=fixed within the R1/beta2 development window to the R1/beta2 Milestone

Note: See TracTickets for help on using tickets.