Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 May 2009 10:30:12 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Ulf Lilleengen <lulf@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r192797 - head/sys/geom
Message-ID:  <20090526083011.GB1491@garage.freebsd.pl>
In-Reply-To: <200905260729.n4Q7TIDL050084@svn.freebsd.org>
References:  <200905260729.n4Q7TIDL050084@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--tjCHc7DPkfUGtrlw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, May 26, 2009 at 07:29:18AM +0000, Ulf Lilleengen wrote:
> Author: lulf
> Date: Tue May 26 07:29:17 2009
> New Revision: 192797
> URL: http://svn.freebsd.org/changeset/base/192797
>=20
> Log:
>   - Add 'show bio' DDB command.
>  =20
>   MFC after:	3 weeks
>=20
> Modified:
>   head/sys/geom/geom_subr.c
[...]
> +static void
> +db_print_bio_flags(struct bio *bp)
> +{
> +	int comma;
> +
> +	comma =3D 0;
> +	printf("  flags: ");
> +	if (bp->bio_flags & BIO_ERROR) {
> +		printf("BIO_ERROR");
> +		comma =3D 1;
> +	}
> +	if (bp->bio_flags & BIO_DONE) {
> +		printf("%sBIO_ERROR", (comma ? ", " : ""));

I think you wanted BIO_DONE here.

> +/*
> + * Print useful information in a BIO
> + */
> +DB_SHOW_COMMAND(bio, db_show_bio)
> +{
> +	struct bio *bp;
> +
> +	if (have_addr) {
> +		bp =3D (struct bio *)addr;
> +		printf("BIO %p\n", bp);
> +		db_print_bio_cmd(bp);
> +		db_print_bio_flags(bp);
> +		printf("  cflags: 0x%hhx\n", bp->bio_cflags);
> +		printf("  pflags: 0x%hhx\n", bp->bio_pflags);
> +		printf("  offset: %lld\n", bp->bio_offset);
> +		printf("  length: %lld\n", bp->bio_length);
> +		printf("  bcount: %ld\n", bp->bio_bcount);
> +		printf("  resid: %ld\n", bp->bio_resid);
> +		printf("  completed: %lld\n", bp->bio_completed);
> +		printf("  children: %u\n", bp->bio_children);
> +		printf("  inbed: %u\n", bp->bio_inbed);
> +		printf("  error: %d\n", bp->bio_error);
> +		printf("  parent: %p\n", bp->bio_parent);
> +		printf("  driver1: %p\n", bp->bio_driver1);
> +		printf("  driver2: %p\n", bp->bio_driver2);
> +		printf("  caller1: %p\n", bp->bio_caller1);
> +		printf("  caller2: %p\n", bp->bio_caller2);
> +		printf("  bio_from: %p\n", bp->bio_from);
> +		printf("  bio_to: %p\n", bp->bio_to);
> +	}
> +}

In DDB functions you should use db_printf() instead of printf().

--=20
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--tjCHc7DPkfUGtrlw
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFKG6iSForvXbEpPzQRAsuQAJ9l/RuwTaIfTc309YPqYG94yE354gCg34wW
7ENtPCpwRu1O4ESdljEpP9I=
=kE2V
-----END PGP SIGNATURE-----

--tjCHc7DPkfUGtrlw--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090526083011.GB1491>