diff options
author | shishir gowda <shishirng@gluster.com> | 2011-05-27 00:35:54 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-05-31 09:13:02 -0700 |
commit | 8e8ca7b9cd7c19e07655097e44665d9fa6c9ccb4 (patch) | |
tree | ba65ff22f2b290fef2fb815111e70ff747650e63 /xlators/cluster/dht/src/dht-common.h | |
parent | f8cc3a6a9f3979ed7cad3882e43b0fec219850a2 (diff) |
dht-rename: Unlink older link files before creating new one
If a older link file exists, unlink it and then create the linkfile.
This will prevent mis-match of gfid's.
Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 2464 ([7b07d444a77526f27f860210930bf1d4c7fbea9b]: rm -rf gives Invalid argumenrt error)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2464
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.h')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index 67cc16e43..0606546cd 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -305,4 +305,12 @@ int dht_build_child_loc (xlator_t *this, loc_t *child, loc_t *parent, char *name int dht_filter_loc_subvol_key (xlator_t *this, loc_t *loc, loc_t *new_loc, xlator_t **subvol); +int dht_rename_cleanup (call_frame_t *frame); +int dht_rename_links_cbk (call_frame_t *frame, void *cookie, xlator_t *this, + int32_t op_ret, int32_t op_errno, + inode_t *inode, struct iatt *stbuf, + struct iatt *preparent, struct iatt *postparent); + +int dht_linkfile_recreate(call_frame_t *frame, fop_mknod_cbk_t linkfile_cbk, + xlator_t *tovol, xlator_t *fromvol, loc_t *loc); #endif /* _DHT_H */ |