The Samba-Bugzilla – Attachment 18469 Details for
Bug 15713
Lease break unacked check triggered by network congestion leads to disconnect
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP patch for master
lease-rto.patch (text/plain), 2.81 KB, created by
Ralph Böhme
on 2024-10-11 14:32:13 UTC
(
hide
)
Description:
WIP patch for master
Filename:
MIME Type:
Creator:
Ralph Böhme
Created:
2024-10-11 14:32:13 UTC
Size:
2.81 KB
patch
obsolete
>From 8f250e9044990aa83e7c32210dc660da78547489 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Tue, 10 Sep 2024 18:28:10 +0200 >Subject: [PATCH 1/2] source3/smbd/smb2_server.c break requests first... > >--- > source3/smbd/smb2_server.c | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > >diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c >index c2c9fc082fbb..ef6fb196ee22 100644 >--- a/source3/smbd/smb2_server.c >+++ b/source3/smbd/smb2_server.c >@@ -4137,6 +4137,7 @@ static struct tevent_req *smbd_smb2_break_send(TALLOC_CTX *mem_ctx, > { > struct tevent_req *req = NULL; > struct smbd_smb2_break_state *state = NULL; >+ struct smbd_smb2_send_queue *qe = NULL; > NTSTATUS status; > bool ok; > >@@ -4218,7 +4219,17 @@ static struct tevent_req *smbd_smb2_break_send(TALLOC_CTX *mem_ctx, > state->queue_entry.mem_ctx = state; > state->queue_entry.vector = state->vector; > state->queue_entry.count = ARRAY_SIZE(state->vector); >- DLIST_ADD_END(xconn->smb2.send_queue, &state->queue_entry); >+ qe = xconn->smb2.send_queue; >+ while (qe != NULL) { >+ if (qe->next == NULL) { >+ break; >+ } >+ if (qe->next->ack.req == NULL) { >+ break; >+ } >+ qe = qe->next; >+ } >+ DLIST_ADD_AFTER(xconn->smb2.send_queue, &state->queue_entry, qe); > xconn->smb2.send_queue_len++; > > status = smbd_smb2_flush_send_queue(xconn); >-- >2.46.2 > > >From ac3ac219093954f481c8190cb95c3f15bd5cac6f Mon Sep 17 00:00:00 2001 >From: Ralph Boehme <slow@samba.org> >Date: Wed, 11 Sep 2024 10:16:21 +0200 >Subject: [PATCH 2/2] smbd: smb2:lease timeout rto secs > >--- > source3/smbd/smb2_server.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > >diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c >index ef6fb196ee22..b6ad94e4dbc6 100644 >--- a/source3/smbd/smb2_server.c >+++ b/source3/smbd/smb2_server.c >@@ -4138,6 +4138,7 @@ static struct tevent_req *smbd_smb2_break_send(TALLOC_CTX *mem_ctx, > struct tevent_req *req = NULL; > struct smbd_smb2_break_state *state = NULL; > struct smbd_smb2_send_queue *qe = NULL; >+ uint32_t timeout; > NTSTATUS status; > bool ok; > >@@ -4212,8 +4213,14 @@ static struct tevent_req *smbd_smb2_break_send(TALLOC_CTX *mem_ctx, > * 2b. tevent_req_nterror(transport_error), when the > * connection got a disconnect from the kernel. > */ >- state->queue_entry.ack.timeout = >- timeval_current_ofs_usec(xconn->ack.rto_usecs * 6); >+ timeout = (uint32_t)lp_parm_ulong(GLOBAL_SECTION_SNUM, >+ "smb2","lease timeout rto secs", >+ 0) * 1000000; >+ if (timeout == 0) { >+ timeout = xconn->ack.rto_usecs * 6; >+ } >+ DBG_DEBUG("Setting queue_entry.ack.timeout to %" PRIu32" us\n", timeout); >+ state->queue_entry.ack.timeout = timeval_current_ofs_usec(timeout); > state->queue_entry.ack.required_acked_bytes = UINT64_MAX; > state->queue_entry.ack.req = req; > state->queue_entry.mem_ctx = state; >-- >2.46.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 15713
: 18469