delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/04/05/07:14:15

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
q=dns; s=default; b=FpO7OvLy6ZLUl0MqFH61NAQTvwaWGYoYs/4Au9imIb3
gAcCcWqN8QtCevnMlb6G0shmuzrxGOfj3B4HouGBaswWhKjw0G/znUSr6oXesH3l
TlAGn2OQFMRFSDFic3HpPybCHU7Tb+w3CudSOjM9NI8lRRo/NSzU9Czd9VA0VYLQ
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
s=default; bh=YQlZDEQ6Ugg1rmTXGA5OBfZRr9w=; b=ji8ROVuSGWl5VLbUt
G874uBON+yuxgdUG8qiMnieLMKRbyiFDQR4Wrq7VJlAUX042EGAQe0kuIB+GjGm0
vnj2xPnA+fQTf06ZKLYtxR6DFTTiGDKz/AdPW21Y1sTfCUWa6i8fWCEXlmPdA+OL
2/FrzD2VI2stqFdcClQiQ+56UQ=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_40,RP_MATCHES_RCVD autolearn=ham version=3.3.2
X-HELO: Ishtar.tlinx.org
Message-ID: <533FE56D.5010809@tlinx.org>
Date: Sat, 05 Apr 2014 04:13:49 -0700
From: Linda Walsh <cygwin AT tlinx DOT org>
User-Agent: Thunderbird
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Request for Junctions be treated consistently
References: <5336C0DF DOT 5080102 AT tlinx DOT org> <5336C23B DOT 2070309 AT tlinx DOT org> <20140331102745 DOT GD23383 AT calimero DOT vinschen DOT de> <533AEBD6 DOT 3040209 AT tlinx DOT org> <20140402084026 DOT GM2508 AT calimero DOT vinschen DOT de>
In-Reply-To: <20140402084026.GM2508@calimero.vinschen.de>
X-IsSubscribed: yes

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" "{}" \;
822
822
822
822
822
find: File system loop detected; ‘./test/b’ is part of the same file system loop 
as ‘.’.
822
822
822
/tmp/test/# ls -R .
.:
test/  usr/
./test:
a/  b/  common/
./test/a:
usr/
./test/a/usr:
share@
ls: ./test/b: not listing already-listed directory
./test/common:
usr/
./test/common/usr:
share/
./test/common/usr/share:
./usr:
share@
/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 -
./
./usr/
./usr/share
./test/
./test/a/
./test/a/usr/
./test/a/usr/share
./test/b/
./test/b/usr/
./test/b/usr/share
./test/b/test/ <--- tar doesn't list the subtree again here
./test/common/
./test/common/usr/
./test/common/usr/share/

-----------------
> 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
infinitely.

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.



> 
> 
> Corinna
> 

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019