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

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


  reply	other threads:[~2006-12-11 18:34 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 [this message]
2006-12-12  9:04   ` Silviu Craciunas
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=457DA4A0.4060108@ens-lyon.org \
    --to=brice.goglin@ens-lyon.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=silviu.craciunas@sbg.ac.at \
    /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