GNU bug report logs - #79267
cp --sparse=auto heuristic fails on a squashfs mounted drive.

Previous Next

Package: coreutils;

Reported by: Jeremy Allison <jallison <at> ciq.com>

Date: Tue, 19 Aug 2025 02:39:02 UTC

Severity: normal

Full log


Message #45 received at 79267 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Phillip Lougher <phillip <at> squashfs.org.uk>
Cc: jallison <at> ciq.com, 79267 <at> debbugs.gnu.org
Subject: Re: bug#79267: cp --sparse=auto heuristic fails on a squashfs mounted
 drive.
Date: Sat, 23 Aug 2025 12:01:01 -0700
On 2025-08-23 11:27, Phillip Lougher wrote:

> Yeah let's take the attitude everyone writes well written programs, and if they don't it's their fault when they unexpectedly break in production.   In reality a lot of code in embedded Linux systems is dreadful, written by inexperienced programmers.

Inexperienced programmers don't use SEEK_HOLE or SEEK_DATA.

Several commonly-used programs would benefit from proper support for 
SEEK_HOLE and SEEK_DATA. What programs would be hurt? If nobody knows of 
such programs, we should be skeptical of the argument that support would 
be dangerous. To be honest I can't think of why it would hurt in 
practical programs.


> Anyway, my email was pointing out that the SEEK_HOLE behaviour being 
> complained about is the default Linux VFS behaviour.  So this isn't 
> about Squashfs.

Yes it is. The default behavior is appropriate for simple file systems 
that lack extents. However, Squashfs is not such a file system. If 
Squashfs has extents but does not expose them to user code, user code 
can be waaaaaayy less efficient.

And this isn't merely an efficiency issue. It can be a security issue, 
as sparse files can be used for denial-of-service attacks. I assume 
efficiency and security are of concern to Squashfs users, which is why I 
press this point.




This bug report was last modified 17 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.