-
Warren Turkal authored
whether a volume has a journal or not. The code currently mounts an HFS+ volume read-only by default when a journal is detected. One can force a read/write mount by giving the "force" mount option. The current code has this behavior since there is no support for the HFS+ journal. My problem is that the detection of the journal could be better. The current code tests the attribute bit in the volume header that indicates there is a journal. If that bit is set, the code assumes that there is a journal. Unfortunately, this is not enough to really determine if there is a journal or not. When that bit is set, one must also examine the journal info block field of the volume header. If this field is 0, there is no journal, and the volume can be mounted read/write. This patch: The HFS+ support in the kernel currently will mount an HFS+ volume read-only if the volume header has the attribute bit set that indicates there is a journal. The kernel does this because there is no support for a journalled HFS+ volume. The problem is that this is only half of what needs to be checked to see if there really is a journal. There is also an entry in the volume header that tells you where to find the journal info block. In the kernel version of the kernel, this 4 byte block is labeled reserved. This patch identifies the journal info block in the header. Signed-off-by: Warren Turkal <wt@penguintechs.org> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fced310a