summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src/marker.h
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2011-05-08 23:41:23 +0000
committerAnand Avati <avati@gluster.com>2011-07-20 06:12:42 -0700
commite559ea5f8056472a6df8fde942239cb6342dc23e (patch)
treef781e2ac4e2381f3f245dcbf4afeae3607995f0f /xlators/features/marker/src/marker.h
parentfd60df8798b74ea2a9c793798d4ad2ab3fbf9394 (diff)
features/marker: fix race-conditions, memory corruptions and fd-leaks.
- remove xattrs from newpath after rename is complete. - hold inodelk on both parents (if they are different) before doing rename and gather contribution values of oldpath and newpath to their parents while still holding the locks. Use these contribution values to reduce parent sizes. - performance optimization: abort updation process if delta is zero. - libglusterfs/call-stub: Allow unwinding of frames for rename during call_resume_unwind. - fixes in dirty inode healing codepath: - fix fd-leak of fd opened on the directory. - don't add (instead just assign) next offset at which readdir has to be sent to local->d_off. - assign to local->d_off before winding lookup call to get child contribution. - use mutexes while accessing contribution values stored in inode context. - use contribution values from backend instead of in-memory while reducing parent sizes during rename - wipe parent_loc in marker_local_unref. - check for refcount being zero holding lock in quota_local_unref. - hold parent inodelk during creation of xattrs on directory. - use contribution value to reduce parent's size, if the value to be subtracted is not passed as argument to reduce_parent_size. - skip contribution creation on root. Change-Id: I97a9ac7efc5cf82abd3837fa6f9766c35676a908 BUG: 2697 Signed-off-by: Junaid <junaid@gluster.com> Reviewed-on: http://review.gluster.com/31 Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/features/marker/src/marker.h')
-rw-r--r--xlators/features/marker/src/marker.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/features/marker/src/marker.h b/xlators/features/marker/src/marker.h
index ea1f5cc0a99..8f4e11a5beb 100644
--- a/xlators/features/marker/src/marker.h
+++ b/xlators/features/marker/src/marker.h
@@ -28,6 +28,7 @@
#include "xlator.h"
#include "defaults.h"
#include "uuid.h"
+#include "call-stub.h"
#define MARKER_XATTR_PREFIX "trusted.glusterfs"
#define XTIME "xtime"
@@ -65,10 +66,15 @@ struct marker_local{
uint32_t timebuf[2];
pid_t pid;
loc_t loc;
+ loc_t parent_loc;
+ loc_t *next_lock_on;
int32_t ref;
int32_t ia_nlink;
gf_lock_t lock;
mode_t mode;
+ int32_t err;
+ call_stub_t *stub;
+ int64_t contribution;
struct marker_local *oplocal;
};
typedef struct marker_local marker_local_t;