opendb: pass down open_disposition and break_to_none to odb_open_file()
authorStefan Metzmacher <metze@samba.org>
Mon, 25 Feb 2008 15:47:48 +0000 (16:47 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 26 Feb 2008 08:32:55 +0000 (09:32 +0100)
metze

source/cluster/ctdb/opendb_ctdb.c
source/ntvfs/common/opendb.c
source/ntvfs/common/opendb.h
source/ntvfs/common/opendb_tdb.c

index 915b76042451f28406bc57492e76808bc00871c5..36ae204974f40c06ad5f598cf00915e66fbb8eca 100644 (file)
@@ -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;
index 3f5d7210bec91ca0b0cd02bf71d16dfe33ea7c0e..c3803554669dd7f4e4a581f21645437efb0e316c 100644 (file)
@@ -93,15 +93,16 @@ _PUBLIC_ DATA_BLOB odb_get_key(TALLOC_CTX *mem_ctx, struct odb_lock *lck)
   Note that the path is only used by the delete on close logic, not
   for comparing with other filenames
 */
-_PUBLIC_ NTSTATUS odb_open_file(struct odb_lock *lck, void *file_handle,
-                               uint32_t stream_id, uint32_t share_access, 
+_PUBLIC_ NTSTATUS odb_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,
-                               const char *path, 
+                               uint32_t open_disposition, bool break_to_none,
                                uint32_t oplock_level, uint32_t *oplock_granted)
 {
-       return ops->odb_open_file(lck, file_handle, stream_id, share_access,
-                                 access_mask, delete_on_close, path, oplock_level,
-                                 oplock_granted);
+       return ops->odb_open_file(lck, file_handle, path, stream_id, share_access,
+                                 access_mask, delete_on_close, open_disposition,
+                                 break_to_none, oplock_level, oplock_granted);
 }
 
 
index c46390446cd3e6e0181b5a8de78bc2e6b2c2c1ed..205d2228ea1fe9ec28d376f99963cea19c3d0d22 100644 (file)
@@ -25,10 +25,11 @@ struct opendb_ops {
        struct odb_lock *(*odb_lock)(TALLOC_CTX *mem_ctx,
                                     struct odb_context *odb, DATA_BLOB *file_key);
        DATA_BLOB (*odb_get_key)(TALLOC_CTX *mem_ctx, struct odb_lock *lck);
-       NTSTATUS (*odb_open_file)(struct odb_lock *lck, void *file_handle,
-                                 uint32_t stream_id, uint32_t share_access, 
+       NTSTATUS (*odb_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,
-                                 const char *path, 
+                                 uint32_t open_disposition, bool break_to_none,
                                  uint32_t oplock_level, uint32_t *oplock_granted);
        NTSTATUS (*odb_open_file_pending)(struct odb_lock *lck, void *private);
        NTSTATUS (*odb_close_file)(struct odb_lock *lck, void *file_handle);
index 8b5e4850d9d0c4cfb9c629c1b3ad775a0f716045..d41a5c371eec8088f5b73e5775d53a8f4768a193 100644 (file)
@@ -388,18 +388,17 @@ static NTSTATUS odb_tdb_open_can_internal(struct odb_context *odb,
   Note that the path is only used by the delete on close logic, not
   for comparing with other filenames
 */
-static NTSTATUS odb_tdb_open_file(struct odb_lock *lck, void *file_handle,
+static NTSTATUS odb_tdb_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,
-                                 const char *path,
+                                 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;
        struct opendb_file file;
        NTSTATUS status;
-       uint32_t open_disposition = 0;
-       bool break_to_none = false;
        bool attrs_only = false;
 
        if (odb->oplocks == false) {