www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2026/02/05/08:58:56

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 615DwtbK1260675
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 615DwtbK1260675
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=AMKpkvoS
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1D4DE4BA543C
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1770299934;
bh=V7OX5uEUEFOKcx2I5ytrjo3UrDSb0BtZACJfolCDNB8=;
h=Subject:Date:References:In-Reply-To:To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=AMKpkvoSAROGY6Vxt3nkLhGxZmIFPXTHdAAzsru1c8sls6uNHhQJclDcmrn4nUaDL
9+V8CUGe1dbEg0aG4M66Gt6NyYHikLZq1S/3CXP2s8DHfZw46+KgtikeaMWeh+cnwQ
12C5IlQ158m2M0rf+kPaWvKdoC+rK+wwZ3btD2dQ=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 01E5F4BA543C
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 01E5F4BA543C
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770299913; cv=none;
b=MjLtS6kzDFUK+S9J1X7JNv/YCJ5nBuUCK0nhSeIgkv+0iUiPgi3Y8M2jwx03DBgVwTyoCscxErUMDiS/k60+KBu/kdTWbKgWE0LpWTqrQ/UCQOY6KkYegm/Oni+xinEBnvCO9sQCzYjq3TNHaEmd9sOQr5ddsGZp1veYW1NsGtU=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1770299913; c=relaxed/simple;
bh=RtHVS8pS+QHb+OuS58vG80q/eGLX1cBO+0H4ZFVL7vk=;
h=DKIM-Signature:From:Mime-Version:Subject:Date:Message-Id:To;
b=eRtuT5D7EkS5yEtCNEWauBbHn8TPmGcoW2RIRnDjm7WZF3TM1sK+a17y72s083EJ/TaPiCb+TLWXC7XCRCzWL1dTbQm3d6gO7EvYp3wiyKwM8AZiEK1UORjpZ3oq4ZQkWzuWF1fzgVlliqgPJ8kqM3oH+nfmxdokP6hmy3iOkM8=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 01E5F4BA543C
Mime-Version: 1.0 (1.0)
Subject: Re: Why does Cygwin always use absolute paths instead of
OBJECT_ATTRIBUTES.RootDirectory?
Date: Thu, 5 Feb 2026 14:58:14 +0100
Message-Id: <6111144D-3C70-400E-9E3B-2C2435399D17@anduin.net>
References: <CAAvCNcC0z2pOi92UezFxR-_o53P7dq2fNt+9js6WQAbqwWZTAQ AT mail DOT gmail DOT com>
In-Reply-To: <CAAvCNcC0z2pOi92UezFxR-_o53P7dq2fNt+9js6WQAbqwWZTAQ@mail.gmail.com>
To: cygwin AT cygwin DOT com
X-Mailer: iPhone Mail (22G90)
X-SA-Authenticated: Yes
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
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: "Knut St. Osmundsen via Cygwin" <cygwin AT cygwin DOT com>
Reply-To: "Knut St. Osmundsen" <bird-yasm2 AT anduin DOT net>
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 615DwtbK1260675

Experiments 10-20 years back in a different project, suggested there wasn’t any real performance gain with NTFS volumes when setting the RootDirectory handle. If I recall correctly, I think NTFS at the time would be reconstructing the volume-relative path and do the regular opening on it.  Things may have changed since then, though. I would’ve be quite curious to know how current windows performs

Anyway, it conceptually makes perfect sense to use the RootDirectory option when possible. I think we did so in the aforementioned project despite the lack of performance gains.

Cheers,
 Knut.

> On 4. Feb 2026, at 22:18, Dan Shelton via Cygwin <cygwin AT cygwin DOT com> wrote:
> 
> Hello,
> 
> Why does Cygwin always use absolute paths instead of
> OBJECT_ATTRIBUTES.RootDirectory in NtOpenFile(),
> NtSetInformationFile() for rename and hardlinks
> 
> This slows down Cygwin path lookups a lot, and with lots of path
> elements each lookup with a relative RootDirectory might be a lot
> faster, e.g. for openat(), linkat(), renameat().
> 
> Dan
> --
> Dan Shelton - Cluster Specialist Win/Lin/Bsd
> 
> --
> 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
> 


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