]> git.sur5r.net Git - u-boot/blobdiff - fs/ubifs/super.c
ppc4xx: Disable trace broadcast for 44x non debug mode
[u-boot] / fs / ubifs / super.c
index 95f2a412508ec2e02b1c5ba8b57c7f02ee7774cc..39e3efec802d6929ac914ec88d10afa720e74d47 100644 (file)
@@ -727,8 +727,9 @@ static int mount_ubifs(struct ubifs_info *c)
        x = (long long)c->log_lebs * c->leb_size + c->max_bud_bytes;
        ubifs_msg("journal size:       %lld bytes (%lld KiB, %lld MiB, %d "
                  "LEBs)", x, x >> 10, x >> 20, c->log_lebs + c->max_bud_cnt);
-       ubifs_msg("media format:       %d (latest is %d)",
-                 c->fmt_version, UBIFS_FORMAT_VERSION);
+       ubifs_msg("media format:       w%d/r%d (latest is w%d/r%d)",
+                 c->fmt_version, c->ro_compat_version,
+                 UBIFS_FORMAT_VERSION, UBIFS_RO_COMPAT_VERSION);
        ubifs_msg("default compressor: %s", ubifs_compr_name(c->default_compr));
        ubifs_msg("reserved for root:  %llu bytes (%llu KiB)",
                c->report_rp_size, c->report_rp_size >> 10);
@@ -967,6 +968,15 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent)
        if (c->max_inode_sz > MAX_LFS_FILESIZE)
                sb->s_maxbytes = c->max_inode_sz = MAX_LFS_FILESIZE;
 
+       if (c->rw_incompat) {
+               ubifs_err("the file-system is not R/W-compatible");
+               ubifs_msg("on-flash format version is w%d/r%d, but software "
+                         "only supports up to version w%d/r%d", c->fmt_version,
+                         c->ro_compat_version, UBIFS_FORMAT_VERSION,
+                         UBIFS_RO_COMPAT_VERSION);
+               return -EROFS;
+       }
+
        mutex_lock(&c->umount_mutex);
        err = mount_ubifs(c);
        if (err) {
@@ -1168,6 +1178,7 @@ int ubifs_mount(char *vol_name)
                ubifs_umount(ubifs_sb->s_fs_info);
 
        INIT_LIST_HEAD(&ubifs_infos);
+       INIT_LIST_HEAD(&ubifs_fs_type.fs_supers);
 
        /*
         * Mount in read-only mode