linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to filter the Block I/O in 2.6 kernel?
@ 2008-05-21  4:05 XiongJia Le
       [not found] ` <1d4539510805220957s6954ac7as117cca02bb2077ca@mail.gmail.com>
  0 siblings, 1 reply; 2+ messages in thread
From: XiongJia Le @ 2008-05-21  4:05 UTC (permalink / raw)
  To: linux-kernel, linux-fsdevel

How to filter the Block I/O in 2.6 kernel?

I have looked some in blktrace.
blktrace can trace the block device I/O info. But that can't
filter/change this I/O.

Is the Linux kernel have any way to filter/change a block i/o before
it write to hard disk?
I don't want to change kernel code and re-build. Is Kernel already
have any I/O filter interface?

Thanks,
Xiongjia Le

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to filter the Block I/O in 2.6 kernel?
       [not found] ` <1d4539510805220957s6954ac7as117cca02bb2077ca@mail.gmail.com>
@ 2008-05-23  1:20   ` XiongJia Le
  0 siblings, 0 replies; 2+ messages in thread
From: XiongJia Le @ 2008-05-23  1:20 UTC (permalink / raw)
  To: TJ Easter, linux-kernel, linux-fsdevel

Hi TJ,

I am working on a small tools what can dump all occupied sectors on
the hard disk.
But at dumping time some i/o is still occuring on the disk. So I want
to write a filter in kernel.
If some sector will change at dumping time, I will dump this sector
first and before this sector changed.

I think hook syscall is not enough for me. Because at System Call
layout I can not get the address of the sector what will changed.

Thanks,
Xiongjia Le


On Fri, May 23, 2008 at 12:57 AM, TJ Easter <tjeaster@gmail.com> wrote:
> XiongJia,
>      I am far from a kernel expert, but something you might consider would
> be to write a module that hooks the syscall(s) for I/O, replacing them with
> your own routines, and then passing the altered data along to the original
> syscall.  I am not sure that a module will allow you that deep of access
> into the I/O paths, but it might be your easiest option.    If I may ask,
> why would you want to alter data between the I/O scheduler and the actual
> disk store?   Seems somewhat counter-intuitive to me.
>
> Regards,
> TJ Easter
>
> On Tue, May 20, 2008 at 11:05 PM, XiongJia Le <lexiongjia@gmail.com> wrote:
>>
>> How to filter the Block I/O in 2.6 kernel?
>>
>> I have looked some in blktrace.
>> blktrace can trace the block device I/O info. But that can't
>> filter/change this I/O.
>>
>> Is the Linux kernel have any way to filter/change a block i/o before
>> it write to hard disk?
>> I don't want to change kernel code and re-build. Is Kernel already
>> have any I/O filter interface?
>>
>> Thanks,
>> Xiongjia Le
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel"
>> in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
>
> --
> "Being a humanist means trying to behave decently without expectation of
> rewards or punishment after you are dead."  -- Kurt Vonnegut, 1922 - 2007
> http://keyserver1.pgp.com/vkd/DownloadKey.event?keyid=0x5EB6E92FE2340DEF

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-23  1:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-21  4:05 How to filter the Block I/O in 2.6 kernel? XiongJia Le
     [not found] ` <1d4539510805220957s6954ac7as117cca02bb2077ca@mail.gmail.com>
2008-05-23  1:20   ` XiongJia Le

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).