* [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
* Re: [PATCH] mkfs: don't warn about topology when mkfsing a file
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
1 sibling, 0 replies; 3+ messages in thread
From: Dave Chinner @ 2010-01-19 1:04 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs-oss
On Mon, Jan 18, 2010 at 01:21:53PM -0600, Eric Sandeen wrote:
> 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>
Sound pretty sane to me.
Reviewed-by: Dave Chinner <david@fromorbit.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mkfs: don't warn about topology when mkfsing a file
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
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2010-01-19 9:09 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs-oss
On Mon, Jan 18, 2010 at 01:21:53PM -0600, Eric Sandeen wrote:
> 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.
Looks good to me. Would be even nicer if libblkid handled that case,
but let's fix it where we can easily do it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [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