diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-02-28 10:33:54 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-02-28 10:33:54 +1100 |
commit | b33873ae5d13993030f41f5304d78640fe07d25c (patch) | |
tree | b4d6dfd9833b603b16474b0d5ab7918474c7a8bd /source4/cluster/ctdb | |
parent | 17207133ea446670e2123b510a593456928882fb (diff) | |
parent | 6dec6fbfaddf74c4567e83b354590cfbe3d6d0a9 (diff) | |
download | samba-b33873ae5d13993030f41f5304d78640fe07d25c.tar.gz samba-b33873ae5d13993030f41f5304d78640fe07d25c.tar.bz2 samba-b33873ae5d13993030f41f5304d78640fe07d25c.zip |
Merge branch 'v4-0-test' of git://git.samba.org/samba into 4-0-local
(This used to be commit ba864cfd7ce4b69179431131cac9661cbf48bf32)
Diffstat (limited to 'source4/cluster/ctdb')
-rw-r--r-- | source4/cluster/ctdb/opendb_ctdb.c | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/source4/cluster/ctdb/opendb_ctdb.c b/source4/cluster/ctdb/opendb_ctdb.c index 86dc1f50f1..3dfc6819b7 100644 --- a/source4/cluster/ctdb/opendb_ctdb.c +++ b/source4/cluster/ctdb/opendb_ctdb.c @@ -279,11 +279,13 @@ static NTSTATUS odb_oplock_break_send(struct odb_context *odb, struct opendb_ent Note that the path is only used by the delete on close logic, not for comparing with other filenames */ -static NTSTATUS odb_ctdb_open_file(struct odb_lock *lck, void *file_handle, - uint32_t stream_id, uint32_t share_access, - uint32_t access_mask, bool delete_on_close, - const char *path, - uint32_t oplock_level, uint32_t *oplock_granted) +static NTSTATUS odb_ctdb_open_file(struct odb_lock *lck, + void *file_handle, const char *path, + uint32_t stream_id, uint32_t share_access, + uint32_t access_mask, bool delete_on_close, + uint32_t open_disposition, bool break_to_none, + uint32_t oplock_level, uint32_t *oplock_granted) + { struct odb_context *odb = lck->odb; struct opendb_entry e; @@ -464,6 +466,16 @@ static NTSTATUS odb_ctdb_update_oplock(struct odb_lock *lck, void *file_handle, return NT_STATUS_FOOBAR; } +static NTSTATUS odb_ctdb_break_oplocks(struct odb_lock *lck) +{ + /* + * as this file will went away and isn't used yet, + * copy the implementation from the tdb backend + * --metze + */ + return NT_STATUS_FOOBAR; +} + /* remove a pending opendb entry */ @@ -584,8 +596,9 @@ static NTSTATUS odb_ctdb_get_delete_on_close(struct odb_context *odb, create_options and access_mask */ static NTSTATUS odb_ctdb_can_open(struct odb_lock *lck, - uint32_t share_access, uint32_t create_options, - uint32_t access_mask) + uint32_t stream_id, uint32_t share_access, + uint32_t access_mask, bool delete_on_close, + uint32_t open_disposition, bool break_to_none) { struct odb_context *odb = lck->odb; NTSTATUS status; @@ -599,7 +612,7 @@ static NTSTATUS odb_ctdb_can_open(struct odb_lock *lck, } NT_STATUS_NOT_OK_RETURN(status); - if ((create_options & NTCREATEX_OPTIONS_DELETE_ON_CLOSE) && + if (delete_on_close && file.num_entries != 0) { return NT_STATUS_SHARING_VIOLATION; } @@ -642,7 +655,8 @@ static const struct opendb_ops opendb_ctdb_ops = { .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, - .odb_update_oplock = odb_ctdb_update_oplock + .odb_update_oplock = odb_ctdb_update_oplock, + .odb_break_oplocks = odb_ctdb_break_oplocks }; |