diff options
author | Joseph Fernandes <josferna@redhat.com> | 2015-11-21 01:04:21 +0530 |
---|---|---|
committer | Dan Lambright <dlambrig@redhat.com> | 2015-11-25 08:21:35 -0800 |
commit | 9b151f4ddc2636607b15424c94a09f619f2e5cb8 (patch) | |
tree | b3f8646b4981fd92ef87748c47e3f89898fccea6 /tests/basic/rpc-coverage.t | |
parent | 03f731a8b32db7bef7c5e9ffc11c16f670ffe960 (diff) |
tier/ctr: Correcting rename logic
Problem: When a file with old_file_name and GFID_1 is renamed with a new_file_name
which already exists and with GFID_2, this is what happens in linux internaly.
a. "new_file_name" is unlinked for GFID_2
b. a hardlink "new_file_name" is created to GFID_1
c. "old_file_name" hardlink is unlinked for GFID_2.
Well this is all internal to linux, and gluster just issues a rename system call
at POSIX layer. But CTR Xlator doesn't delete the entries corresponding to the
"new_file_name" and GFID_2. Thus leaving the stale entry in the DB.
The following are the implications.
a. Promotion are tried on these stale entries which will fail and show
false results in the status of migration,
b. GFID_2 Files with 2 hardlinks, which will have only one hardlink
after the rename will not be promoted or demoted as the DB shows 2 entries.
Solution: Delete the older database entry for the replaced hardlink
Change-Id: I4eafa0872253e29ff1f0bec4283bcfc579ecf0e2
BUG: 1284090
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
Reviewed-on: http://review.gluster.org/12711
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'tests/basic/rpc-coverage.t')
0 files changed, 0 insertions, 0 deletions