From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23354 invoked by alias); 25 Aug 2016 12:45:32 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 22176 invoked by uid 89); 25 Aug 2016 12:45:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-101.5 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=utilizes, cch, vista, Regarding X-HELO: drew.franken.de Received: from mail-n.franken.de (HELO drew.franken.de) (193.175.24.27) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 25 Aug 2016 12:45:16 +0000 Received: from aqua.hirmke.de (aquarius.franken.de [193.175.24.89]) (Authenticated sender: aquarius) by mail-n.franken.de (Postfix) with ESMTPSA id 03021721E281C for ; Thu, 25 Aug 2016 14:45:13 +0200 (CEST) Received: from calimero.vinschen.de (calimero.vinschen.de [192.168.129.6]) by aqua.hirmke.de (Postfix) with ESMTP id 5E3835E023C for ; Thu, 25 Aug 2016 14:45:12 +0200 (CEST) Received: by calimero.vinschen.de (Postfix, from userid 500) id 4EAA2A80617; Thu, 25 Aug 2016 14:45:12 +0200 (CEST) Date: Thu, 25 Aug 2016 13:04:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: FUSE, symbolic links and special files Message-ID: <20160825124512.GE9783@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Ns7jmDPpOpCD+GE/" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.2 (2016-07-01) X-SW-Source: 2016-08/txt/msg00476.txt.bz2 --Ns7jmDPpOpCD+GE/ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2503 On Aug 25 11:46, Bill Zissimopoulos wrote: > Turns out that Microsoft already has a solution for special files on NFS: >=20 > https://msdn.microsoft.com/en-us/library/dn617178.aspx >=20 > I see no reason that the same solution cannot be used for FUSE for Cygwin > as well. On NFS Cygwin utilizes the information available via extended attributes so far. There's an extended attribute you can give to NtCreateFile to indicate that you want to act on the link, not on the file the link points to. The EA method is used for stata() as well to fetch the NFS FATTR3 structure. See winsup/cygwin/nfs.{cc,h} for details. What bugs me is that I wasn't aware that there's also a reparse point implementation for NFS. When I wrote the original code accessing NFS, the MSFT guys working on NFS gave me a hint or two how to access this information, but there was no talk about reparse points at all :( Since when is this RP method available? Unfortunately the above MSDN page doesn't tell... Was it already available with Vista? Does anybody know? Hmm. This might allow to speed up symlink_info::check since the entire code to read the EA could go away and the functionality of check_nfs_symlink could be folded into check_reparse_point. But... In the following OP is the originating process, CW is the Cygwin > layer, WL is the WinFsp layer and FL is the FUSE layer. >=20 > OP: mkfifo("myfifo") > CW: NtCreateFile, NtDeviceIoControlFile(FSCTL_SET_REPARSE_POINT) > [NFS_SPECFILE_FIFO] > WL: IRP_MJ_FILE_SYSTEM_CONTROL/FSCTL_SET_REPARSE_POINT [NFS_SPECFILE_FIFO] > FL: fuse_operations::mknod("myfifo", S_IFIFO) >=20 > Regarding symbolic link support specifically I am still undecided on > whether the right thing to do is to use NTFS symbolic links > (IO_REPARSE_TAG_SYMLINK) or use NFS_SPECFILE_LNK for the FUSE layer. My > inclination is to support both and let the FUSE file system developer > decide on their preference. >=20 > Any comments welcome. ...it needs thorough testing(*). There's a good chance that the NFS RP buffer is not exposed to user space, but instead only handled by the NFS driver. *If* the RP method works fine in user space, I'm inclined to do as outlined above and get rid of the EA stuff in symlink_info::check since it could be transparently shared between NFS and WinFSP. Corinna (*) https://cygwin.com/acronyms/#SHTDI --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --Ns7jmDPpOpCD+GE/ Content-Type: application/pgp-signature; name="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXvuhYAAoJEPU2Bp2uRE+g0PsP/0Sj8X3Gn9sTPwB/ZfK3fxfw ccY7j2BhV1UW0890J9f8e8kCqnFFZrytWqEYXVk7LyPPYFQitf8W5gbcuZ7lySsC nGvao9rsX7uAxoFzriNgbL91CIZtRRGBrplsXObm6U6GQy/tjPw6/0ajIQKtoLb9 1//HAc+4+ci5JH6zYO9O0qXYxHBRitNmFJBuSHkFeuGNAVG00xGGWETqac4oDzFY nTHt6X+v29C+BfUIANmvXNc0uSbiv0/n4a5lHYsKDaDC+7Ld4aNPsGtdoe1cWkJ1 OdnCZWjm8ChHOT619F9J6PhDT8QdBBBoC9Cs75PDt5YSsoKzDCa4VfhFJkwdP/O3 8rnC5fySZ9atDqgxvNvg9epTUA/wBg1cHL2dQXBVsB8uX3jmW2gZ6qiQDimdF8Tr BEiBJ+6Q5pLoEyzqGdEe3zBg2M549GC/uWzrkSvJDmKjPiuZ7QmpC9k+skgXh+dH pb87zUQyaOqwcmiimgHkydezXHqU+cjIE/9d17sl0kzI3+kU8fWeV3iE5NxEnxuL jScvC2tvyIHvIK9+Sh1gF0Ce6tInK8pNsDTMeS12YGzJNVEfJxLqBy60DTeVv5kS ynZx0ehSLN45haQLpVdZjPE3wmeti9TVh58jbZs+sHhUaeprv1dSYQRFfmZwGKQs h/GixDaPm7yxWvaAJBdQ =+Xr1 -----END PGP SIGNATURE----- --Ns7jmDPpOpCD+GE/--