path: root/libglusterfs
diff options
authorAshish Pandey <>2015-11-26 14:35:49 +0530
committerPranith Kumar Karampuri <>2015-12-15 00:35:59 -0800
commitc4f6521dfe6a44cee2f61ae41fc26faaf785372d (patch)
tree2dc31b5470c7a1b3213deb4b544a2fb341c9c353 /libglusterfs
parentbe438f9aa70cce9d14d72d7cf8ddee89738db36c (diff)
storage/posix: Implement .unlink directory
Problem: For EC volume, If a file descriptor is open and file has been unlinked, any further write on that fd will fail. When a write request comes, EC internally reads some blocks using anonymous fd. This read will fail as the file has already been unlinked. Solution: To solve this issue, we are using .unlink directory to keep track of unlinked file. If a file is to be unlinked while its fd is open, move this to .unlink directory and unlink it from .glusterfs and real path. Once all the fd will be closed, remove this entry form .unlink directory. Change-Id: I8344edb0d340bdb883dc46458c16edbc336916b9 BUG: 1286029 Signed-off-by: Ashish Pandey <> Reviewed-on: Reviewed-by: Krutika Dhananjay <> Reviewed-by: Xavier Hernandez <> Tested-by: NetBSD Build System <> Tested-by: Gluster Build System <> Reviewed-by: Pranith Kumar Karampuri <>
Diffstat (limited to 'libglusterfs')
2 files changed, 3 insertions, 1 deletions
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h
index e541df6..0e7aa01 100644
--- a/libglusterfs/src/common-utils.h
+++ b/libglusterfs/src/common-utils.h
@@ -359,6 +359,8 @@ union gf_sock_union {
#define GF_HIDDEN_PATH ".glusterfs"
#define IOV_MIN(n) min(IOV_MAX,n)
diff --git a/libglusterfs/src/inode.h b/libglusterfs/src/inode.h
index 46fe8f6..37083fa 100644
--- a/libglusterfs/src/inode.h
+++ b/libglusterfs/src/inode.h
@@ -93,7 +93,7 @@ struct _inode {
struct list_head hash; /* hash table pointers */
struct list_head list; /* active/lru/purge */
- struct _inode_ctx *_ctx; /* replacement for dict_t *(inode->ctx) */
+ struct _inode_ctx *_ctx; /* replacement for dict_t *(inode->ctx) */