Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Mar 2002 10:34:55 +0100 (CET)
From:      Harti Brandt <brandt@fokus.gmd.de>
To:        Garance A Drosihn <drosih@rpi.edu>
Cc:        Poul-Henning Kamp <phk@critter.freebsd.dk>, <arch@FreeBSD.ORG>
Subject:   Re: Increasing the size of dev_t and ino_t
Message-ID:  <20020311102511.M516-100000@beagle.fokus.gmd.de>
In-Reply-To: <p05101537b8b1707a3659@[128.113.24.47]>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 10 Mar 2002, Garance A Drosihn wrote:

GAD>First, my starting assumption on the significance of the st_dev
GAD>value.  My take on that value is that if two files have the same
GAD>value for their device, then you could remove one of those files
GAD>and hardlink the other file to the name of the removed file.
GAD>Hardlinks can not cross device boundaries, but if these two files
GAD>have the same value for st_dev then that hard link would not be
GAD>crossing a device boundry.  Or, another way to think of it is that
GAD>if two files have the same device-number, and if they both have an
GAD>st_nlink count of 1, then removing one of those files will result
GAD>in more space being available for the expansion of the other file.
GAD>(perhaps after a reboot, to eliminate the question of open file
GAD>descriptors keeping that first file around even though you have
GAD>unlinked it).  I do not know if the appropriate standards would
GAD>agree with me on these views, but they seem like a logical premise.
GAD>Otherwise, a st_dev value would have no special meaning at all.

There is an explicit requirement in POSIX: it requires a given
st_ino/st_dev pair to uniqely identify a file. I take this to mean: if two
files have the same st_ino/st_dev pair, they are the same file. If I mount
the same volume in different places in the tree any file on that volume
must have the same st_ino/st_dev pair in both mount points. As worded by
POSIX the st_ino/st_dev pairs are not required to be persistant through
reboots. It can, however, be hard to implement persistant file handles for
NFS based on non-persistant st_info/st_dev pairs.

harti
-- 
harti brandt, http://www.fokus.gmd.de/research/cc/cats/employees/hartmut.brandt/private
              brandt@fokus.fhg.de


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020311102511.M516-100000>