From: Roman Zippel Until support for HFS+ journaling is supported and the journal can be replayed, don't modify a journaled volume. Signed-off-by: Roman Zippel Signed-off-by: Andrew Morton --- fs/hfsplus/hfsplus_raw.h | 12 +++++++----- fs/hfsplus/super.c | 8 ++++++++ 2 files changed, 15 insertions(+), 5 deletions(-) diff -puN fs/hfsplus/hfsplus_raw.h~hfsplus-dont-modify-journaled-volume fs/hfsplus/hfsplus_raw.h --- devel/fs/hfsplus/hfsplus_raw.h~hfsplus-dont-modify-journaled-volume 2005-11-04 20:57:45.000000000 -0800 +++ devel-akpm/fs/hfsplus/hfsplus_raw.h 2005-11-04 20:57:45.000000000 -0800 @@ -123,11 +123,13 @@ struct hfsplus_vh { } __packed; /* HFS+ volume attributes */ -#define HFSPLUS_VOL_UNMNT (1 << 8) -#define HFSPLUS_VOL_SPARE_BLK (1 << 9) -#define HFSPLUS_VOL_NOCACHE (1 << 10) -#define HFSPLUS_VOL_INCNSTNT (1 << 11) -#define HFSPLUS_VOL_SOFTLOCK (1 << 15) +#define HFSPLUS_VOL_UNMNT (1 << 8) +#define HFSPLUS_VOL_SPARE_BLK (1 << 9) +#define HFSPLUS_VOL_NOCACHE (1 << 10) +#define HFSPLUS_VOL_INCNSTNT (1 << 11) +#define HFSPLUS_VOL_NODEID_REUSED (1 << 12) +#define HFSPLUS_VOL_JOURNALED (1 << 13) +#define HFSPLUS_VOL_SOFTLOCK (1 << 15) /* HFS+ BTree node descriptor */ struct hfs_bnode_desc { diff -puN fs/hfsplus/super.c~hfsplus-dont-modify-journaled-volume fs/hfsplus/super.c --- devel/fs/hfsplus/super.c~hfsplus-dont-modify-journaled-volume 2005-11-04 20:57:45.000000000 -0800 +++ devel-akpm/fs/hfsplus/super.c 2005-11-04 20:57:45.000000000 -0800 @@ -262,6 +262,10 @@ static int hfsplus_remount(struct super_ printk("HFS+-fs: Filesystem is marked locked, leaving read-only.\n"); sb->s_flags |= MS_RDONLY; *flags |= MS_RDONLY; + } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) { + printk("HFS+-fs: Filesystem is marked journaled, leaving read-only.\n"); + sb->s_flags |= MS_RDONLY; + *flags |= MS_RDONLY; } } return 0; @@ -357,6 +361,10 @@ static int hfsplus_fill_super(struct sup if (!silent) printk("HFS+-fs: Filesystem is marked locked, mounting read-only.\n"); sb->s_flags |= MS_RDONLY; + } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) { + if (!silent) + printk("HFS+-fs: Filesystem is marked journaled, mounting read-only.\n"); + sb->s_flags |= MS_RDONLY; } /* Load metadata objects (B*Trees) */ _