diff options
author | Anand Avati <avati@gluster.com> | 2010-02-22 08:59:10 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-02-22 06:45:37 -0800 |
commit | abc6d28b964dc4294324a5fba479542c85abff38 (patch) | |
tree | f1bbe94b561ffe7552e4f325a288320e5cdc4924 /xlators/cluster/dht/src/dht-common.h | |
parent | 7921153c2e0a5520058c777e3f7179772c38adb1 (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.h | 7 |
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 ca4a1d33e10..ca047ef3271 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 */ |