Commit 96200be3 authored by Jan Kara's avatar Jan Kara

udf: Mount filesystem read-only if it has pseudooverwrite partition

As we don't properly support writing to pseudooverwrite partition (we should
add entries to VAT and relocate blocks instead of just writing them), mount
filesystems with such partition as read-only.
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent fa5e0815
...@@ -1208,6 +1208,14 @@ static int udf_load_partdesc(struct super_block *sb, sector_t block) ...@@ -1208,6 +1208,14 @@ static int udf_load_partdesc(struct super_block *sb, sector_t block)
ret = udf_fill_partdesc_info(sb, p, i); ret = udf_fill_partdesc_info(sb, p, i);
if (ret) if (ret)
goto out_bh; goto out_bh;
/*
* Mark filesystem read-only if we have a partition with virtual map
* since we don't handle writing to it (we overwrite blocks instead of
* relocating them).
*/
sb->s_flags |= MS_RDONLY;
printk(KERN_NOTICE "UDF-fs: Filesystem marked read-only because "
"writing to pseudooverwrite partition is not implemented.\n");
ret = udf_load_vat(sb, i, type1_idx); ret = udf_load_vat(sb, i, type1_idx);
out_bh: out_bh:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment