summaryrefslogtreecommitdiff
path: root/source4/cluster/ctdb
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-03-03 10:50:53 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-03-03 10:50:53 +0100
commit7dd0cd26d32980d4edb9db5c77c98a2b112e24cb (patch)
tree025dad49b789c0e9f2eb03d87ec386295630b3f0 /source4/cluster/ctdb
parent80e9b72e018fb7d7f2cd5ff383e4a533b4ccc705 (diff)
parent4d4a898742a0439d3f60c84194b02901412f4679 (diff)
downloadsamba-7dd0cd26d32980d4edb9db5c77c98a2b112e24cb.tar.gz
samba-7dd0cd26d32980d4edb9db5c77c98a2b112e24cb.tar.bz2
samba-7dd0cd26d32980d4edb9db5c77c98a2b112e24cb.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
Conflicts: source/Makefile source/build/smb_build/makefile.pm source/librpc/config.mk (This used to be commit 3e02fcfd3fb6683f51417ba39f4ec177494eff3e)
Diffstat (limited to 'source4/cluster/ctdb')
-rw-r--r--source4/cluster/ctdb/opendb_ctdb.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source4/cluster/ctdb/opendb_ctdb.c b/source4/cluster/ctdb/opendb_ctdb.c
index 3d67162d6d..e84f2364d4 100644
--- a/source4/cluster/ctdb/opendb_ctdb.c
+++ b/source4/cluster/ctdb/opendb_ctdb.c
@@ -543,6 +543,25 @@ static NTSTATUS odb_ctdb_rename(struct odb_lock *lck, const char *path)
}
/*
+ get the path of an open file
+*/
+static NTSTATUS odb_ctdb_get_path(struct odb_lock *lck, const char **path)
+{
+ struct opendb_file file;
+ NTSTATUS status;
+
+ *path = NULL;
+
+ status = odb_pull_record(lck, &file);
+ /* we don't ignore NT_STATUS_OBJECT_NAME_NOT_FOUND here */
+ NT_STATUS_NOT_OK_RETURN(status);
+
+ *path = file.path;
+
+ return NT_STATUS_OK;
+}
+
+/*
update delete on close flag on an open file
*/
static NTSTATUS odb_ctdb_set_delete_on_close(struct odb_lock *lck, bool del_on_close)
@@ -653,6 +672,7 @@ static const struct opendb_ops opendb_ctdb_ops = {
.odb_close_file = odb_ctdb_close_file,
.odb_remove_pending = odb_ctdb_remove_pending,
.odb_rename = odb_ctdb_rename,
+ .odb_get_path = odb_ctdb_get_path,
.odb_set_delete_on_close = odb_ctdb_set_delete_on_close,
.odb_get_delete_on_close = odb_ctdb_get_delete_on_close,
.odb_can_open = odb_ctdb_can_open,