Re: [PATCH] Fix sbin/fsdb/fsdbutil.c for r247212

2013-03-02 Thread Kirk McKusick
 Date: Sun, 24 Feb 2013 22:41:21 +0300
 Subject: Re: [PATCH] Fix sbin/fsdb/fsdbutil.c for r247212
 From: Sergey Kandaurov pluk...@freebsd.org
 To: David Wolfskill da...@catwhisker.org
 Cc: curr...@freebsd.org, Kirk McKusick mckus...@freebsd.org
 
 On 24 February 2013 19:25, David Wolfskill da...@catwhisker.org wrote:
 On Sun, Feb 24, 2013 at 07:05:34AM -0800, David Wolfskill wrote:
 ...hine was:
 Simple patch attached; world is still building, but at least it got
 through the make dependencies phase this time.
 ...

 That was incomplete, as it didn't (also) address the change to
 getdatablk().

 The attached patch actually made it through buildworld.

 Note that it is entirely possible that I erred in specifying
 BT_UNKNOWN for the additional type argument.
 
 Hi David.
 
 Thank you for the proposed fix. I committed it with r247234.
 I'm not sure regarding BT_UNKNOWN value either. Well..  at least
 it should be not worse that it is now, and it should fix the build.
 I have not found any (regressive) changes in fsdb -d `blocks' output.
 
 -- 
 wbr,
 pluknet

Sorry, I am bad about keeping up with my mckus...@freebsd.org email.
I do need to watch it right after making commits. I also had no idea
that sbin/fsdb shared code with sbin/fsck_ffs. I really do need to
get back in the habit of buildworlds before doing any commits.

All that said, the changes that you have made are correct. The type
is only used for collecting statistics. So, if you do not know the
type, using DT_UNKNOWN is correct. If there is ever a desire to
collect type-of-I/O statistics in fsdb then that choice will need
to be revisited. But, I doubt that type-of-I/O statistics are ever
likely to be interesting in fsdb.

Kirk McKusick
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


[PATCH] Fix sbin/fsdb/fsdbutil.c for r247212

2013-02-24 Thread David Wolfskill
Whine was:
...
CC='clang' mkdep -f .depend -a-I/usr/src/sbin/fsdb/../fsck_ffs -std=gnu99   
/usr/src/sbin/fsdb/fsdb.c /usr/src/sbin/fsdb/fsdbutil.c /usr/src/sbin/fsdb/../fs
ck_ffs/dir.c /usr/src/sbin/fsdb/../fsck_ffs/ea.c /usr/src/sbin/fsdb/../fsck_ffs/
fsutil.c /usr/src/sbin/fsdb/../fsck_ffs/inode.c /usr/src/sbin/fsdb/../fsck_ffs/p
ass1.c /usr/src/sbin/fsdb/../fsck_ffs/pass1b.c /usr/src/sbin/fsdb/../fsck_ffs/pa
ss2.c /usr/src/sbin/fsdb/../fsck_ffs/pass3.c /usr/src/sbin/fsdb/../fsck_ffs/pass
4.c /usr/src/sbin/fsdb/../fsck_ffs/pass5.c /usr/src/sbin/fsdb/../fsck_ffs/setup.
c /usr/src/sbin/fsdb/../fsck_ffs/utilities.c /usr/src/sbin/fsdb/../../sys/ufs/ff
s/ffs_subr.c /usr/src/sbin/fsdb/../../sys/ufs/ffs/ffs_tables.c
/usr/src/sbin/fsdb/fsdbutil.c:242:14: error: too few arguments provided to funct
ion-like macro invocation
initbarea(bp);
^
1 error generated.
mkdep: compile failed
*** [.depend] Error code 1
1 error
*** [depend] Error code 2
1 error
*** [sbin.depend__D] Error code 2

Simple patch attached; world is still building, but at least it got
through the make dependencies phase this time.

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Taliban: Evil men with guns afraid of truth from a 14-year old girl.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.
Index: sbin/fsdb/fsdbutil.c
===
--- sbin/fsdb/fsdbutil.c	(revision 247218)
+++ sbin/fsdb/fsdbutil.c	(working copy)
@@ -239,7 +239,7 @@
 	/* for the final indirect level, don't use the cache */
 	bp = buf;
 	bp-b_un.b_buf = bufp;
-	initbarea(bp);
+	initbarea(bp, BT_UNKNOWN);
 
 	getblk(bp, blk, sblock.fs_bsize);
 } else


pgp1qSllJTBYq.pgp
Description: PGP signature


Re: [PATCH] Fix sbin/fsdb/fsdbutil.c for r247212

2013-02-24 Thread David Wolfskill
On Sun, Feb 24, 2013 at 07:05:34AM -0800, David Wolfskill wrote:
 ...hine was:
 Simple patch attached; world is still building, but at least it got
 through the make dependencies phase this time.
 ...

That was incomplete, as it didn't (also) address the change to
getdatablk().

The attached patch actually made it through buildworld.

Note that it is entirely possible that I erred in specifying
BT_UNKNOWN for the additional type argument.

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Taliban: Evil men with guns afraid of truth from a 14-year old girl.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.
Index: sbin/fsdb/fsdbutil.c
===
--- sbin/fsdb/fsdbutil.c	(revision 247218)
+++ sbin/fsdb/fsdbutil.c	(working copy)
@@ -239,11 +239,11 @@
 	/* for the final indirect level, don't use the cache */
 	bp = buf;
 	bp-b_un.b_buf = bufp;
-	initbarea(bp);
+	initbarea(bp, BT_UNKNOWN);
 
 	getblk(bp, blk, sblock.fs_bsize);
 } else
-	bp = getdatablk(blk, sblock.fs_bsize);
+	bp = getdatablk(blk, sblock.fs_bsize, BT_UNKNOWN);
 
 cpl = charsperline();
 for (i = charssofar = 0; i  NINDIR(sblock); i++) {


pgpyt8KxvmBF3.pgp
Description: PGP signature


Re: [PATCH] Fix sbin/fsdb/fsdbutil.c for r247212

2013-02-24 Thread Sergey Kandaurov
On 24 February 2013 19:25, David Wolfskill da...@catwhisker.org wrote:
 On Sun, Feb 24, 2013 at 07:05:34AM -0800, David Wolfskill wrote:
 ...hine was:
 Simple patch attached; world is still building, but at least it got
 through the make dependencies phase this time.
 ...

 That was incomplete, as it didn't (also) address the change to
 getdatablk().

 The attached patch actually made it through buildworld.

 Note that it is entirely possible that I erred in specifying
 BT_UNKNOWN for the additional type argument.

Hi David.

Thank you for the proposed fix. I committed it with r247234.
I'm not sure regarding BT_UNKNOWN value either. Well..  at least
it should be not worse that it is now, and it should fix the build.
I have not found any (regressive) changes in fsdb -d `blocks' output.

-- 
wbr,
pluknet
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org