summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorTahsin Erdogan <tahsin@google.com>2017-07-23 22:54:58 -0400
committerTheodore Ts'o <tytso@mit.edu>2017-07-23 23:15:08 -0400
commit50d0998cfee25d09dbddb8a10269a072d89aee14 (patch)
tree35d312e45b66ea066290683d771546b4633954e2 /contrib
parent7649f31d4c1d1c7bddb7e7d0235c0b4fa19f1dff (diff)
libext2fs: add ea_inode support to set xattr
This patch is a major update to how we decide where to put extended attributes. The main motivation is to enable creating values in extended attribute inodes. While doing this, we want to implement a behavior that is as close to kernel as possible. Existing set ea code deviates from kernel behavior which makes it harder to implement ea_inode feature: - kernel only sorts ea entries in xattr block, e2fsprogs implementation sorts all entries on every update. - e2fsprogs implementation shuffled things on every update so the order of updates does not matter. Kernel does not reshuffle things. - e2fsprogs could evacuate entries from inode body to xattr block and vice versa. This behavior does not exist in kernel. Such differences could lead to inconsistent behavior between fuse2fs and a kernel mount. With ea_inode feature, we also need to decide whether to put a value in an inode or keep it 'inline'. In kernel implementation this depends on current placement of entries. To close the behavioral gap, ext2fs_xattr_set() now takes over the decision about where to place ea values. This also allows it to raise errors early instead of delaying them to a separate ext2fs_xattrs_write() call later. Signed-off-by: Tahsin Erdogan <tahsin@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/android/perms.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/contrib/android/perms.c b/contrib/android/perms.c
index 9a7a93f5..08fb8614 100644
--- a/contrib/android/perms.c
+++ b/contrib/android/perms.c
@@ -48,12 +48,6 @@ static errcode_t ino_add_xattr(ext2_filsys fs, ext2_ino_t ino, const char *name,
_("while setting xattrs of inode %u"), ino);
goto xattrs_close;
}
- retval = ext2fs_xattrs_write(xhandle);
- if (retval) {
- com_err(__func__, retval,
- _("while writting xattrs of inode %u"), ino);
- goto xattrs_close;
- }
xattrs_close:
close_retval = ext2fs_xattrs_close(&xhandle);
if (close_retval) {