X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CB2933858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1673744743; bh=CxgzFe4vJ9xqoGQkmz8sk5A4cqdXGJGNPG17WxCukhU=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=nAgHIFT19Hj0NFeNj7OHmpDV4LQryUxl8u1SPsXZ33HIUWrOYNYu/PufdCIFes0KP suR+n+COmyGlCeJClnIDi7Imk/bGhB/xM7f+ev9YzpsfFLRv0/lMnlrdLdwJu9brBW qoA0pl0VCnToWzslirihNELJedsaSEKfEFt2NRRM= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B6ED43858D1E Message-ID: Date: Sun, 15 Jan 2023 12:05:10 +1100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: Question about slow access to file information Content-Language: en-US To: cygwin References: <797a8935-e38b-0c0f-87d8-b8df1e9fd76f AT cs DOT umass DOT edu> <0c9c111e-9e63-bf8c-8049-06fd23f66351 AT t-online DOT de> In-Reply-To: <0c9c111e-9e63-bf8c-8049-06fd23f66351@t-online.de> X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no 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.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Eliot Moss via Cygwin Reply-To: moss AT cs DOT umass DOT edu Content-Type: text/plain; charset="utf-8"; Format="flowed" Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 30F16AD8026032 On 1/15/2023 3:38 AM, Christian Franke via Cygwin wrote: > Eliot Moss via Cygwin wrote: >> I have a separate drive mounted this way: >> >> d:/ /cygdrive/d ntfs binary,posix=0,user,noacl,auto 0 0 >> >> One thing I use it for is to store backup files.  These tend to be 2 Gb >> chunks, and there can be hundreds of them in the backup directory. (The drive >> is 5Tb.)  The Windows Disk Management tool describes it as NTFS, Basic Data >> Partition. >> >> Doing ls (for example) takes a very perceptible numbers of seconds (though >> whatever takes a long time seems to be cached, at least for a while, since a >> second ls soon after is fast). > > The problem is the 'noacl' mount option and the fact that POSIX only offers the *stat*() functions > to retrieve file information. These functions always need to provide the full file information, even > if only a small subset is needed. > > To determine the 'x'-permission bits in the 'stat.st_mode' field on a 'noacl'-mount, Cygwin reads > the first bytes of most files (all except *.exe, *.lnk, *.com). The 'x' bits are set if the file > starts with "#!" (script), ":\n" (?) or "MZ" (Windows executable). > > On 'noacl' mounts, this behavior could be suppressed by 'exec' or 'noexec' mount options. Interesting. I removed the noacl from /etc/fstab and restarted all Cygwin processes. The mount program now shows that drive without noacl. It still takes surprisingly long to ls if I have not done so recently. The directory contains ~1200 files. Further thoughts? EM -- 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