Re: Trapping Block I/O

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]> wrote:
> On 9/23/05, Block Device <[email protected]> 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
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux