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