Skip to contentSkip to conversation

hfsplus: fix B-tree corruption after insertion at position 0

PATCH Sergei Antonov 1 participant 1 message Mar 18, 2015 1 message not in the archive VFS

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 1 line · Hin-Tak Leung

Can you describe a bit more about the symptom please?

Some files and directories are gone. Depending on which of the catalog file's nodes reside in the unavailable extents, it may vary from "some data can be salvaged" to "screw it, reformat the volume".

Quoted 5 lines

I am
wondering whether it is related to an issue I have had which is quite reproducible:
If I merely run "du" repeatedly on a large directory on an HFS+ formatted drive, on a somewhat resource-tight system (having firefox running with lots windows seems to make it happens sooner, and it was on a system with only 2GB memory).

Then what?

Quoted 8 lines

I was able to do with with two separate drives, one had user data which I have edited by hand somewhat,
but the other was was a qcow2 image of an essentially newly installed and clean Mac OS X system disk through qemu/kvm.

Also, the logic of hfs_brec_insert() in the plain hfs (without +) driver in fs/hfs/brec.c is essentially the same, so I believe there is the need of another similiar patch for that also. Can you provide that also?

No. The original HFS is very old. The only reasonable purpose of its implementation in Linux IMO is to read data from old disks. Read-only mode that is.