delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/01/29/03:33:53

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 15CFD3858426
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1706517232;
bh=+XUC378HgARJkdXjGTujau407jyo5EO6I3YE965HHeo=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=gUHpOqzIg4cWjZWQ6uOHMfG3O7hAhPMqs4lYAI2qeAO24xzQPKT1hCksjRp6/KzuN
0YxucqU4kUqTZ6zZWwlIr9QpI7RyY6u4Myly3W4oHNrmksRjhA3H40wCj2qY/p8zKs
mJQg/9srD53T353gDe0EqHjOzh6VMAflNi1PYkNk=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9C4813858D20
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9C4813858D20
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706517141; cv=none;
b=FezVKeMSauQadSO2i7rrlFQiHpPhB+ZxLfxsFbVxtvx5nweSjzgnD+74YMmm8g6XiG27F91b43H/XtTozwa6XJCXWUsE1cMW2gELU+HBAt/6wqzc/WGGI1aaBvCmRoaoDZQZLl2opI1QOnCJiuxnimuI7VUbHrHVOAiVKdmTRfo=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1706517141; c=relaxed/simple;
bh=9TzPJBTwtVxctuUydaIeQsObNAGAKbu3zxU6bM+od94=;
h=Message-ID:Date:MIME-Version:Subject:To:From;
b=kvvaem7rWfUwKp7eMKUcQha/Ae95zCzxcgVa3BMIRnE3muFfg0lo3ceYAaXrlD/Cxp32Oei0p/UmyHD3G1WDqHFD6dXPDzkgwOQn10ePoCuqOHdkIRWX6bN2OaDWNWoHLShLWWXI12QaU67l7GKwPFWKDXenKvGQawVDj2dT0kA=
ARC-Authentication-Results: i=1; server2.sourceware.org
Message-ID: <d6134ced-53f6-46bb-9448-7b2f7efc636b@SystematicSW.ab.ca>
Date: Mon, 29 Jan 2024 01:32:13 -0700
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: /usr/bin/fallocate -v -d -l 2 myfile takes forever
To: cygwin AT cygwin DOT com
References: <CALXu0UeXUwCjY+WVwXA2X68XGEcm63SPPOPQtO-ZiDKFqXYW5w AT mail DOT gmail DOT com>
Organization: Systematic Software
In-Reply-To: <CALXu0UeXUwCjY+WVwXA2X68XGEcm63SPPOPQtO-ZiDKFqXYW5w@mail.gmail.com>
X-Rspamd-Queue-Id: A7D8B2002C
X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,
SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE,
UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6
X-Stat-Signature: dwmaok6i8kgt86u1a7gzxa35icge3sh7
X-Rspamd-Server: rspamout05
X-Session-Marker: 427269616E2E496E676C69734053797374656D6174696353572E61622E6361
X-Session-ID: U2FsdGVkX19YgMGi8d5q9Jmb2MIFA+SBZ1/A51sAg7w=
X-HE-Tag: 1706517134-449299
X-HE-Meta: U2FsdGVkX1/aRleDFItr9w7pTslhrkDVIbnkFqqeyXao4QPsQvS+zNbHQfy8DvbCwZfRIdGOU4zWzNC3PDEU/cXN8MFDxtd4urBd/kPC7zSHpyLudRs3GI8oFiTJyR07+2vnwQ/1ZE0udtEuN6MVtUGOc3y5yYGxYpsrT6tJFQewHXlw+WciTEzPpGZYu0OunrcHFUGTsvmzrrK+bJRZQz0YIL1Rue28vLfOdAzswJV3nYEz8u9pMypQj4xjxvZHGqbGPskw5uxmV8UFAu8t2JLKN2W1NUfsYHeJ2Ip+X19VBgmtCpBhc1sBtya25ZpLSgv4SNxFyMhQvOeJEzMB+afxH5ef/oKoz4asM/qWTFvVEn2Tn/0pHSaQNlmSelCZ
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 <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
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: Brian Inglis via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Brian Inglis <Brian DOT Inglis AT SystematicSW DOT ab DOT ca>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 40T8XqIP006127

On 2024-01-28 23:44, Cedric Blancher via Cygwin wrote:
> rm -f myfile
> touch myfile
> /usr/bin/fallocate -v -d -l myfile takes forever with latest Cygwin 3.5

It takes much longer without Cygwin 3.5!

Your fallocate(1) option -l has no length numeric argument and no -o offset 
numeric argument to specify the start of the range.

Takes no time on my system when used properly:

$ uname -srvmo
CYGWIN_NT-10.0-19045 3.5.0-0.613.g2c5433e5da82.x86_64 2024-01-24 15:14 UTC 
x86_64 Cygwin
$ smartctl -i /dev/sda
smartctl 7.4 2023-08-01 r5530 [x86_64-pc-cygwin-w10-22H2] (cygwin-7.4-1)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

Warning: Limited functionality due to missing admin rights
=== START OF INFORMATION SECTION ===
Model Family:     Seagate BarraCuda 3.5 (CMR)
Device Model:     ST1000DM010-2EP102
Serial Number:    W9AAWPXN
Firmware Version: CC43
Device is:        In smartctl database 7.3/5528
ATA Version is:   [No Information Found]
Local Time is:    Mon Jan 29 01:11:59 2024 MST
SMART support is: Available - device has SMART capability.
                   Enabled status cached by OS, trying SMART RETURN STATUS cmd.
SMART support is: Enabled

$ rm -f myfile; touch myfile; llgo myfile
removed 'myfile'
-rw-r--r-- 1 0 Jan 29 00:50 myfile
$ time fallocate -v -o 0 -l 64MiB myfile; llgo myfile

real    0m0.049s
user    0m0.000s
sys     0m0.015s
-rw-r--r-- 1 64M Jan 29 00:50 myfile
$ time fallocate -v -o 0 -l 64MiB -d myfile; llgo myfile
myfile: 64 MiB (67108864 bytes) converted to sparse holes.

real    0m0.146s
user    0m0.015s
sys     0m0.078s
-rw-r--r-- 1 64M Jan 29 00:50 myfile

Now perhaps the fallocate(1) design, option checking, diagnostics, defaults, and 
output, could use some work: using SI multipliers for data sizes (see ls --si!)

Perhaps show some useful commands and output that demonstrate your claim, 
including the actual test release used from `uname -srvmo` and provide some 
information about your drive (type, speed, size) and system, like output from 
`cygcheck -hrsv` attached as a text file?

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry


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