delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/08/21/08:04:09

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E55673856974
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1692619447;
bh=S+4dW47dognCJ1iA5sC+sZxXNMXCD3R8i+Jta9i7Pqo=;
h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=J0xGXooShXt+9z6v7/KYja6yX59SUffnJaEUsX//82vudYlCJDebFby0yWMk5cYUf
Ah6ChjdkhwZXJNST2EO438L6lRkH389Sg7s8fQ935q9NvW8x09OFfZCJLglvGutPLf
yvaQLkJqzo+3q7ycXPd/aitVVD142mwDv32goJBE=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CFF293858025
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20221208; t=1692619400; x=1693224200;
h=content-transfer-encoding:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=0CHlRrJ+VLuo/pkdJRWAL7s50iRqDt1fReuEbVZQhI0=;
b=QKt9WsSujRk0mtYoLYdNVFl4qU8zNDv7+/yUcKCziHeOckVpAu9J9Wtj30cQkQy/2X
+du+/RTFVN90YgYyeBJ3wfm1aL3W+IWVM7ROHO/28byGEv9q0kQwNVG4Y0jO9Qrtw+fh
pGsP9KFH7Qz4yYjmFMwFti5qzoaEsvREhSHdVvFO4FYizzzuT3SvJBImhZagh7LzAZFs
EOIRKRDIbSHWqX2/WTdRE3TwK8nFlQAqZRFv6s0oE0jYjt23gxvzCwBAgs/rLX2/Cvbe
7X2/dSWJqMzo0vdR5slh11z1aH/Or8HiYKWCg37Akr6MWRWQx1O1nr+1G+1x+SdnayYn
SADQ==
X-Gm-Message-State: AOJu0YxcTfTMnIsclw8MHWtgEDRvz1nN7ihkFdJpgvohtQE7q1RcTpEH
oaPHVCSyakIlOcR00ohEGaEOe8f/Q/FLtQJNFiR/o8dzjb9dZw==
X-Google-Smtp-Source: AGHT+IFco2Y4UfjeF6LjA2MEI8PQLFee/7SKdym/dntGWVsqL+SCztNtxPAff33/PGkp51qWbhGs3uXIxNgQc8ZxpzA=
X-Received: by 2002:a05:6870:9122:b0:1c8:bf19:e1db with SMTP id
o34-20020a056870912200b001c8bf19e1dbmr8738551oae.11.1692619399881; Mon, 21
Aug 2023 05:03:19 -0700 (PDT)
MIME-Version: 1.0
References: <a0f1e420-ae48-49a3-9300-c56f1948ad9b DOT 8d485f54-9f47-42b0-bdcb-9635fbf663c3 DOT 6697971f-86bc-49dc-8072-c37095eed858 AT emailsignatures365 DOT codetwo DOT com>
<a0f1e420-ae48-49a3-9300-c56f1948ad9b DOT 93e247b8-206a-49dd-b71c-9240681180cb DOT 7748cdc6-d053-4197-9372-3b4751ae3949 AT emailsignatures365 DOT codetwo DOT com>
<a0f1e420-ae48-49a3-9300-c56f1948ad9b DOT e52b7f5f-5a09-4346-99f8-a6591191169c DOT 10af45d3-4cfc-48f7-a293-b6d9fa78cdd1 AT emailsignatures365 DOT codetwo DOT com>
<AM5PR0502MB30752878C878948E660A73179210A AT AM5PR0502MB3075 DOT eurprd05 DOT prod DOT outlook DOT com>
<ZNoAR4fBMXknsn5z AT calimero DOT vinschen DOT de>
<CAKAoaQn47pu510onZDwh4baES-bhxtuSy3SxDCv7sXw5T94pzA AT mail DOT gmail DOT com>
<CAKAoaQnvSZDD6mitFsdD==aOi0n9h3JSAEiJo8QXCRAf58H_Sw AT mail DOT gmail DOT com>
<ZNqU5c5pMS2cQbsc AT calimero DOT vinschen DOT de>
<CANH4o6OBo-vHUps6BbCn0X-w8Y49AADwB7PRfXPr+OH7GQ5TkQ AT mail DOT gmail DOT com>
<ZN8vYctyNP0HRrbU AT calimero DOT vinschen DOT de>
<CANH4o6P0XfmqjiiG+4eGmiz=4Vj8420Q6GSCz-PAwfnUUF-tzw AT mail DOT gmail DOT com>
<f0a61e5d-ca45-4145-a33d-78c3c9a0b345 AT Shaw DOT ca>
In-Reply-To: <f0a61e5d-ca45-4145-a33d-78c3c9a0b345@Shaw.ca>
Date: Mon, 21 Aug 2023 14:03:00 +0200
Message-ID: <CANH4o6PKRxPxvMDrdrHRaSWbVdYpWZ6zG1kqh0oUySRzWybrXA@mail.gmail.com>
Subject: Re: Cygwin pathconf() query filesystem kernel data? Re: How does
Cygwin detect MSFT NFSv3 file system? Re: Weird (path) problems with cygwin
test release 3.5.0-0.384.g9939aa7d0945.x86_64 ...
To: cygwin AT cygwin DOT com, Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
X-Spam-Status: No, score=1.8 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT,
RCVD_IN_DNSWL_NONE, RCVD_IN_SBL_CSS, SPF_HELO_NONE, SPF_PASS,
TXREP autolearn=no autolearn_force=no version=3.4.6
X-Spam-Level: *
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Martin Wege via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Martin Wege <martin DOT l DOT wege AT gmail DOT com>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 37LC48uo010476

On Sat, Aug 19, 2023 at 7:50 PM Brian Inglis <Brian DOT Inglis AT shaw DOT ca> wrote:
>
> On 2023-08-18 07:09, Martin Wege via Cygwin wrote:
> > On Fri, Aug 18, 2023 at 10:44 AM Corinna Vinschen via Cygwin
> > <cygwin AT cygwin DOT com> wrote:
> >>
> >> On Aug 17 20:49, Martin Wege via Cygwin wrote:
> >>> On Mon, Aug 14, 2023 at 10:56 PM Corinna Vinschen via Cygwin
> >>> <cygwin AT cygwin DOT com> wrote:
> >>>> and the result is the same.  Note that Cygwin supports MSFT NFSv3 but
> >>>> not CITI NFSv4.1 internally.  No gurantee that Cygwin always does what
> >>>> is necessary for that other NFS.
> >>>
> >>> 1. How does Cygwin detect whether something is a MSFT NFSv3, or not?
> >>> Cygwin /bin/mount lists the CITI NFSv4.1 as 'nfs', so there *IS*
> >>> something which detects that?
> >>
> >> The filesystem name returned by NtQueryVolumeInformationFile is "NFS".
> >> If any other NFS returns the same filesystem name, it will be treated
> >> just like MSFT NFSv3.
> >>
> >>> 2. Are Cygwin soft link handing depend on MSFT NFSv3 or not, i.e. does
> >>> the Cygwin soft link code behave differently for MSFT NFSv3 file
> >>> systems?
> >>
> >> Yes.  NFS doesn't support symlink creation and symlink reading via
> >> the usual functions, because Windows symlinks are created as reparse
> >> points.  NFS doesn't support reparse points.  So the developers of
> >> the MSFT NFS client had to invent their own way to create and
> >> read NFS symlinks:
> >>
> >> https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/path.cc;hb=HEAD#l1719
> >>
> >> https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/path.cc;hb=HEAD#l2750
> >>
> >>> 3. Does Cygwin implement the pathconf() api?
> >>
> >> Yes.  Surprisingly, you can check this yourself by just calling the
> >> function and trying to compile your code.
> >
> > Apologies, how do we say in German? "Ich sollte meine Frage konkretisieren:"
> >
> > Does the Cygwin implementation of pathconf() support query data of the
> > underlying filesystem based on data from the kernel, as UNIX does? So
> > pathconf() returns different values for NTFS, ReFS, or Windows builtin
> > NFSv3?
> >
> > I am asking, because as far as I know the Linux implementation is not
> > a syscall, and instead glibc guesses values based on builtin static
> > data, and whatever fstatfs() has to offer. Compared to that UNIX
> > (Solaris, AIX, HPUX, ...) have pathconf() as a syscall, and actually
> > ask the filesystem itself.
>
> Many library functions are implemented as documented either in the Cygwin
> packages cygwin-doc and man-pages-posix available for installation; and use as
> e.g. `man 3p fpathconf`, also available online at:
> https://pubs.opengroup.org/onlinepubs/9699919799/functions/fpathconf.html or
> https://man7.org/linux/man-pages/man3/fpathconf.3p.html
> and for comparison and reference we make Cygwin package man-pages-linux
> available for installation; and use as e.g. `man -m linux 3 fpathconf`, also
> available online at:
>
>         https://man7.org/linux/man-pages/man3/fpathconf.3.html
>
> suggestions for setup are in the package announcements made every 9-12 weeks
> when the latest Linux man-pages package is released and updated on Cygwin.
>
> Please also note that the getconf(1) program is installed as part of Cygwin and
> can access f/pathconf variables associated with a pathname argument, as shown in
> getconf(1) `man 1 getconf` and getconf(1p) `man 1p getconf`.

Thanks, but my question was about the Cygwin *implementation*: Does it
distinguish between NTFS, REFS, FAT, NFS? Does it use data obtained
from the Windows kernel at runtime, or does it rely on static data
compiled into the cygwin.dll library?

Thanks,
Martin

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

- Raw text -


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