Re: [v8 2/5] ext4: adds project ID support

From
Jan Kara <jack@suse.cz>
Date
2015-01-08 08:51:05
Also in
linux-ext4, linux-fsdevel
Reply to
Andreas Dilger, 2015-01-07
On Wed 07-01-15 16:11:16, Andreas Dilger wrote:
On Dec 8, 2014, at 10:22 PM, Li Xi [off-list ref] wrote:
quoted
This patch adds a new internal field of ext4 inode to save project
identifier. Also a new flag EXT4_INODE_PROJINHERIT is added for
inheriting project ID from parent directory.

Signed-off-by: Li Xi <redacted>
Reviewed-by: Jan Kara <jack@suse.cz>
---
...
quoted
@@ -4249,6 +4266,18 @@ static int ext4_do_update_inode(handle_t *handle,
		}
	}

+	BUG_ON(!EXT4_HAS_RO_COMPAT_FEATURE(inode->i_sb,
+			EXT4_FEATURE_RO_COMPAT_PROJECT) &&
+	       i_projid != EXT4_DEF_PROJID);
+	if (i_projid != EXT4_DEF_PROJID &&
+	    (EXT4_INODE_SIZE(inode->i_sb) <= EXT4_GOOD_OLD_INODE_SIZE ||
+	     (!EXT4_FITS_IN_INODE(raw_inode, ei, i_projid)))) {
+		spin_unlock(&ei->i_raw_lock);
+		err = -EFBIG;
I'm not sure if -EFBIG is the best error case, since that is a common
filesystem error.  Maybe -EOVERFLOW would be better?
  So my thought has been that this is mostly a sanity check and we would
check in tune2fs whether all inodes have enough space when setting
EXT4_FEATURE_RO_COMPAT_PROJECT feature... Because sudden errors (regardless
whether it will be EFBIG or EOVERFLOW) when renaming files will be hard to
understand for sysadmins IMHO.

								Honza
-- 
Jan Kara [off-list ref]
SUSE Labs, CR
Thread (15 messages) 15 messages, 7 authors, 2015-01-22
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help