In some cases, resize2fs needs to move inodes because their inode
number is greater than the maximum allowed. Moving extended attribute
inodes would require updating all the references to them. This
is currently not supported.
Signed-off-by: Tahsin Erdogan <tahsin@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
ec EXT2_ET_INODE_CORRUPTED,
"Inode is corrupted"
+ec EXT2_ET_CANNOT_MOVE_EA_INODE,
+ "Cannot move extended attribute inode"
+
end
goto remap_blocks; /* Don't need to move inode. */
/*
+ * Moving an extended attribute inode requires updating all inodes
+ * that reference it which is a lot more involved.
+ */
+ if (inode->i_flags & EXT4_EA_INODE_FL) {
+ retval = EXT2_ET_CANNOT_MOVE_EA_INODE;
+ goto errout;
+ }
+
+ /*
* Find a new inode. Now that extents and directory blocks
* are tied to the inode number through the checksum, we must
* set up the new inode before we start rewriting blocks.