hfsplus: fix B-tree corruption after insertion at position 0
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 8 lines · Hin-Tak Leung
Quoted 7 lines
Quoted 3 lines
Also, the logic of
hfs_brec_insert()in the plain hfs (without +) driver infs/hfs/brec.cis 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.
Quoted 7 lines
I don't think it is right to dictate how users should use their linux box. On the whole we should only stop fixing bugs if we are going to deprecate hfs (and subsequently remove it). Also, there is some value in keeping two file systems which are code-wise very similar in sync.
If you cannot find the time, but otherwise have no objection, I'd be happy to spend the time to prepare the patch, and add your signed-off on it?
Of course, I have no objections. But, please, do not add me in signed-off-by. Because signed-off-by implies some responsibility, and I do not want to have one for hfs.
Quoted 19 lines · Hin-Tak Leung
------------------------------
Quoted 7 lines · GMT Sergei Antonov
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 8 lines
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 7 lines
The kernel getting very confused, not being able to read some files/directories on the HFS+ volume, and having lots of messages in the kernel log about inconsistent b-tree.
This appears to be entirely in-memory and has no effect on on-disk data; also I can reproduce the problem by mounting read-only. If I reboot, fsck always says the hfs+ volume is clean, and I can repeat the exercise.
The patch I published recently ("hfsplus: release bnode pages after use, not before") will fix your problem. Please, test.