public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mkfs: don't warn about topology when mkfsing a file
@ 2010-01-18 19:21 Eric Sandeen
  2010-01-19  1:04 ` Dave Chinner
  2010-01-19  9:09 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Sandeen @ 2010-01-18 19:21 UTC (permalink / raw)
  To: xfs-oss

Some tests were failing for me like:

 QA output created by 206
 === truncate file ===
 === mkfs.xfs ===
+warning: unable to probe device toplology for device /mnt/test/fsfile.21615
...

I thought about filtering the tests, but ...

It seems that we shouldn't even be trying to get topology for a
plain file, should we?  And then we won't warn about failure.


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

diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index 689425d..8896035 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -356,6 +356,10 @@ static void blkid_get_topology(const char *device, int *sunit, int *swidth, int
 	blkid_topology tp;
 	blkid_probe pr;
 	unsigned long val;
+	struct stat statbuf;
+
+	if (!stat(device, &statbuf) && S_ISREG(statbuf.st_mode))
+		return;
 
 	pr = blkid_new_probe_from_filename(device);
 	if (!pr)

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

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

end of thread, other threads:[~2010-01-19  9:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-18 19:21 [PATCH] mkfs: don't warn about topology when mkfsing a file Eric Sandeen
2010-01-19  1:04 ` Dave Chinner
2010-01-19  9:09 ` Christoph Hellwig

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