From: Fawad Lateef <fawadlateef@gmail.com>
To: Block Device <blockdevice@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Trapping Block I/O
Date: Fri, 23 Sep 2005 22:38:17 +0500 [thread overview]
Message-ID: <1e62d137050923103843058e92@mail.gmail.com> (raw)
In-Reply-To: <64c7635405092305433356bd17@mail.gmail.com>
On 9/23/05, Block Device <blockdevice@gmail.com> wrote:
>
> I need to trap _all_ the I/O going to each and every block device
> in the system. I used jprobes to trap calls to generic_make_request.
> Is this the correct/only place to do such a thing ?
> Or do I have to monitor the q->make_request_fn for every device ?
>
Yes, generic_make_request or monitoring q->make_request_fn can trap
the _all_ I/O tpo block devices but other approach might be a little
bit odd/difficult but through that you can get every request to block
device .... the approach is you create a block device and then create
that block device as a wrapper on your device, now use your block
device and in its request function (can alter the data and sectors
etc) and calls generic_make_request for the original device on which
you created wrapper .... So by doing this you can easily monitor
requests (similar to this approach is used in LVM/RAID) ......
--
Fawad Lateef
next prev parent reply other threads:[~2005-09-23 17:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-23 12:43 Trapping Block I/O Block Device
2005-09-23 17:38 ` Fawad Lateef [this message]
2005-09-23 18:04 ` Jens Axboe
2005-09-23 18:10 ` Fawad Lateef
2005-09-23 18:14 ` Jens Axboe
2005-09-23 18:30 ` Fawad Lateef
2005-09-23 18:43 ` Jens Axboe
2005-09-23 18:52 ` Fawad Lateef
2005-09-27 11:40 ` Block Device
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=1e62d137050923103843058e92@mail.gmail.com \
--to=fawadlateef@gmail.com \
--cc=blockdevice@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).