mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
r18835: expand IO limits on SMB2. Samba4 now tops out at 16.7MB IOs.
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
b6bb5d7b77
commit
1e34e4d5a1
@ -1589,7 +1589,7 @@ union smb_read {
|
||||
uint8_t *data;
|
||||
uint16_t remaining;
|
||||
uint16_t compaction_mode;
|
||||
uint16_t nread;
|
||||
uint32_t nread;
|
||||
} out;
|
||||
} readx, generic;
|
||||
|
||||
|
@ -1266,12 +1266,6 @@ _PUBLIC_ NTSTATUS ntvfs_map_read(struct ntvfs_module_context *ntvfs,
|
||||
break;
|
||||
|
||||
case RAW_READ_SMB2:
|
||||
if (rd->smb2.in.length > UINT16_MAX) {
|
||||
DEBUG(0,("%s: mapping SMB2 => generic length to large %u!\n",
|
||||
__FUNCTION__, rd->smb2.in.length));
|
||||
status = NT_STATUS_FOOBAR;
|
||||
goto done;
|
||||
}
|
||||
rd2->readx.in.file.ntvfs= rd->smb2.in.file.ntvfs;
|
||||
rd2->readx.in.offset = rd->smb2.in.offset;
|
||||
rd2->readx.in.mincnt = rd->smb2.in.length;
|
||||
|
@ -59,7 +59,7 @@ NTSTATUS pvfs_read(struct ntvfs_module_context *ntvfs,
|
||||
}
|
||||
|
||||
maxcnt = rd->readx.in.maxcnt;
|
||||
if (maxcnt > UINT16_MAX) {
|
||||
if (maxcnt > UINT16_MAX && req->ctx->protocol < PROTOCOL_SMB2) {
|
||||
maxcnt = 0;
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ static NTSTATUS torture_smb2_write(TALLOC_CTX *mem_ctx,
|
||||
struct smb2_read r;
|
||||
NTSTATUS status;
|
||||
int i, len;
|
||||
int max = 10000000;
|
||||
int max = 80000000;
|
||||
int min = 1;
|
||||
|
||||
while (max > min) {
|
||||
@ -94,7 +94,7 @@ static NTSTATUS torture_smb2_write(TALLOC_CTX *mem_ctx,
|
||||
|
||||
printf("converged: len=%d\n", max);
|
||||
|
||||
return status;
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user