From: Tahsin Erdogan <tahsin@google.com>
To: Andreas Dilger <adilger@dilger.ca>,
"Darrick J . Wong" <darrick.wong@oracle.com>,
Theodore Ts'o <tytso@mit.edu>,
linux-ext4@vger.kernel.org
Cc: Tahsin Erdogan <tahsin@google.com>
Subject: [PATCH 12/12] resize2fs: moving xattr inodes is not supported
Date: Mon, 26 Jun 2017 06:43:48 -0700 [thread overview]
Message-ID: <20170626134348.1240-12-tahsin@google.com> (raw)
In-Reply-To: <20170626134348.1240-1-tahsin@google.com>
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>
---
lib/ext2fs/ext2_err.et.in | 3 +++
resize/resize2fs.c | 9 +++++++++
2 files changed, 12 insertions(+)
diff --git a/lib/ext2fs/ext2_err.et.in b/lib/ext2fs/ext2_err.et.in
index ac96964d93d0..c5a9ffcc420c 100644
--- a/lib/ext2fs/ext2_err.et.in
+++ b/lib/ext2fs/ext2_err.et.in
@@ -542,4 +542,7 @@ 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
diff --git a/resize/resize2fs.c b/resize/resize2fs.c
index 8f6d95e76dc8..a54564f08ae5 100644
--- a/resize/resize2fs.c
+++ b/resize/resize2fs.c
@@ -2057,6 +2057,15 @@ static errcode_t inode_scan_and_fix(ext2_resize_t rfs)
if (ino <= start_to_move)
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
--
2.13.1.611.g7e3b11ae1-goog
next prev parent reply other threads:[~2017-06-26 13:44 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-26 13:43 [PATCH 01/12] e2fsck: add support for large xattrs in external inodes Tahsin Erdogan
2017-06-26 13:43 ` [PATCH 02/12] tune2fs: do not allow disabling ea_inode feature Tahsin Erdogan
2017-06-26 13:43 ` [PATCH 03/12] e2fsck: ea_inode hash validation Tahsin Erdogan
2017-06-26 21:21 ` Andreas Dilger
2017-06-28 1:41 ` [PATCH v2 " Tahsin Erdogan
2017-06-28 1:47 ` Tahsin Erdogan
2017-06-26 13:43 ` [PATCH 04/12] e2fsck: do not early terminate extra space check Tahsin Erdogan
2017-06-26 21:23 ` Andreas Dilger
2017-06-26 23:57 ` Tahsin Erdogan
2017-06-26 13:43 ` [PATCH 05/12] e2fsck: generalize ea_refcount Tahsin Erdogan
2017-06-26 13:43 ` [PATCH 06/12] e2fsck: update i_blocks accounting for ea_inode feature Tahsin Erdogan
2017-06-26 21:36 ` Andreas Dilger
2017-06-27 11:37 ` Tahsin Erdogan
2017-06-30 1:39 ` Tahsin Erdogan
2017-06-26 13:43 ` [PATCH 07/12] e2fsck: track ea_inode references Tahsin Erdogan
2017-06-26 21:45 ` Andreas Dilger
2017-06-27 1:25 ` Tahsin Erdogan
2017-06-27 18:43 ` Andreas Dilger
2017-06-28 1:26 ` Tahsin Erdogan
2017-06-26 13:43 ` [PATCH 08/12] e2fsck: add test for ea_inode feature Tahsin Erdogan
2017-06-26 13:43 ` [PATCH 09/12] tune2fs: update ea_inode hashes when fs uuid changes Tahsin Erdogan
2017-06-26 13:43 ` [PATCH 10/12] fuse2fs: refuse to mount fs with ea_inode feature Tahsin Erdogan
2017-06-26 13:43 ` [PATCH 11/12] mke2fs: ea_inode is not supported for hurd Tahsin Erdogan
2017-06-26 13:43 ` Tahsin Erdogan [this message]
2017-07-05 4:04 ` [PATCH 01/12] e2fsck: add support for large xattrs in external inodes Theodore Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170626134348.1240-12-tahsin@google.com \
--to=tahsin@google.com \
--cc=adilger@dilger.ca \
--cc=darrick.wong@oracle.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).