From: Michael Zhu <mylinuxk@yahoo.ca>
To: linux-kernel@vger.kernel.org
Cc: nmundi@karthika.com
Subject: Communication between two modules
Date: Wed, 12 Dec 2001 23:13:23 -0500 (EST) [thread overview]
Message-ID: <20011213041323.96594.qmail@web14914.mail.yahoo.com> (raw)
Hello,everyone, I have some questions about Linux file
system and block device.
First, you know for the block device there is a
blk_dev table which is indexed by the major number of
the block device. The register_blkdev() function is
used to insert a new entry into this blk_dev table.
How can I access to this table in my kernel module?
The reason why I want to access to this table is I
want to access some specific Block Device Driver
Descriptor so that I can access to the request queue
of that block device, such as floppy disk device. This
table is a global variable?
Second, whether two kernel modules can communicate
with each other or not? For example, can my own kernel
module communicate with the floppy block device? And
how? I want to 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.
Third, I know that the kernel statically allocates a
fixed number of request descriptors to handle all the
requests for block devices. There are NR_REQUEST
descriptors (usually 128) stored in the all_requests
array (This is from the book "Understanding the Linux
Kernel" by Daniel P. Bovet&Marco Cesati. P403). How
can I access this all_requests array? I need to access
the request descriptor of the floppy disk device.
Last one, about the ll_rw_block() function. How can I
intercept this function in my kernel module? Can I get
the function pointer of this function in my module?
Any idea will be appreciated.
Michael
______________________________________________________
Send your holiday cheer with http://greetings.yahoo.ca
reply other threads:[~2001-12-13 4:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20011213041323.96594.qmail@web14914.mail.yahoo.com \
--to=mylinuxk@yahoo.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=nmundi@karthika.com \
/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
all inboxes | Powered by JetHome®