diff options
author | Alexander Bokovoy <ab@samba.org> | 2007-06-18 14:06:04 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:53:26 -0500 |
commit | 9ed016b692f8fc4f35362dffd25e00e8f72d9c24 (patch) | |
tree | a8a219c37f3980501628b34ec4a1ae055174a777 /source4 | |
parent | dc4f1f6754df874bb135a708b1c9327c06fe5ae3 (diff) | |
download | samba-9ed016b692f8fc4f35362dffd25e00e8f72d9c24.tar.gz samba-9ed016b692f8fc4f35362dffd25e00e8f72d9c24.tar.bz2 samba-9ed016b692f8fc4f35362dffd25e00e8f72d9c24.zip |
r23540: Continue fixing bench-readwrite. We need to initialize state->readcnt not only when file is written but at initial write as well.
(This used to be commit 0258f9d3c21d1f9ce6bfcf31138d7f8b9bfb6b7d)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/basic/misc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/torture/basic/misc.c b/source4/torture/basic/misc.c index 7a2aad0e75..e611ddcc32 100644 --- a/source4/torture/basic/misc.c +++ b/source4/torture/basic/misc.c @@ -577,12 +577,12 @@ static NTSTATUS benchrw_readwrite(struct torture_context *tctx, (state->readcnt*state->lp_params->blocksize)); rd.generic.level = RAW_READ_READX; rd.readx.in.file.fnum = state->fnum ; - rd.readx.in.offset = state->readcnt * - state->lp_params->blocksize; + rd.readx.in.offset = state->readcnt*state->lp_params->blocksize; rd.readx.in.mincnt = state->lp_params->blocksize; rd.readx.in.maxcnt = rd.readx.in.mincnt; rd.readx.in.remaining = 0 ; rd.readx.out.data = state->buffer; + rd.readx.in.read_for_execute = False; if(state->readcnt < state->lp_params->writeblocks){ state->readcnt++; }else{ @@ -727,6 +727,7 @@ static void benchrw_callback(struct smbcli_request *req) "file - %s\n", nt_errstr(req->status)); state->mode=ERROR; + state->readcnt=0; return; } break; |