X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EE3F938582AC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1702901129; bh=3xx7XaMAUkOo4FTNvQgIuRmaq4/CCknIQWmiU0iyIGc=; 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=KHYFYM89Vo0gdYkgfnONEdyp0oiTrT1McIdBNFLv9h+22EdFflRCceJnz8Agi7nbz OBM/YKlDB0hgvQTQ377NN+QDrX8dePK/I+r9Dk/8uaylN17D/aq6SgJCSyvfX9qLEf O7dleKHYOylRcQfAILZA/MAWZF6V2axM4PCJeH/M= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A08CE385828F ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A08CE385828F ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702901115; cv=none; b=kLubxRsWL372TxzUIyVmzZXjA98DkYr6uYpeUEX3TacTzG8wq01t3aTlNn6EfqGE6SeD6x3eEiwFmkKcCRIzDVQWIY9y1I10zqaz4LXVOwQEZI+G654IE9o2cXvZpnUe99Ca+lhZeuzY+9DyGYoTPp6rcz5frZzSHqy9V1I48gM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702901115; c=relaxed/simple; bh=BNKAwU8Uk4NKUBpoMZs6gkGClXutwkpb3pV8EKENy10=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=t0gGCq2Easq1dhapdoRcz2VgY9vxOxtw7fvCQfMDvl3lvA76DLEe6X0DPcjLaUWYB/CNVXo+DToSQPsIan1Az/rBJmez1GZAzKWasxUCZaEimq49deBlPW6I+1Gro5vd7By+kX9Ey62QJ1c0IUgTixqSL3MnvcwlX6cagRk4P4I= ARC-Authentication-Results: i=1; server2.sourceware.org X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702901105; x=1703505905; h=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=DRd/GZqW+uZRV6fufAYvvHgccLBr/GaCjvUi/PPIHvY=; b=HHxeKoPXZWB97avh0IHIw8KTj5RWwSGz/jQCpG2z5K1PBMl2yxmEOfU9RKVwn3jV2l F2sZ+mt5bMxXMq2iAZ4jFI0s9wPL5mih/ArzRMQAhHgyppK6sZ16H7P5vrQleAy3fx4R Ow7LSgKlUF+xzkCXsyOHQJXsiDqI9kroX20hFGCKOyYpeDo2IWQlDqfjbspmiDm/B3a3 PZ9tw8JE3w2a3bu34PA86W+wKIblBe0JVvLwD6geQcP6QkhYRK2RwMbCByGusw1aRzJi 4YQ7bOvE4B3jSKt3IAUINEvuVZHY+z5vbnOv3sMnRpM2VfkBp2cdzV6aN8F1ff10iFtW Qrcg== X-Gm-Message-State: AOJu0Yxfr2OPB52EF83yr2DwnN4Ag0DJowvcmUeYPj91P8k8EobDjYyJ 8JRzJbt99V88G7ajgnXUyDB+LxvfyCcjgOopIUDGoh7rvWE= X-Google-Smtp-Source: AGHT+IFTRka0l7psQPGeeIYfpB1qqSzFRuQmlLoTRaCUK1ShPplNU2HcqQ35OBe5dt57H3S5J1SADuUd1M9rpcdkomo= X-Received: by 2002:a50:9b5d:0:b0:553:6c38:148a with SMTP id a29-20020a509b5d000000b005536c38148amr408711edj.39.1702901104789; Mon, 18 Dec 2023 04:05:04 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 18 Dec 2023 13:04:00 +0100 Message-ID: Subject: Re: Cygwin generates syscalls for *.lnk files on filesystems with native symlink support? To: cygwin AT cygwin DOT com X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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 AT cygwin DOT com X-Mailman-Version: 2.1.30 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Cedric Blancher via Cygwin Reply-To: Cedric Blancher Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" On Fri, 1 Sept 2023 at 13:00, Corinna Vinschen via Cygwin wrote: > > On Sep 1 06:23, Cedric Blancher via Cygwin wrote: > > Good morning! > > > > During a Cygwin 3.4.8-1.x86_64 debugging session I noticed something > > odd when I looked at the network traffic generated by one of our > > cluster nodes: > > It seems that for each call to a tool (i.e. starting "sed" from > > "bash") Cygwin searches for *.lnk files. > > > > Is this correct even when the filesystem in question has native > > symlink support (e.g. NFS)? > > Yes. During file handling, Cygwin doesn't know what filesystem a > file is on until it could actually open the file and request file > and filesystem info from the open handle. Why? If you have the path name you could lookup the (cached) mount points, and determine the filesystem type. Same solution applies for UNC paths, where you can easily lookup the filesystem type, and cache it per-process or in Cygserver. > So if Cygwin couldn't open > "foo" because the NtCreateFile call returned with status > STATUS_OBJECT_PATH_NOT_FOUND or STATUS_OBJECT_NAME_NOT_FOUND, or > STATUS_NO_SUCH_FILE, or one of the countless other status codes the > kernel (or the driver) might return in case a file doesn't exist, > it will tack on .lnk and .exe and, for historical reasons, .exe.lnk, > and try again. Can this machinery please be turned off via CYGWIN env var option? As discussed in https://www.mail-archive.com/cygwin AT cygwin DOT com/msg174547.html this machinery causes very bad filesystem lookup performance, and it would IMO a good idea to have an option to turn this off, and just allow and expect native links (for NTFS, ReFS and NFS). Maybe CYGWIN env var option winsymlinks_expect:native? winsymlinks_expect takes a : seperated list which symlink types are to be expected. Ced -- Cedric Blancher [https://plus.google.com/u/0/+CedricBlancher/] Institute Pasteur -- 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