public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Silviu Craciunas <silviu.craciunas@sbg.ac.at>
To: Brice Goglin <Brice.Goglin@ens-lyon.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: get device from file struct
Date: Tue, 12 Dec 2006 10:04:08 +0100	[thread overview]
Message-ID: <1165914248.30185.41.camel@ThinkPadCK6> (raw)
In-Reply-To: <457DA4A0.4060108@ens-lyon.org>

On Mon, 2006-12-11 at 19:34 +0100, Brice Goglin wrote:
> Silviu Craciunas wrote:
> > quick question for the gurus.. is it possible to determine the hardware
> > device from a file struct during read/write system call. For example in
> > fs/read_write.c when doing a vfs_read.  
> >   
> 
> file->f_dentry->d_inode gives you the inode. If the inode is on top of a
> block device, inode->i_bdev gives you a struct block_device that might
> help you.
> 
> Brice

thanks for the reply, the block device can be determined with the major
and minor numbers , what I would be more interested in is if one can get
the net_device struct from the file struct

silviu


  reply	other threads:[~2006-12-12  9:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-11 15:22 get device from file struct Silviu Craciunas
2006-12-11 18:34 ` Brice Goglin
2006-12-12  9:04   ` Silviu Craciunas [this message]
2006-12-13  9:59     ` Jan Engelhardt
2006-12-13 10:37       ` Silviu Craciunas
2006-12-13 11:03         ` Jan Engelhardt
2006-12-13 12:28           ` Silviu Craciunas
2006-12-13 19:19             ` Jan Engelhardt
2006-12-13 23:53               ` Stephen Hemminger
2006-12-14 13:03                 ` Silviu Craciunas
2006-12-14 18:45                   ` Stephen Hemminger

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=1165914248.30185.41.camel@ThinkPadCK6 \
    --to=silviu.craciunas@sbg.ac.at \
    --cc=Brice.Goglin@ens-lyon.org \
    --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