Changeset 745 for trunk/server/source3/modules/onefs_cbrl.c
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source3/modules/onefs_cbrl.c
r414 r745 20 20 21 21 #include "includes.h" 22 #include "smbd/smbd.h" 22 23 #include "onefs.h" 23 24 … … 28 29 #undef DBGC_CLASS 29 30 #define DBGC_CLASS DBGC_LOCKING 30 31 extern struct blocking_lock_record *blocking_lock_queue;32 31 33 32 static uint64_t onefs_get_new_id(void) { … … 85 84 static void onefs_cbrl_enumerate_blq(const char *fn) 86 85 { 86 struct smbd_server_connection *sconn = smbd_server_conn; 87 87 struct blocking_lock_record *blr; 88 88 … … 92 92 DEBUG(10, ("CBRL BLR records (%s):\n", fn)); 93 93 94 for (blr = blocking_lock_queue; blr; blr = blr->next) 95 DEBUGADD(10, ("%s\n", onefs_cbrl_blr_state_str(blr))); 94 if (sconn->using_smb2) { 95 struct smbd_smb2_request *smb2req; 96 for (smb2req = sconn->smb2.requests; smb2req; smb2req = nextreq) { 97 blr = get_pending_smb2req_blr(smb2req); 98 if (blr) { 99 DEBUGADD(10, ("%s\n", onefs_cbrl_blr_state_str(blr))); 100 } 101 } 102 } else { 103 for (blr = sconn->smb1.locks.blocking_lock_queue; blr; blr = blr->next) 104 DEBUGADD(10, ("%s\n", onefs_cbrl_blr_state_str(blr))); 105 } 96 106 } 97 107 98 108 static struct blocking_lock_record *onefs_cbrl_find_blr(uint64_t id) 99 109 { 110 struct smbd_server_connection *sconn = smbd_server_conn; 100 111 struct blocking_lock_record *blr; 101 112 struct onefs_cbrl_blr_state *bs; … … 103 114 onefs_cbrl_enumerate_blq("onefs_cbrl_find_blr"); 104 115 105 for (blr = blocking_lock_queue; blr; blr = blr->next) { 106 bs = (struct onefs_cbrl_blr_state *)blr->blr_private; 107 108 /* We don't control all of the BLRs on the BLQ. */ 109 if (bs == NULL) 110 continue; 111 112 if (bs->id == id) { 113 DEBUG(10, ("found %s\n", 114 onefs_cbrl_blr_state_str(blr))); 115 break; 116 if (sconn->using_smb2) { 117 struct smbd_smb2_request *smb2req; 118 for (smb2req = sconn->smb2.requests; smb2req; smb2req = nextreq) { 119 blr = get_pending_smb2req_blr(smb2req); 120 if (!blr) { 121 continue; 122 } 123 bs = (struct onefs_cbrl_blr_state *)blr->blr_private; 124 if (bs == NULL) { 125 continue; 126 } 127 if (bs->id == id) { 128 DEBUG(10, ("found %s\n", 129 onefs_cbrl_blr_state_str(blr))); 130 break; 131 } 132 } 133 } else { 134 for (blr = sconn->smb1.locks.blocking_lock_queue; blr; blr = blr->next) { 135 bs = (struct onefs_cbrl_blr_state *)blr->blr_private; 136 137 /* We don't control all of the BLRs on the BLQ. */ 138 if (bs == NULL) 139 continue; 140 141 if (bs->id == id) { 142 DEBUG(10, ("found %s\n", 143 onefs_cbrl_blr_state_str(blr))); 144 break; 145 } 116 146 } 117 147 } … … 157 187 158 188 /* Process the queue, to try the next lock or finish up. */ 159 process_blocking_lock_queue( );189 process_blocking_lock_queue(smbd_server_conn); 160 190 } 161 191 … … 180 210 /* Process the queue. It will end up trying to retake the same lock, 181 211 * see the error in onefs_cbrl_lock_windows() and fail. */ 182 process_blocking_lock_queue( );212 process_blocking_lock_queue(smbd_server_conn); 183 213 } 184 214
Note:
See TracChangeset
for help on using the changeset viewer.