92
92
DEBUG(10, ("CBRL BLR records (%s):\n", fn));
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);
99
DEBUGADD(10, ("%s\n", onefs_cbrl_blr_state_str(blr)));
103
for (blr = sconn->smb1.locks.blocking_lock_queue; blr; blr = blr->next)
104
DEBUGADD(10, ("%s\n", onefs_cbrl_blr_state_str(blr)));
98
108
static struct blocking_lock_record *onefs_cbrl_find_blr(uint64_t id)
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");
105
for (blr = blocking_lock_queue; blr; blr = blr->next) {
106
bs = (struct onefs_cbrl_blr_state *)blr->blr_private;
108
/* We don't control all of the BLRs on the BLQ. */
113
DEBUG(10, ("found %s\n",
114
onefs_cbrl_blr_state_str(blr)));
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);
123
bs = (struct onefs_cbrl_blr_state *)blr->blr_private;
128
DEBUG(10, ("found %s\n",
129
onefs_cbrl_blr_state_str(blr)));
134
for (blr = sconn->smb1.locks.blocking_lock_queue; blr; blr = blr->next) {
135
bs = (struct onefs_cbrl_blr_state *)blr->blr_private;
137
/* We don't control all of the BLRs on the BLQ. */
142
DEBUG(10, ("found %s\n",
143
onefs_cbrl_blr_state_str(blr)));
156
186
LEVEL2_CONTEND_WINDOWS_BRL);
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);
162
192
static void onefs_cbrl_async_failure(uint64_t id)
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);
185
215
static struct cbrl_event_ops cbrl_ops =