|
From: Mikhail K. <vie...@vi...> - 2016-12-29 07:46:10
|
I found this kernel upstream patch: https://github.com/torvalds/linux/commit/6c6ef9f26e598fb977f60935e109cd5b266c941a From this patch description: ... Filesystems that do not support xattrs on some inodes should clear the IOP_XATTR i_opflags flag in those inodes. (Right now, some filesystems have checks to disable xattrs on some inodes in the ->list, ->get, and ->set xattr handler operations instead.) The IOP_XATTR flag is automatically cleared in inodes of filesystems that don't have xattr support. ... I was digging a little bit more in getxattr() in my kernel v4.7 (that don't have IOP_XATTR related patches), and looks like this is true. xattr_resolve_name() could not find ->get handler operation for inode and return EOPNOTSUPP error. We have inode->i_op->getxattr test that return true (since FS have xattrs support), but as soon as inode->i_op->getxattr() called, generic_getxattr() will be called (for ext4), that will call xattr_resolve_name(), xattr_resolve_name() don't find ->get handler operation and return EOPNOTSUPP error. From one side we have FS will xattrs support, from another side, we could have inode without ->list, ->get, and ->set xattr handler operations, that probably should mean "xattrs is disabled for this inode". -- Best regards, Mikhail Kurinnoi |