diff options
author | M. Mohan Kumar <mohan@in.ibm.com> | 2012-11-29 21:46:06 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2012-11-29 09:37:26 -0800 |
commit | 9707e4486fc0ad90ffb4635bf0470df59822dc01 (patch) | |
tree | 7ab2ed6f17f179938590740a6304d2dad5717540 /xlators/storage/bd_map/src/bd_map_help.c | |
parent | b1d35091afdc0192ece2a9a079f12be1f8486767 (diff) |
BD Backend: Unlink a file (LV)
BUG: 805138
Change-Id: I53d8a4bc09cbd9766ba937887cadd7ac475017ba
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Reviewed-on: http://review.gluster.org/3555
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/storage/bd_map/src/bd_map_help.c')
-rw-r--r-- | xlators/storage/bd_map/src/bd_map_help.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/xlators/storage/bd_map/src/bd_map_help.c b/xlators/storage/bd_map/src/bd_map_help.c index 3576d7056..0613aa383 100644 --- a/xlators/storage/bd_map/src/bd_map_help.c +++ b/xlators/storage/bd_map/src/bd_map_help.c @@ -352,6 +352,26 @@ out: return pentry; } +int bd_entry_rm (const char *path) +{ + bd_entry_t *bdentry = NULL; + int ret = -1; + + bdentry = bd_entry_get (path); + if (!bdentry) + goto out; + + list_del_init (&bdentry->sibling); + list_del_init (&bdentry->child); + GF_FREE (bdentry); + + ret = 0; +out: + return ret; +} + + + /* Called with priv->bd_lock held */ void bd_entry_put (bd_entry_t *entry) { |