This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "includes.h"
"Callback READ file:%d (%d/%d) Offset:%d\n",
state->nr,state->completed,torture_numops,
(state->readcnt*state->lp_params->blocksize));
- rd.generic.level = RAW_READ_READX ;
- rd.read.in.file.fnum = state->fnum ;
- rd.read.in.offset = state->readcnt *
- state->lp_params->blocksize;
- rd.read.in.count = state->lp_params->blocksize;
- rd.read.in.remaining = 0 ;
- rd.read.out.data = state->buffer;
+ 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.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{
/* open/create the files */
torture_comment(tctx, "Open File %d/%d\n",state->nr+1,
- lp_parm_int(-1, "torture", "nprocs", 4));
+ torture_setting_int(tctx, "nprocs", 4));
open_parms=talloc_zero(tctx, union smb_open);
NT_STATUS_HAVE_NO_MEMORY(open_parms);
open_parms->openx.level = RAW_OPEN_OPENX;
"file - %s\n",
nt_errstr(req->status));
state->mode=ERROR;
+ state->readcnt=0;
return;
}
break;
union smb_mkdir parms;
int finished = 0;
BOOL success=True;
- int torture_nprocs = lp_parm_int(-1, "torture", "nprocs", 4);
+ int torture_nprocs = torture_setting_int(tctx, "nprocs", 4);
torture_comment(tctx, "Start BENCH-READWRITE num_ops=%d "
"num_nprocs=%d\n",