diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-02-29 15:34:45 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-02-29 15:34:45 +0100 |
commit | 3067428a8fa30425b7106954636afd0f8460585d (patch) | |
tree | ced3f221db99715ec150f716548748d285a3f1ec /source4/cluster/ctdb/opendb_ctdb.c | |
parent | 232d51e666a9a9dd65579d9c7b5873bafa9f669d (diff) | |
parent | e0081626ecf784351ad5f0bf7f6faeab8601e648 (diff) | |
download | samba-3067428a8fa30425b7106954636afd0f8460585d.tar.gz samba-3067428a8fa30425b7106954636afd0f8460585d.tar.bz2 samba-3067428a8fa30425b7106954636afd0f8460585d.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-test
(This used to be commit 18c683d7e804e76ac37d4069429b5ba1a9d9ae38)
Diffstat (limited to 'source4/cluster/ctdb/opendb_ctdb.c')
-rw-r--r-- | source4/cluster/ctdb/opendb_ctdb.c | 20 |
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, |