All of lore.kernel.org
 help / color / mirror / Atom feed
From: Block Device <blockdevice@gmail.com>
To: Fawad Lateef <fawadlateef@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Trapping Block I/O
Date: Tue, 27 Sep 2005 17:10:00 +0530	[thread overview]
Message-ID: <64c7635405092704404019b9a6@mail.gmail.com> (raw)
In-Reply-To: <1e62d137050923103843058e92@mail.gmail.com>

The problem to creating a wrapper in the manner sugegsted is that
any filesystems mounted or other stuff which uses the original device
must be stopped
and changed to start using the new pseudo device. I want something
which can be as
non intrusive as possible. Am looking @ Jens btrace :) ..

Thanks &Regards
-BD


On 9/23/05, Fawad Lateef <fawadlateef@gmail.com> wrote:
> 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
>

      parent reply	other threads:[~2005-09-27 11:40 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
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 [this message]

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=64c7635405092704404019b9a6@mail.gmail.com \
    --to=blockdevice@gmail.com \
    --cc=fawadlateef@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.