This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Request for Junctions be treated consistently

Corinna Vinschen wrote:
On Apr  1 09:39, Linda Walsh wrote:
If I mount a device using mount vol in 2 different places, will they
have different device numbers the same?

The same, just as on Linux.
	Why special case junctions created with 'linkd' to return
as symlinks but not 'mountvol' if they both suffer from the same
possibilities of circular mounting?  I.e. creating circular loops
is no reason for linux to force the 'bind' command to look like
a 'symlink', but the same conditions exist.  I

	Running into a circular loop in your file system doesn't seem
to be a problem for the same utils on linux:

/tmp/test/b# mount --bind /tmp/test test
Ishtar:/tmp/test/b# ll test
total 0
drwxrwxr-x 3 16 Apr  4 07:33 a/
drwxrwxr-x 4 27 Apr  5 03:56 b/
drwxrwxr-x 3 16 Apr  4 07:33 common/
/tmp/test/# find . -type d -exec stat -c "%D" "{}" \;
find: File system loop detected; â./test/bâ is part of the same file system loop as â.â.
/tmp/test/# ls -R .
test/  usr/
a/  b/  common/
ls: ./test/b: not listing already-listed directory
/tmp/test/b# tree
|-- test
|   |-- a
|   |   `-- usr
|   |       `-- share -> ../../common/usr/share
|   |-- b
|   |   |-- test <<-tree doesn't list the common subtree
|   |   `-- usr
|   |       `-- share -> ../../common/usr/share
|   `-- common
|       `-- usr
|           `-- share
`-- usr
    `-- share -> ../../common/usr/share

13 directories, 0 files
/tmp/test/b#  tar cf - .|tar tf -
./test/b/test/ <--- tar doesn't list the subtree again here

Sorry, but I really don't understand your question here.
You said:
If you create a directory junction to an existing dir and treat it as
directory, the directory shows up twice under the same device number.
Find or tar will enumerate (and archive) the dir twice.
Under similar circumstances, it's not a problem on linux -- they
are the same device numbers but the above utilities don't loop

I don't think your original concern is as big a problem as you
think, as is indicated by the above setup on linux.

I.e. is there some other reason to not treat "linkd" mounts
the same as "mountvol" mounts -- in a manner equivalent to linux's
'bind' mounts?

I.e. I don't see that that linkd which creates a junction-mount
point, should be treated as a symlink.  It would provide valuable
benefit in cygwin terms in being able to setup directories at
multiple place like 'bind' does on linux, and be resistant to being
overwritten like symlinks.


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]