From owner-freebsd-stable@FreeBSD.ORG Sun Dec 5 18:44:30 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EC7C106564A for ; Sun, 5 Dec 2010 18:44:30 +0000 (UTC) (envelope-from thomas.e.zander@googlemail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 50B878FC1A for ; Sun, 5 Dec 2010 18:44:29 +0000 (UTC) Received: by qyk36 with SMTP id 36so8259947qyk.13 for ; Sun, 05 Dec 2010 10:44:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=yeC59uGAjBgSHzqTV3BDnqp9ijrxlZL7+ASOvQoNJzc=; b=CnEU9Xf2hjGujKsaJI1wtfNW8Use1Z5UnbV39RU5nFkHcTZbXILNayEZbClIPjwgRJ oZcZ39lIJhwUWKy/PtfSqi3wDkyCCdoVifBW3HfLs5vvSEuRorIIjNu7gAbUPrftAA2r zbdk/Op9ZwWGDrn4ZoRwvH327E6myouwf892s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=pmas3S9Zsvtx6rD7B7tjkGdFrF7MCUvvN7gqoZCo8qY9ktdaA8w7dUJffOxQWpiEvz 5Bji6ZnJZdaXPPvqSCV9szua8cL71ZKzXtojUo3DkMTDaIRylkbj00yP20QqhF/ZLOXG iGStaWgMWjmBQs6NlaLG1v+rct3IqiKP4bGm0= MIME-Version: 1.0 Received: by 10.229.81.148 with SMTP id x20mr3607393qck.18.1291574669378; Sun, 05 Dec 2010 10:44:29 -0800 (PST) Received: by 10.229.239.133 with HTTP; Sun, 5 Dec 2010 10:44:29 -0800 (PST) In-Reply-To: References: Date: Sun, 5 Dec 2010 19:44:29 +0100 Message-ID: From: Thomas Zander To: freebsd-stable Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: DTrace (or other monitor) access to LBA of a block device X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Dec 2010 18:44:30 -0000 On Sun, Dec 5, 2010 at 19:02, Artem Belevich wrote: >> GEOM sounds like a good candidate for probing of that kind. >> >> sudo dtrace -n 'fbt:kernel:g_io_deliver:entry { printf("%s %d %d >> %d\n",stringof(args[0]->bio_from->geom->name), args[0]->bio_cmd, >> args[0]->bio_offset, args[0]->bio_length); }' > > By the way, in order for this to work one would need r207057 applied > to -8. Any chance that could be MFC'ed? In the meantime, a workaround is an explicit cast. Using ((struct bio *)arg0) instead of args[0] works. Or wrapped in a tiny d script: #!/usr/sbin/dtrace -s #pragma D option quiet fbt:kernel:g_io_deliver:entry { bio = (struct bio *)arg0; printf("%s %d %d %d\n",stringof(bio->bio_from->geom->name), bio->bio_cmd, bio->bio_offset, bio->bio_length); } Riggs