public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andrey Repin <anrdaemon@yandex.ru>
To: "L. A. Walsh" <cygwin@tlinx.org>, cygwin@cygwin.com
Subject: Re: Treating Junctions consistently, as "normal dirs" as w/linux "bind"-type mount
Date: Thu, 09 Mar 2017 13:50:00 -0000	[thread overview]
Message-ID: <1599023500.20170309163724@yandex.ru> (raw)
In-Reply-To: <58C0D744.2030005@tlinx.org>

Greetings, L. A. Walsh!

> Didn't see a response to this, so reposting, as this
> would provide a needed vol and subdir mount facility as
> exists on linux...

> Especially, since there was a misunderstanding of what
> was needed or wanted w/regards to the JUNCTION file-system
> mounts in Windows.   Didn't need mount table updated, just
> needed it to look like a normal mount (as 1 of the 
> 2 junction usages already does).  So it's just a matter of
> making the other junction type w/a path be treated as
> a normal dir instead of a symlink.  As it is now, it's 
> inconsistent with junctions created with mountvol being
> different from junctions created with linkd.

> Symlink(D)s would stay as they are now and provide the
> symlink functionality.

I would argue against all junctions being treated blindly.
The difference with bind mounts in Linux is that in Linux you don't have the
information available within the filesystem itself, and have no other option,
than to treat them as regular directories.
Only direct volume junctions cause an issue, and this is what should be fixed,
if possible, not sidetracked with questionable workarounds.

> Original note:

> Corinna Vinschen wrote:
>>
>>>  They
>>> half-way work under Cygwin (junctions to volumes look like
>>> mounted file systems look under linux, but junctions to
>>> pathnames get converted by cygwin to symlinks -- losing
>>> information when such junctions are restored.
>>>
>>> Corinna -- could you _please_ re-look at supporting both
>>> types of junctions as mount points?  Then Cygwin could have
>>> "mount-parity" with linux! ;-)
>>>     
>>
>> That's not easily possible.  Mount points in Cygwin are virtual entries
>> stored in the per-user session, in-memory mount table. 
> ---
>    Ahh.. you are making it more complicated than what I'm
> asking! (yey! this should be simpler)...

>    If I have a junction to the root of another volume, in
> cygwin it looks like a normal directory:

> Using mountvol...

> C:\>mountvol mountedVol \\?\Volume{578b2172-f917-11e4-b3d9-a0369f15ce28}
> 03/02/2017  01:24 PM    <JUNCTION>     mountedVol 
> [\??\Volume{578b2172-f917-11e4-b3d9-a0369f15ce28}\]
> 01/11/2017  04:17 PM    <JUNCTION>     var [C:\Windows\System32\cygwin\var]

> ### a junction is created ... under Cygwin. 
> Note, BTW, that 'var' is also a JUNCTION (a MS-mount point).


> C:\>exit
> exit
/>> ll
> total 100672654
> drwxrwx---+  1            0 Nov 20  2010 $RECYCLE.BIN/
> ...
> drwxrwx---+  1            0 May 15  2015 mountedVol/
> lrwxrwxrwx   1           28 Jan 11 16:17 var -> 
> /Windows/System32/cygwin/var/

/>> ls mountedVol
> $RECYCLE.BIN/  System Volume Information/

> ### mountedVol looks like a normal directory ^^^, but 'var' shows
> ### as a symlink.  That's the problem I'm referring to.  I'm saying
> ### JUNCTIONs (MS-mountpoints) should show up as the 'same' in
> ### Cygwin -- i.e. --

> ### But is not necessary that it be shown in Cygwin's "mount table":

/>> mount
> C:/bin on /usr/bin type ntfs (binary,auto)
> C:/lib on /usr/lib type ntfs (binary,auto)
> C: on / type ntfs (binary,auto)
> B: on /b type smbfs (binary,user,noumount,auto)
> ...

> ----
> It's the same on linux.
> linux> stat -c %D /var
> 822
> linux> sudo mount --rbind /var/rtmp /tmp
> linux> stat -c %D /tmp
> 822

> ----
> A mount from the same fs to another place on the same fs,
> looks like a normal directory (not a symlink).

> This is the behavior I would want for 'JUNCTION's under
> Cygwin. 

> On Windows, mklink creates a 'SYMLINK' or 'SYMLINKD' when
> directories are linked.  Those would stay as "Symlinks".









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



-- 
With best regards,
Andrey Repin
Thursday, March 9, 2017 16:33:49

Sorry for my terrible english...


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

  reply	other threads:[~2017-03-09 13:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-15 15:30 Cannot access volumes mounted with 'mklink /d' which point to a volume UUID Matt D.
2017-02-16  0:59 ` L. A. Walsh
2017-02-16  9:26 ` Corinna Vinschen
2017-02-24 21:49   ` L. A. Walsh
2017-02-28 21:43     ` Corinna Vinschen
2017-03-02 21:43       ` showing all JUNCTIONS as normal dirs as w/linux --bind (was Re: Cannot access volumes mounted with 'mklink...) L. A. Walsh
2017-03-09  4:17       ` Treating Junctions consistently, as "normal dirs" as w/linux "bind"-type mount L. A. Walsh
2017-03-09 13:50         ` Andrey Repin [this message]
2017-03-09 15:48           ` L A Walsh
2017-03-09 16:41             ` Corinna Vinschen
2017-03-09 19:13               ` L A Walsh
2017-03-10 13:20             ` Andrey Repin
2017-02-16 14:05 ` Cannot access volumes mounted with 'mklink /d' which point to a volume UUID Andrey Repin

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=1599023500.20170309163724@yandex.ru \
    --to=anrdaemon@yandex.ru \
    --cc=cygwin@cygwin.com \
    --cc=cygwin@tlinx.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).