summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.h
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2010-02-22 08:59:10 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-02-22 06:45:32 -0800
commit9dbae0c80569689533c92a29871e3fa6dbbae1b9 (patch)
treef9037310ab6005eec07965ba72fe8f1e954c115a /xlators/cluster/dht/src/dht-common.h
parent96ed73c1556da79e0a58cf1c051471a9b322b05b (diff)
dht: unlink stale linkfiles in rmdir to prevent ENOTEMPTY
Thanks to He Xaobing <allreol@gmail.com>, this patch is inspired by http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=188#c2 Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 188 ([ glusterfs 2.0.6rc2 ] - "Directory not empty" on rm -rf) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=188
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.h')
-rw-r--r--xlators/cluster/dht/src/dht-common.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index 53aeaa0f7a6..42a75adfbde 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -70,7 +70,7 @@ struct dht_local {
struct stat stbuf;
struct stat prebuf;
struct stat preoldparent;
- struct stat postoldparent;
+ struct stat postoldparent;
struct stat preparent;
struct stat postparent;
struct statvfs statvfs;
@@ -89,6 +89,7 @@ struct dht_local {
char need_selfheal;
int file_count;
int dir_count;
+ call_frame_t *main_frame;
struct {
fop_mknod_cbk_t linkfile_cbk;
struct stat stbuf;
@@ -154,7 +155,7 @@ struct dht_disk_layout {
} list[1];
};
typedef struct dht_disk_layout dht_disk_layout_t;
-
+
#define ENTRY_MISSING(op_ret, op_errno) (op_ret == -1 && op_errno == ENOENT)
#define is_fs_root(loc) (strcmp (loc->path, "/") == 0)
@@ -269,4 +270,6 @@ void dht_layout_unref (xlator_t *this, dht_layout_t *layout);
dht_layout_t *dht_layout_ref (xlator_t *this, dht_layout_t *layout);
xlator_t *dht_first_up_subvol (xlator_t *this);
+int dht_build_child_loc (xlator_t *this, loc_t *child, loc_t *parent, char *name);
+
#endif /* _DHT_H */