diff options
author | shishir gowda <shishirng@gluster.com> | 2011-05-27 00:41:55 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-05-31 09:10:43 -0700 |
commit | 753f17aca63057e4c4a70c1f3cbf7729f890cb69 (patch) | |
tree | 85d095a1b8bdd77e2be593ea8753f7f8158cec49 /xlators/cluster/dht/src/dht-common.h | |
parent | c5a7947e6a7422360816e45fc3c12cf9c0152802 (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 bc84098b7..99b626c16 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -309,4 +309,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 */ |