diff options
author | Saravanakumar Arumugam <sarumuga@redhat.com> | 2015-06-09 17:49:58 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2015-06-11 05:19:09 -0700 |
commit | a6c53571a9a7c74d0fa2683b4ba04682bd6a46ad (patch) | |
tree | 2d5f3c3fcf4b4e7fa1b5ae01b100dfb5c14e8c03 /xlators/cluster/dht/src/dht-rename.c | |
parent | 3eafe6a81fecc493e60f3781246daefbf4393602 (diff) |
features/changelog: Avoid setattr fop logging during rename
Problem:
When a file is renamed and the (renamed)file's Hashing
falls into a different brick, DHT creates a special file(linkto file)
in the brick(Hashed subvolume) and carries out setattr operation
on that file.
Currently, Changelog records this(setattr) operation in Hashed
subvolume. glusterfind in turn records this operation
as MODIFY operation.
So, there is a NEW entry in Cached subvolume and MODIFY entry
in Hashed subvolume for the same file.
Solution:
Avoid logging setattr operation carried out, by
marking the operation as internal fop using xdata.
In changelog translator, check whether setattr is set
as internal fop and skip accordingly.
Change-Id: I21b09afb5a638b88a4ccb822442216680b7b74fd
BUG: 1230007
Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com>
Reviewed-on: http://review.gluster.org/11137
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-rename.c')
-rw-r--r-- | xlators/cluster/dht/src/dht-rename.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/xlators/cluster/dht/src/dht-rename.c b/xlators/cluster/dht/src/dht-rename.c index f3344c8c976..7563cbbd540 100644 --- a/xlators/cluster/dht/src/dht-rename.c +++ b/xlators/cluster/dht/src/dht-rename.c @@ -364,22 +364,6 @@ dht_rename_track_for_changelog (xlator_t *this, dict_t *xattr, } -#define DHT_MARK_FOP_INTERNAL(xattr) do { \ - int tmp = -1; \ - if (!xattr) { \ - xattr = dict_new (); \ - if (!xattr) \ - break; \ - } \ - tmp = dict_set_str (xattr, GLUSTERFS_INTERNAL_FOP_KEY, "yes"); \ - if (tmp) { \ - gf_msg (this->name, GF_LOG_ERROR, 0, \ - DHT_MSG_DICT_SET_FAILED, \ - "Failed to set dictionary value: key = %s," \ - " path = %s", GLUSTERFS_INTERNAL_FOP_KEY, \ - local->loc.path); \ - } \ - }while (0) #define DHT_MARKER_DONT_ACCOUNT(xattr) do { \ int tmp = -1; \ |