In osd-ldiskfs, always remove S_ENCRYPTED from inode flags,
because ldiskfs must not be aware of client-side encryption status.
This info is just stored into LMA so that it can be forwared to client
side.
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ief08c059b04b8c7349d725b50b2094183eabc4d3
Reviewed-on: https://review.whamcloud.com/39558
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
/* always keep S_NOCMTIME */
inode->i_flags = ll_ext_to_inode_flags(attr->la_flags) |
S_NOCMTIME;
+#if defined(S_ENCRYPTED)
+ /* Always remove S_ENCRYPTED, because ldiskfs must not be
+ * aware of encryption status. It is just stored into LMA
+ * so that it can be forwared to client side.
+ */
+ inode->i_flags &= ~S_ENCRYPTED;
+#endif
/*
* Ext4 did not transfer inherit flags from
* @inode->i_flags to raw inode i_flags when writing