From 8d2aebf93baed6f8555cd02545d6f95da59cc7f3 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Mon, 24 Jun 2019 13:06:49 +0530 Subject: ctime: Set mdata xattr on legacy files Problem: The files which were created before ctime enabled would not have "trusted.glusterfs.mdata"(stores time attributes) xattr. Upon fops which modifies either ctime or mtime, the xattr gets created with latest ctime, mtime and atime, which is incorrect. It should update only the corresponding time attribute and rest from backend Solution: Creating xattr with values from brick is not possible as each brick of replica set would have different times. So create the xattr upon successful lookup if the xattr is not created Note To Reviewers: The time attributes used to set xattr is got from successful lookup. Instead of sending the whole iatt over the wire via setxattr, a structure called mdata_iatt is sent. The mdata_iatt contains only time attributes. Backport of: > Patch: https://review.gluster.org/22936 > Change-Id: I5e535631ddef04195361ae0364336410a2895dd4 > BUG: 1593542 > Signed-off-by: Kotresh HR Change-Id: I5e535631ddef04195361ae0364336410a2895dd4 updates: bz#1739430 Signed-off-by: Kotresh HR --- libglusterfs/src/libglusterfs.sym | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libglusterfs/src/libglusterfs.sym') diff --git a/libglusterfs/src/libglusterfs.sym b/libglusterfs/src/libglusterfs.sym index 188cda27bc5..60b3f317cc8 100644 --- a/libglusterfs/src/libglusterfs.sym +++ b/libglusterfs/src/libglusterfs.sym @@ -375,6 +375,7 @@ dict_get_bin dict_get_double dict_get_gfuuid dict_get_iatt +dict_get_mdata dict_get_int16 dict_get_int32 dict_get_int32n @@ -412,6 +413,7 @@ dict_set_dynstrn dict_set_dynstr_with_alloc dict_set_gfuuid dict_set_iatt +dict_set_mdata dict_set_int16 dict_set_int32 dict_set_int32n @@ -504,6 +506,7 @@ fop_lease_stub fop_link_stub fop_lk_stub fop_log_level +fop_lookup_cbk_stub fop_lookup_stub fop_mkdir_stub fop_mknod_stub -- cgit