From: Eric Sandeen <sandeen@sandeen.net>
To: xfs-oss <xfs@oss.sgi.com>
Subject: [PATCH] mkfs: don't warn about topology when mkfsing a file
Date: Mon, 18 Jan 2010 13:21:53 -0600 [thread overview]
Message-ID: <4B54B4D1.7020500@sandeen.net> (raw)
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
next reply other threads:[~2010-01-18 19:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-18 19:21 Eric Sandeen [this message]
2010-01-19 1:04 ` [PATCH] mkfs: don't warn about topology when mkfsing a file Dave Chinner
2010-01-19 9:09 ` Christoph Hellwig
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=4B54B4D1.7020500@sandeen.net \
--to=sandeen@sandeen.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox