From: Donald Douwsma <donaldd@sgi.com>
To: David Chinner <dgc@sgi.com>
Cc: xfs-dev <xfs-dev@sgi.com>, xfs-oss <xfs@oss.sgi.com>
Subject: Re: Review: XFSQA: unwritten extent conversion vs synchronous direct I/O
Date: Thu, 17 May 2007 12:24:14 +1000 [thread overview]
Message-ID: <464BBCCE.8080500@sgi.com> (raw)
In-Reply-To: <20070508065327.GL32602149@melbourne.sgi.com>
David Chinner wrote:
> Test to exercise synchronous direct I/O into unwritten extents.
>
> Cheers,
>
> Dave.
Would we ever want to adjust the IO_SIZE used in unwritten_sync
from the qa script?
A couple of small changes to fix compiler warnings and provide
info on dio size errors.
Otherwise looks good,
Don
Index: xfs-cmds/xfstests/src/unwritten_sync.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ xfs-cmds/xfstests/src/unwritten_sync.c 2007-05-07 11:44:38.668980258 +1000
-@@ -0,0 +1,167 @@
++++ xfs-cmds/xfstests/src/unwritten_sync.c 2007-05-17 12:08:21.242781793 +1000
+@@ -0,0 +1,153 @@
+#include <sys/types.h>
+#include <fcntl.h>
+#include <errno.h>
@@ -139,7 +139,9 @@
+ }
+
+ if ((dio.d_miniosz > IO_SIZE) || (dio.d_maxiosz < IO_SIZE)) {
-+ fprintf(stderr,"Test won't work. Sorry\n");
++ fprintf(stderr,"Test won't work, iosize out of range \
++ (dio.d_miniosz=%d, dio.d_maxiosz=%d)\n",
++ dio.d_miniosz, dio.d_maxiosz);
+ exit(1);
+ }
+ buf = (char *)memalign(dio.d_mem , IO_SIZE);
@@ -174,23 +176,7 @@
+ print_getbmapx(file, fd, 0, 0);
+ close(fd);
+ }
-+}
-+
-+
-+
-+int
-+get_getbmapx(
-+ const char *pathname,
-+ int fd,
-+ struct getbmapx *bmapx)
-+{
-+ int rc;
-+
-+ rc = ioctl(fd, XFS_IOC_GETBMAPX, bmapx);
-+ if (rc < 0) {
-+ perror("xfs_ioc_getbmapx");
-+ exit(1);
-+ }
++ return 0;
+}
+
+void
@@ -223,8 +209,8 @@
+ if (x != array_size) {
+ break; /* end of file */
+ }
-+ if (get_getbmapx(pathname, fd, bmapx) < 0) {
-+ fprintf(stderr, "getbmapx failed\n");
++ if (xfsctl(pathname, fd, XFS_IOC_GETBMAPX, bmapx) < 0) {
++ fprintf(stderr, "XFS_IOC_GETBMAPX failed\n");
+ exit(1);
+ }
+ if (bmapx[0].bmv_entries == 0) {
prev parent reply other threads:[~2007-05-17 2:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-08 6:53 Review: XFSQA: unwritten extent conversion vs synchronous direct I/O David Chinner
2007-05-17 2:24 ` Donald Douwsma [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=464BBCCE.8080500@sgi.com \
--to=donaldd@sgi.com \
--cc=dgc@sgi.com \
--cc=xfs-dev@sgi.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.