aboutsummaryrefslogtreecommitdiff
path: root/resize
diff options
context:
space:
mode:
authorTahsin Erdogan <tahsin@google.com>2017-07-04 23:53:59 -0400
committerTheodore Ts'o <tytso@mit.edu>2017-07-04 23:53:59 -0400
commit0446b9907fbdc8f130ec35726bc8b9cdd493a1cb (patch)
tree06b139d91f8db7908dedd8db2caf8fb78a8b1478 /resize
parentcfc8fae36b81466e827a8bd16a1185b3dac80062 (diff)
downloade2fsprogs-0446b9907fbdc8f130ec35726bc8b9cdd493a1cb.tar.gz
resize2fs: moving xattr inodes is not supported
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>
Diffstat (limited to 'resize')
-rw-r--r--resize/resize2fs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/resize/resize2fs.c b/resize/resize2fs.c
index 8f6d95e7..a54564f0 100644
--- a/resize/resize2fs.c
+++ b/resize/resize2fs.c
@@ -2058,6 +2058,15 @@ static errcode_t inode_scan_and_fix(ext2_resize_t rfs)
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.