public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfsteststs: get fsstress DIO working on non-xfs filesystems
@ 2010-01-18 20:46 Eric Sandeen
  2010-01-19  1:08 ` Dave Chinner
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Eric Sandeen @ 2010-01-18 20:46 UTC (permalink / raw)
  To: xfs-oss

Pretty sure all DIO IO fails in fsstress today since XFS_IOC_DIOINFO
fails.  If so, rather than just bailing out on the op, assign
some sane default DIO parameters.

This falls down for 4k sector devices but not really sure how to get
the underlying sector size easily from here; I think we can live
with this for now.

hch suggested moving XFS_IOC_DIOINFO up higher in the vfs, that's
probably a good idea in the long run.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---

diff --git a/ltp/fsstress.c b/ltp/fsstress.c
index 6978381..dab6bf7 100644
--- a/ltp/fsstress.c
+++ b/ltp/fsstress.c
@@ -1818,9 +1818,9 @@ dread_f(int opno, long r)
 			printf(
 			"%d/%d: dread - xfsctl(XFS_IOC_DIOINFO) %s failed %d\n",
 				procid, opno, f.path, errno);
-		free_pathname(&f);
-		close(fd);
-		return;
+		diob.d_maxiosz = -1U;
+		diob.d_miniosz = 512;
+		diob.d_mem = 512;
 	}
 	align = (__int64_t)diob.d_miniosz;
 	lr = ((__int64_t)random() << 32) + random();
@@ -1888,9 +1888,9 @@ dwrite_f(int opno, long r)
 			printf("%d/%d: dwrite - xfsctl(XFS_IOC_DIOINFO)"
 				" %s failed %d\n",
 				procid, opno, f.path, errno);
-		free_pathname(&f);
-		close(fd);
-		return;
+		diob.d_maxiosz = -1U;
+		diob.d_miniosz = 512;
+		diob.d_mem = 512;
 	}
 	align = (__int64_t)diob.d_miniosz;
 	lr = ((__int64_t)random() << 32) + random();

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-10-10  3:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-18 20:46 [PATCH] xfsteststs: get fsstress DIO working on non-xfs filesystems Eric Sandeen
2010-01-19  1:08 ` Dave Chinner
2010-01-19  9:13 ` Christoph Hellwig
2013-10-10  2:56 ` [PATCH V2] xfstests: " Eric Sandeen
2013-10-10  3:20   ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox