" -N -- Perform the pwritev2() with RWF_NOWAIT\n"
" -D -- Perform the pwritev2() with RWF_DSYNC\n"
" -A -- Perform the pwritev2() with RWF_ATOMIC\n"
+" -U -- Perform the pwritev2() with RWF_DONTCACHE\n"
#endif
"\n"));
}
init_cvtnum(&fsblocksize, &fssectsize);
bsize = fsblocksize;
- while ((c = getopt(argc, argv, "Ab:BCdDf:Fi:NqRs:OS:uV:wWZ:")) != EOF) {
+ while ((c = getopt(argc, argv, "Ab:BCdDf:Fi:NqRs:OS:uUV:wWZ:")) != EOF) {
switch (c) {
case 'b':
tmp = cvtnum(fsblocksize, fssectsize, optarg);
case 'A':
pwritev2_flags |= RWF_ATOMIC;
break;
+ case 'U':
+ pwritev2_flags |= RWF_DONTCACHE;
+ break;
#endif
case 's':
skip = cvtnum(fsblocksize, fssectsize, optarg);
exitcode = 1;
return command_usage(&pwrite_cmd);
}
+ if (pwritev2_flags != 0 && vectors == 0) {
+ printf(_("pwritev2 flags require vectored I/O (-V)\n"));
+ exitcode = 1;
+ return command_usage(&pwrite_cmd);
+ }
+
offset = cvtnum(fsblocksize, fssectsize, argv[optind]);
if (offset < 0) {
printf(_("non-numeric offset argument -- %s\n"), argv[optind]);
pwrite_cmd.argmax = -1;
pwrite_cmd.flags = CMD_NOMAP_OK | CMD_FOREIGN_OK;
pwrite_cmd.args =
-_("[-i infile [-qAdDwNOW] [-s skip]] [-b bs] [-S seed] [-FBR [-Z N]] [-V N] off len");
+_("[-i infile [-qAdDwNOUW] [-s skip]] [-b bs] [-S seed] [-FBR [-Z N]] [-V N] off len");
pwrite_cmd.oneline =
_("writes a number of bytes at a specified offset");
pwrite_cmd.help = pwrite_help;
.B pread
command.
.TP
-.BI "pwrite [ \-i " file " ] [ \-qAdDwNOW ] [ \-s " skip " ] [ \-b " size " ] [ \-S " seed " ] [ \-FBR [ \-Z " zeed " ] ] [ \-V " vectors " ] " "offset length"
+.BI "pwrite [ \-i " file " ] [ \-qAdDwNOUW ] [ \-s " skip " ] [ \-b " size " ] [ \-S " seed " ] [ \-FBR [ \-Z " zeed " ] ] [ \-V " vectors " ] " "offset length"
Writes a range of bytes in a specified blocksize from the given
.IR offset .
The bytes written can be either a set pattern or read in from another
call with
.IR RWF_ATOMIC .
.TP
+.B \-U
+Perform the
+.BR pwritev2 (2)
+call with
+.IR RWF_DONTCACHE .
+.TP
.B \-O
perform pwrite once and return the (maybe partial) bytes written.
.TP