From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) by sourceware.org (Postfix) with ESMTPS id 333433858D33 for ; Mon, 21 Aug 2023 22:07:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 333433858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=Shaw.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=shaw.ca Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTP id Y1sNqAbXKLAoIYD38qttlj; Mon, 21 Aug 2023 22:07:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=shaw.ca; s=s20180605; t=1692655622; bh=hj+7eyqpE3oqBF07y0rFTNiFfur8vuR19l1wBEK0QPg=; h=Date:Reply-To:Subject:To:References:Cc:From:In-Reply-To; b=ngyzL7XhhlaSVz0oGd1f9BeLyPEKS2y7XY7Xz8jMv6xxo4gPxkRlnLTBmA+GqZ0nF 5KviVheR0+BkWRzRFgohmtg2vC38FSXidWajW+3qxpMka45PHQRDN8KPZgrOIA/rNy 5Hq4eDvml+dp1Ic829N/gb/VmSIqRYxtYkCePp6KapDsjJq6eraRqyXyDH1fypzYa4 r6uizP/Dn10BQADUjcaNXIG7Y0089ZriQniOslEo7EHbDHEI3VRy8AgZNqCAoz+g++ OgAQn3BUzqHnI5TWfd5Gt/OChg3iqoxCMyiRC4fuvEdYgDEQTvu/gKyCcDnDeGM2XT s+o0o34YcCoBg== Received: from [10.0.0.5] ([184.64.102.149]) by cmsmtp with ESMTP id YD37qdMFqHFsOYD38q0muZ; Mon, 21 Aug 2023 22:07:02 +0000 X-Authority-Analysis: v=2.4 cv=XZqaca15 c=1 sm=1 tr=0 ts=64e3e006 a=DxHlV3/gbUaP7LOF0QAmaA==:117 a=DxHlV3/gbUaP7LOF0QAmaA==:17 a=IkcTkHD0fZMA:10 a=_Dj-zB-qAAAA:8 a=w_pzkKWiAAAA:8 a=CCpqsmhAAAAA:8 a=uZvujYp8AAAA:8 a=GcyzOjIWAAAA:8 a=U9k5fU-Gi2N_3_dKkHkA: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: <00cd8659-a17a-c5c6-0205-9b510859f95e@Shaw.ca> Date: Mon, 21 Aug 2023 16:07:01 -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 Reply-To: cygwin@cygwin.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 ... Content-Language: en-CA To: cygwin@cygwin.com References: Cc: Martin Wege From: Brian Inglis Organization: Inglis In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfKBHW1HjpmsfId4ZrYGpwAzsvyILHf/vEBWj6gcm3J+h+widdm0VkopsINwOfi60N0UmRhKYnVLuJFbzxXA8vJlPij++lWog7ZtZoXxSUVEZ4RRUGfdt DuBm75V8ULYU/6ZAVYA/rD2w6CQ7hX2mMERr9gaQDdErOfem5URN4eJGRaBPE+nIJdnBVmu00B5+RBacMMm4L/qY4cD4En6NFctxjmzlqcYewqleOGVB9Uxg X-Spam-Status: No, score=-5.0 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,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 List-Id: On 2023-08-21 06:03, Martin Wege via Cygwin wrote: > On Sat, Aug 19, 2023 at 7:50 PM Brian Inglis 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 >>> wrote: >>>> >>>> On Aug 17 20:49, Martin Wege via Cygwin wrote: >>>>> On Mon, Aug 14, 2023 at 10:56 PM Corinna Vinschen via Cygwin >>>>> 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? My suggestion was to encourage you to try out the command on the relevant filesystems, or feel free to check out the repo and the implementation. You can search the mailing lists on inbox.sourceware.org/cygwin or mail-archive. Volunteers focus on fixes to reproducible problems, adding function, upgrading packages, and quick answers to questions: the rest is up to you! If you need professional support, try job forums to hire someone with the knowledge or skills to answer your questions. -- 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