.export = "/tmp",
.protocol = "tcp",
.run_once = 0,
+ .trunc_io = 0,
};
static struct timeval tv_start;
"disable name resolution simulation", NULL },
{ "clients-per-process", 0, POPT_ARG_INT, &options.clients_per_process, 0,
"number of clients per process", NULL },
+ { "trunc-io", 0, POPT_ARG_INT, &options.trunc_io, 0,
+ "truncate all io to this size", NULL },
{ "one-byte-write-fix", 0, POPT_ARG_NONE, &options.one_byte_write_fix, 0,
"try to fix 1 byte writes", NULL },
{ "stat-check", 0, POPT_ARG_NONE, &options.stat_check, 0,
int stable = op->params[2];
nfsstat3 res;
+ if ((options.trunc_io > 0) && (len > options.trunc_io)) {
+ len = options.trunc_io;
+ }
+
res = nfsio_write(op->child->private, op->fname, rw_buf, offset, len, stable);
if (!check_status(res, op->status)) {
printf("[%d] WRITE \"%s\" failed (%x) - expected %s\n",
int len = op->params[1];
nfsstat3 res = 0;
+ if ((options.trunc_io > 0) && (len > options.trunc_io)) {
+ len = options.trunc_io;
+ }
+
res = nfsio_read(op->child->private, op->fname, rw_buf, offset, len, NULL, NULL);
if (!check_status(res, op->status)) {
printf("[%d] READ \"%s\" failed (%x) - expected %s\n",