From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout08.t-online.de (mailout08.t-online.de [194.25.134.20]) by sourceware.org (Postfix) with ESMTPS id C33ED3858421 for ; Sat, 14 Jan 2023 16:38:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C33ED3858421 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=t-online.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=t-online.de Received: from fwd75.dcpf.telekom.de (fwd75.aul.t-online.de [10.223.144.101]) by mailout08.t-online.de (Postfix) with SMTP id 95BE4209D0 for ; Sat, 14 Jan 2023 17:38:48 +0100 (CET) Received: from [192.168.2.101] ([87.187.47.96]) by fwd75.t-online.de with (TLSv1.3:TLS_AES_256_GCM_SHA384 encrypted) esmtp id 1pGjYJ-1PUqqO0; Sat, 14 Jan 2023 17:38:43 +0100 Subject: Re: Question about slow access to file information To: cygwin References: <797a8935-e38b-0c0f-87d8-b8df1e9fd76f@cs.umass.edu> From: Christian Franke Message-ID: <0c9c111e-9e63-bf8c-8049-06fd23f66351@t-online.de> Date: Sat, 14 Jan 2023 17:38:42 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 SeaMonkey/2.53.14 MIME-Version: 1.0 In-Reply-To: <797a8935-e38b-0c0f-87d8-b8df1e9fd76f@cs.umass.edu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-TOI-MSGID: 9110605a-82b8-4747-82f3-bd21617221f7 X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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 List-Id: 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. -- Regards, Christian