Whamcloud - gitweb
fuse2fs: refuse to mount fs with ea_inode feature
authorTahsin Erdogan <tahsin@google.com>
Wed, 5 Jul 2017 03:53:59 +0000 (23:53 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 5 Jul 2017 03:53:59 +0000 (23:53 -0400)
ext2fs_xattr_set() currently does not support creating xattr inodes,
so allowing fuse2fs to mount a filesystem with ea_inode feature could
lead to corruption. Refuse to mount if the ea_inode feature is set.

Signed-off-by: Tahsin Erdogan <tahsin@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/fuse2fs.c

index b589768..956348f 100644 (file)
@@ -3786,6 +3786,12 @@ int main(int argc, char *argv[])
        global_fs->priv_data = &fctx;
 
        ret = 3;
+       if (ext2fs_has_feature_ea_inode(global_fs->super)) {
+               printf(_("%s: fuse2fs does not support ea_inode feature.\n"),
+                      fctx.device);
+               goto out;
+       }
+
        if (ext2fs_has_feature_journal_needs_recovery(global_fs->super)) {
                if (!fctx.ro) {
                        printf(_("%s: recovering journal\n"), fctx.device);