All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Danny Milosavljevic" <danny_milo@yahoo.com>
To: reiserfs-list@namesys.com
Subject: Re: a bit OT: traditional Unix filesystems
Date: Thu, 14 Sep 2006 17:13:56 +0000 (UTC)	[thread overview]
Message-ID: <eec2kk$d2n$1@sea.gmane.org> (raw)
In-Reply-To: 20060914170544.GA7793@tranquility.scriptkitchen.com

Hi,

On Thu, 14 Sep 2006 13:05:44 -0400, Payal Rathod wrote:

> Hi,
> I have a small OT query on working of traditional filesystem of Unix.
> Can someone comment/correct me on the query below?
> 
> If i type $ cat /tmp/payal.txt (according to my knowledge) [...]
[unverified by me, and unrelated]

> Now if tmp is on different partition or harddisk, how will directory
> entry of "?" point it out exactly? 

The kernel has a list of mountpoints (see "/proc/<pid>/mounts") per
process. It looks there if path argument starts with one of those, and if
so, passes the path on to the topmost filesystem handler for that
mountpoint (it also knows the device, it is part of the mountpoint list).

> As far as I know, directory entry
> contains names and inode number and not the device details, then how
> does it exactly work? 

For mountpoints, the kernel checks the mountpoint table (in kernel memory,
per process) before passing the request on to the (topmost) filesystem that
handles that prefix (which reads the directory entry and fetches the inode
mentioned there).

cheers, 
  Danny


  reply	other threads:[~2006-09-14 17:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-14 17:05 a bit OT: traditional Unix filesystems Payal Rathod
2006-09-14 17:13 ` Danny Milosavljevic [this message]
2006-09-14 19:43 ` Quinn Harris

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='eec2kk$d2n$1@sea.gmane.org' \
    --to=danny_milo@yahoo.com \
    --cc=danny.milo@scratchpost.org \
    --cc=reiserfs-list@namesys.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.