From: "Eddie Pettis" <pettis.eddie@gmail.com>
To: "Helge Hafting" <helge.hafting@aitel.hist.no>
Cc: linux-kernel@vger.kernel.org
Subject: Re: How to locate struct file * from a bio?
Date: Wed, 31 Jan 2007 13:55:15 -0500 [thread overview]
Message-ID: <d66e87630701311055h49a03552m904cbf00751dd805@mail.gmail.com> (raw)
In-Reply-To: <45C0B343.1090301@aitel.hist.no>
On 1/31/07, Helge Hafting <helge.hafting@aitel.hist.no> wrote:
> Eddie Pettis wrote:
> > Short question: Is it possible to locate the struct file * associated
> > with a bio? If so, how?
> >
>
> Looks like you do this the wrong way.
Agreed. It was a bad hack based on something I had done previously.
>
> Why don't you tap into "open" instead?
> Here you can note who opens the file and if they open it for
> reading or writing. If you really need the amount of data
> transferred, consider trapping the read and write syscalls too.
I added hooks to the sys_* system calls for read/write/open/close from
userspace, and that seems to work.
Thanks!
>
> Helge Hafting
>
prev parent reply other threads:[~2007-01-31 18:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-31 14:34 Eddie Pettis
2007-01-31 14:44 ` Al Viro
2007-01-31 14:51 ` Al Viro
2007-01-31 15:18 ` Helge Hafting
2007-01-31 18:45 ` Jan Engelhardt
2007-01-31 18:55 ` Eddie Pettis [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=d66e87630701311055h49a03552m904cbf00751dd805@mail.gmail.com \
--to=pettis.eddie@gmail.com \
--cc=helge.hafting@aitel.hist.no \
--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 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®