On 11/9/17 1:26 PM, Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues <rgoldwyn@xxxxxxxx> > > Partial writes are performed when there is an error midway > while performing the I/O. Perform the write exactly once and > return the number of bytes written so far, until the error. > > Signed-off-by: Goldwyn Rodrigues <rgoldwyn@xxxxxxxx> > Reviewed-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx> > --- > io/io.h | 1 + > io/pwrite.c | 25 ++++++++++++++++++++++++- > man/man8/xfs_io.8 | 3 +++ > 3 files changed, 28 insertions(+), 1 deletion(-) > > diff --git a/io/io.h b/io/io.h > index 6a0fe657..3862985f 100644 > --- a/io/io.h > +++ b/io/io.h > @@ -25,6 +25,7 @@ > #define IO_RANDOM ( 0) > #define IO_FORWARD ( 1) > #define IO_BACKWARD (-1) > +#define IO_ONCE ( 2) > > /* > * File descriptor options > diff --git a/io/pwrite.c b/io/pwrite.c > index c218f686..b77c0975 100644 > --- a/io/pwrite.c > +++ b/io/pwrite.c > @@ -47,6 +47,7 @@ pwrite_help(void) > " -W -- call fsync(2) at the end (included in timing results)\n" > " -B -- write backwards through the range from offset (backwards N bytes)\n" > " -F -- write forwards through the range of bytes from offset (default)\n" > +" -O -- perform pwrite call once and return (maybe partial) bytes written\n" This also needs to be added to the short help; (and the synopsis in the manpage; other options too ...) I'll do it on the way in. This is always a fun job to update new options in half a dozen references ;) -Eric -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html