X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D17E385828D
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1692467456;
	bh=eFdb8I8xJ9tIMMq6TKMFrZAa1fzYkw9SvFuBMwGj65s=;
	h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
	 From;
	b=o3io/q3ot/xu30760qzp3xQ/yiV0n6TQQP3VEi2ZBFY9IhcLHqKEdON9Anw8znj8P
	 PYdj92Jc/Jo/QzTbXMAGWonepZGd6ibf3x1BZJb94yRbDf5oDv+/2tjfAe8L0kzjiW
	 ihDRqJlJogKeOQ9vybGERaFt9dsaCROLWq60NfEg=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D2EAB3858C1F
X-Authority-Analysis: v=2.4 cv=J8G5USrS c=1 sm=1 tr=0 ts=64e100ef
 a=DxHlV3/gbUaP7LOF0QAmaA==:117 a=DxHlV3/gbUaP7LOF0QAmaA==:17
 a=IkcTkHD0fZMA:10 a=w_pzkKWiAAAA:8 a=CCpqsmhAAAAA:8 a=uZvujYp8AAAA:8
 a=GcyzOjIWAAAA:8 a=94jVtQPQMHxbWqkDWrwA:9 a=QEXdDO2ut3YA:10 a=6m_Ug2JbhqQA:10
 a=repbOvnGKhUA:10 a=ABn2ESZFGBcA:10 a=sRI3_1zDfAgwuvI8zelB:22
 a=ul9cdbp4aOFLsgKbc677:22 a=SLzB8X_8jTLwj6mN0q5r:22 a=hQL3dl6oAZ8NdCsdz28n:22
Message-ID: <f0a61e5d-ca45-4145-a33d-78c3c9a0b345@Shaw.ca>
Date: Sat, 19 Aug 2023 11:50:38 -0600
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
 Thunderbird/102.14.0
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@cygwin.com
References: <a0f1e420-ae48-49a3-9300-c56f1948ad9b.8d485f54-9f47-42b0-bdcb-9635fbf663c3.6697971f-86bc-49dc-8072-c37095eed858@emailsignatures365.codetwo.com>
 <a0f1e420-ae48-49a3-9300-c56f1948ad9b.93e247b8-206a-49dd-b71c-9240681180cb.7748cdc6-d053-4197-9372-3b4751ae3949@emailsignatures365.codetwo.com>
 <a0f1e420-ae48-49a3-9300-c56f1948ad9b.e52b7f5f-5a09-4346-99f8-a6591191169c.10af45d3-4cfc-48f7-a293-b6d9fa78cdd1@emailsignatures365.codetwo.com>
 <AM5PR0502MB30752878C878948E660A73179210A@AM5PR0502MB3075.eurprd05.prod.outlook.com>
 <ZNoAR4fBMXknsn5z@calimero.vinschen.de>
 <CAKAoaQn47pu510onZDwh4baES-bhxtuSy3SxDCv7sXw5T94pzA@mail.gmail.com>
 <CAKAoaQnvSZDD6mitFsdD==aOi0n9h3JSAEiJo8QXCRAf58H_Sw@mail.gmail.com>
 <ZNqU5c5pMS2cQbsc@calimero.vinschen.de>
 <CANH4o6OBo-vHUps6BbCn0X-w8Y49AADwB7PRfXPr+OH7GQ5TkQ@mail.gmail.com>
 <ZN8vYctyNP0HRrbU@calimero.vinschen.de>
 <CANH4o6P0XfmqjiiG+4eGmiz=4Vj8420Q6GSCz-PAwfnUUF-tzw@mail.gmail.com>
Content-Language: en-CA
Organization: Inglis
In-Reply-To: <CANH4o6P0XfmqjiiG+4eGmiz=4Vj8420Q6GSCz-PAwfnUUF-tzw@mail.gmail.com>
X-CMAE-Envelope: MS4xfBEKJhYoILw9nbMHBnSNDQI3YesAVgVkRGgT0DF8hdyRynVhCecIOTFTxlLzyYEyU1FIatl393Eeh3t1ShEYySCk0ApHjxGUz0Y4PBtlzaINA6NC/Rln
 PPE4pnnqJuH/595mrNqFngBVoMmua8QqRFUo6IkAr5qvu1l0jQaxQ3w/nq4lwJ3n5HYUjJ/iFZDvtHDq0DS5TJjZ9zSSZmTuQY0ExOK9a5O23JMgHns5oGM3
X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, NICE_REPLY_A,
 RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,
 SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Brian Inglis via Cygwin <cygwin@cygwin.com>
Reply-To: cygwin@cygwin.com
Cc: Brian Inglis <Brian.Inglis@Shaw.ca>, Martin Wege <martin.l.wege@gmail.com>
Content-Type: text/plain; charset="utf-8"; Format="flowed"
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 37JHoupw015651

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@cygwin.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@cygwin.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`.


-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

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

