Fix bug #7067 - Linux asynchronous IO (aio) can cause smbd to fail to respond to...
[ira/wip.git] / source3 / include / smb.h
index 3c3ced6baf713785d495132487134844df912b57..041c96badad0c96a1ff70d8f795b7ed4072f1d52 100644 (file)
@@ -27,7 +27,7 @@
 #define _SMB_H
 
 /* logged when starting the various Samba daemons */
-#define COPYRIGHT_STARTUP_MESSAGE      "Copyright Andrew Tridgell and the Samba Team 1992-2009"
+#define COPYRIGHT_STARTUP_MESSAGE      "Copyright Andrew Tridgell and the Samba Team 1992-2010"
 
 
 #if defined(LARGE_SMB_OFF_T)
@@ -451,6 +451,7 @@ typedef struct files_struct {
        bool aio_write_behind;
        bool lockdb_clean;
        bool initial_delete_on_close; /* Only set at NTCreateX if file was created. */
+       bool delete_on_close;
        bool posix_open;
        struct smb_filename *fsp_name;
 
@@ -461,6 +462,14 @@ typedef struct files_struct {
 
        struct files_struct *base_fsp; /* placeholder for delete on close */
 
+       /*
+        * Read-only cached brlock record, thrown away when the
+        * brlock.tdb seqnum changes. This avoids fetching data from
+        * the brlock.tdb on every read/write call.
+        */
+       int brlock_seqnum;
+       struct byte_range_lock *brlock_rec;
+
        struct dptr_struct *dptr;
 } files_struct;
 
@@ -727,6 +736,7 @@ struct pending_message_list {
        struct smb_perfcount_data pcd;
        uint32_t seqnum;
        bool encrypted;
+       bool processed;
        DATA_BLOB buf;
        DATA_BLOB private_data;
 };
@@ -1713,7 +1723,8 @@ minimum length == 24.
 enum smbd_capability {
     KERNEL_OPLOCK_CAPABILITY,
     DMAPI_ACCESS_CAPABILITY,
-    LEASE_CAPABILITY
+    LEASE_CAPABILITY,
+    KILL_CAPABILITY
 };
 
 /*
@@ -1886,8 +1897,8 @@ struct ea_list {
 #define SAMBA_XATTR_DOS_ATTRIB "user.DOSATTRIB"
 /* Prefix for DosStreams in the vfs_streams_xattr module */
 #define SAMBA_XATTR_DOSSTREAM_PREFIX "user.DosStream."
-/* Prefix for DOS timestamps. */
-#define SAMBA_XATTR_DOSTIMESTAMPS "user.DosTimestamps"
+/* Prefix for xattrs storing streams. */
+#define SAMBA_XATTR_MARKER "user.SAMBA_STREAMS"
 
 #define UUID_SIZE 16
 
@@ -1943,6 +1954,7 @@ struct smb_file_time {
 #define UCF_SAVE_LCOMP                 0x00000001
 #define UCF_ALWAYS_ALLOW_WCARD_LCOMP   0x00000002
 #define UCF_COND_ALLOW_WCARD_LCOMP     0x00000004
+#define UCF_POSIX_PATHNAMES            0x00000008
 
 /*
  * smb_filename