bug#79267: cp --sparse=auto heuristic fails on a squashfs mounted drive.
Paul Eggert <[email protected]>
| Newsgroups | gmane.comp.gnu.core-utils.bugs |
|---|---|
| Organization | UCLA Computer Science Department |
| Message-ID | <[email protected]> |
On 2025-11-03 10:04, Phillip Lougher wrote: > I implemented it in September, and it is in the upstream kernel Thanks for letting us know. I installed the attached commentary fix to coreutils and am closing this coreutils bug report.
0001-doc-squashfs-issue-to-be-squashed-in-Linux-6.18.patch
(text/x-patch, 1.8 KB)
From c9425336f4fcaa11b9113a6cedce5a6609b726db Mon Sep 17 00:00:00 2001 From: Paul Eggert <[email protected]> Date: Mon, 3 Nov 2025 11:33:38 -0800 Subject: [PATCH] doc: squashfs issue to be squashed in Linux 6.18 --- NEWS | 5 +++-- src/copy-file-data.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 2802c0c7b..fa14e7a2c 100644 --- a/NEWS +++ b/NEWS @@ -51,8 +51,9 @@ GNU coreutils NEWS -*- outline -*- ** Changes in behavior 'cp' with default options may again, like with versions before v9.8, - miss opportunities to create holes with file systems like squashfs, - that support SEEK_HOLE only trivially. + miss opportunities to create holes with file systems that support + SEEK_HOLE only trivially. This change is a consequence of the + abovementioned copy offload fix. 'sort --compress-program' will continue without compressing temporary files if the specified program cannot be executed. Also malformed shell scripts diff --git a/src/copy-file-data.c b/src/copy-file-data.c index c46b7edc5..125cf7856 100644 --- a/src/copy-file-data.c +++ b/src/copy-file-data.c @@ -480,8 +480,9 @@ infer_scantype (int fd, struct stat const *sb, off_t pos, return LSEEK_SCANTYPE; /* Though the file may have holes, SEEK_DATA and SEEK_HOLE - didn't find any. This can happen with file systems like - circa-2025 squashfs that support SEEK_HOLE only trivially. + didn't find any. This can happen with file systems + that support SEEK_HOLE only trivially, + such as squashfs in Linux kernel 6.17 and earlier. This can also happen due to transparent file compression, which can also indicate fewer than the usual number of blocks. */ -- 2.51.0