Skip to contentSkip to conversation

resize2fs: add support for resizing filesystems with ea_inode feature

PATCH In review Tahsin Erdogan 2 participants 2 messages Jul 15, 2017 – Jul 24, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 resize2fs: add support for resizing filesystems with ea_inode feature

Resizing filesystems with ea_inode feature was disallowed so far because the code for updating the ea entries was missing. This patch adds that support.

---
 lib/ext2fs/ext2_err.et.in |   3 -
 resize/resize2fs.c        | 167 +++++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 157 insertions(+), 13 deletions(-)
lib/ext2fs/ext2_err.et.in +0 -3
index c5a9ffcc420c..ac96964d93d0 100644
@@ -542,7 +542,4 @@ ec	EXT2_ET_CORRUPT_JOURNAL_SB,
 ec	EXT2_ET_INODE_CORRUPTED,
 	"Inode is corrupted"
 
-ec	EXT2_ET_CANNOT_MOVE_EA_INODE,
-	"Cannot move extended attribute inode"
-
 	end
resize/resize2fs.c +157 -10

197 lines not on this page · raw message

Signature · 1 line
2.13.2.932.g7449e964c-goog
#1 lore raw
Quoted 5 lines · Tahsin Erdogan

Resizing filesystems with ea_inode feature was disallowed so far because the code for updating the ea entries was missing. This patch adds that support.

Thanks, applied. I do have a few comments; if you can look into providing some test cases, that would be great. Also, although this isn't first change that we've added to resize2fs which has this property, it used to be that if resize2fs was interrupted, the user could usually recover by running e2fsck. With ea_inode, there will be cases where resize2fs getting interrupted could result in the file system's extended attributes getting pretty badly scrambled.

Using an undo file is one way to solve the problem; so perhaps something we should consider is making the undo file enabled by default. (Although then we need to figure out where to put it; the current directory might not be the right place, especially if it happens to be /tmp.)

- Ted