On Tue, Dec 16, 2014 at 12:03:35AM +0100, Dushan Tcholich wrote:
> 
> In december 2013 Juhno Ryu posted a patch xfstests: check O_DIRECT 
> support before testing direct I/O to [email protected] 
> http://oss.sgi.com/archives/xfs/2013-12/msg00759.html

At the time, xfstests was going through maintainer issues - SGI was
dropping the ball, and I didn't start to pick stuff up until mid
january 2014.

http://oss.sgi.com/archives/xfs/2014-01/msg00283.html

"Note that I didn't pull in the tmpfs support patch series this time
around as I'm not sure the discussions ever came to a conclusion
before xmas/new year/LCA intervened. That will need to be picked up
again..."

And there was no followup reposts of the patchset, so it's not gone
anywhere since.

> As there are no archives of fstests m-l I couldn't find why his 
> patches weren't applied so apologise if this is innapropriate but  
> I rebased his patch upon current xfstests code:

Tell me about it. If anyone knows the magic incantation to get the
usual mailing list archive sites to answer a simple "can you archive
this list" request, let me know, because I've tried repeatedly since
this list was created and haven't had a single reply from any of
them.

FYI, when send patches with comments like this, the comments should
be below the first "---" divider so that utilities like git am,
patch, etc strip the comments away. In this case, they strip this:

> ---
> 
> Some filesystems do not support O_DIRECT.  Check whether TEST_DIR supports 
> it by running xfs_io with and without -d flag.
> 
> Signed-off-by: Junho Ryu <[email protected]>
> Signed-off-by: Dushan Tcholich <[email protected]>
> 
> ---

away. i.e. commit message first, commentary second. Also, this needs
a "From: Junho Ryu <[email protected]>" in the commit message.

> 
> 
> --- xfstests.orig/common/rc   2014-12-14 15:17:59.000000000 +0100
> +++ xfstests/common/rc        2014-12-15 19:40:36.000000000 +0100
> @@ -1391,6 +1395,7 @@
>          AIO_TEST=src/aio-dio-regress/$1
>          [ -x $AIO_TEST ] || _notrun "$AIO_TEST not built"
>      fi
> +    _require_odirect
>  }
>  
>  # run an aio-dio program
> @@ -1519,6 +1524,20 @@
>               _notrun "xfs_io $command failed (old kernel/wrong fs?)"
>  }
>  
> +# check that kernel and filesystem support direct I/O
> +_require_odirect()
> +{
> +       testfile=$TEST_DIR/$$.direct
> +       $XFS_IO_PROG -F -f -c "pwrite 0 20k" $testfile 2>&1
> +       if [ $? -eq 0 ]; then
> +               $XFS_IO_PROG -F -f -d -c "pwrite 0 20k" $testfile 2>&1
> +               if [ $? -ne 0 ]; then
> +                       _notrun "O_DIRECT is not supported"
> +               fi
> +       fi

Why test for buffered IO, then test for direct IO?

Cheers,

Dave.
-- 
Dave Chinner
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to