From: Andreas Dilger <adilger@turbolinux.com>
To: Chanchal Chawla <chanchalx.chawla@dcmtech.co.in>
Cc: linux-kernel@vger.kernel.org
Subject: Re: query
Date: Sun, 3 Jun 2001 08:42:23 -0600 (MDT) [thread overview]
Message-ID: <200106031442.f53EgNRv003295@webber.adilger.int> (raw)
In-Reply-To: <7FADCB99FC82D41199F9000629A85D1A01C67B31@dcmtechdom.dcmtech.co.in> "from Chanchal Chawla at Jun 2, 2001 03:38:45 pm"
Chanchal Chawla writes:
> i'm writing a file system code, i've a query regarding that, i want you
> to help me out if possible,
>
> is it possible to get the absolute mount point of a device at run time
> in that code ? if it is possible then how we can get it ?
It was possible in 2.2 with a minor hack. I did it by passing mountpoint
dentry via sb->s_root to filesystem, and using d_path() to do the path
lookup inside the filesystem. s_root is overwritten by the filesystem
to hold the new fs root dentry, so you need to get the path and store it
elsewhere before s_root is overwritten.
In 2.4 I was trying to get Al Viro to tell me the best way to do this, but
because it is _possible_ to mount a filesystem multiple times under 2.4 it
raises a question about which mountpoint you should use. In 2.4 you need
to supply an additional vfsmnt parameter to d_path(), and I never did get
an answer out of Al as to how to get a vfsmnt inside the filesystem, even
if there is only one mount of the filesystem.
Cheers, Andreas
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
next prev parent reply other threads:[~2001-06-03 14:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-02 10:08 query Chanchal Chawla
2001-06-03 14:42 ` Andreas Dilger [this message]
2005-08-09 10:28 query raja
2005-08-09 10:40 ` query Nikhil Dharashivkar
2005-08-09 10:58 ` query Sudheer
2011-03-16 9:35 Query snmp snmp
2011-03-16 11:54 ` Query Alan Cox
2011-03-17 12:04 ` Query snmp snmp
2011-05-18 20:42 query Filip, Anotonov
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=200106031442.f53EgNRv003295@webber.adilger.int \
--to=adilger@turbolinux.com \
--cc=chanchalx.chawla@dcmtech.co.in \
--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®