Writing an FS filter for UNIX will be a PITA though due to namei() and vnode chains.
You will need to filter all VFS virtual methods and attach your filter’s vnode with its own vtable instead of the FS’s one to the file object.
Also note that Linux paging IO path (Linux is simpler than NT and has no uncached IO paths for on-disk files - any user read() goes to cache) often bypasses the filesystem, VFS just calls bmap() vnode method, then splits the request itself and sends it down to the disk. The FS does not see the data at all.
Having no kernel debugger :-)))), this can be a very complex task.
On the other hand, I consider the lack of namei() in NT as design flaw #1.
Having no partition support tier and bothering the disk class driver with partition tables is possibly design flaw #2.
Max
----- Original Message -----
From: Parveen Tandon
To: NT Developers Interest List
Sent: Thursday, December 13, 2001 2:01 PM
Subject: [ntdev] RE: Communication between two modules
Hi Michael,
I think you can write a filter driver in linux to trap all read/write call on floopy drive.
If floopy drive??s entry point are exported then you can write a filter driver for a fake device in which you can capture all the entry point of floopy drive.
Bye
Tandon
-----Original Message-----
From: Michael [mailto:xxxxx@yahoo.ca]
Sent: Thursday, December 13, 2001 12:06 PM
To: NT Developers Interest List
Subject: [ntdev] Communication between two modules
Hi, everyone, does anyone know how to implement a filter driver on the Linux platform, such as intercept the read/write operations to the floppy block device. I mean I want to hook all the read/write operations to the floppy block device in my kernel module. Maybe on Windows platform this can be implement by a filter driver. But how can I implement this on Linux platform?
I am so sorry to post this Linux problem on this NT mail list. But I really need your help. Thank you very much.
Michael
You are currently subscribed to ntdev as: xxxxx@dcmtech.co.in
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com