| 26 Oct 2021 |
das_j | And alacritty was Darwin, that might also be caused by another commit | 21:48:04 |
Vladimír Čunát | If the commit can be reverted on release without conflicts (after stripping NEWS), it shouldn't be that hard to verify both. | 21:49:24 |
| moritz.hedtke joined the room. | 21:49:24 |
das_j | I can try on Darwin | 21:49:46 |
Vladimír Čunát | (without messing with coreutils dependencies) | 21:49:50 |
Vladimír Čunát | I can check peertube tomorrow on the same Linux system; seems easy if it applies. | 21:51:19 |
Vladimír Čunát | Oh and I see a "coretuils" typo in the e-mail :-) | 21:52:17 |
moritz.hedtke | Is there already a diff then I could also test peertube with that commit reverted. Considering that I could build with (likely just) another -frandom-seed I don't believe that's the issue but I could still verify. | 21:54:09 |
moritz.hedtke | I can also create it myself doesn't seem that hard | 21:54:32 |
moritz.hedtke | Ohh I think we can't really verify whether its the revert then or a compiler bug as this also changes the -frandom-seed | 22:01:57 |
das_j | oh oof, right | 22:02:20 |
moritz.hedtke | Is there a revert with fixed conflicts because I don't like the conflicts | 22:02:52 |
moritz.hedtke | * Is there a revert with fixed conflicts because I don't like the conflicts? | 22:02:56 |
das_j | I tried with interdiff and failed | 22:05:45 |
das_j | you could `substituteInPlace src/copy.c --replace SEEK_HOLE 0? | 22:06:21 |
das_j | * you could substituteInPlace src/copy.c --replace SEEK_HOLE 0 | 22:06:24 |
das_j | ah wait its ifdef | 22:06:40 |
das_j | --replace "ifdef SEEK_HOLE" "if 0" is probably safer | 22:06:57 |
Ryan Burns | maybe just #undef it at the top | 22:07:06 |
Ryan Burns | well after the relevant includes | 22:07:16 |
moritz.hedtke | to be more idiot safe I just removed the whole sections (so played compiler a bit) | 22:09:12 |
das_j | looking at the SEEK_DATA macro we can probably just build without it until this is fixed | 22:13:26 |
das_j | it also disables SEEK_DATA when it cannot find Python | 22:13:53 |
moritz.hedtke | what is SEEK_DATA in relation to SEEK_HOLE? | 22:14:25 |
das_j | Seeking file data and holes
Since version 3.1, Linux supports the following additional values
for whence:
SEEK_DATA
Adjust the file offset to the next location in the file
greater than or equal to offset containing data. If
offset points to data, then the file offset is set to
offset.
SEEK_HOLE
Adjust the file offset to the next hole in the file
greater than or equal to offset. If offset points into
the middle of a hole, then the file offset is set to
offset. If there is no hole past offset, then the file
offset is adjusted to the end of the file (i.e., there is
an implicit hole at the end of any file).
| 22:14:50 |
das_j | the entire functionality in cp seems to be governed by the SEEK_DATA macro? | 22:16:02 |
das_j | * the entire functionality in cp seems to be governed by the SEEK_HOLE macro | 22:16:12 |
moritz.hedtke | Thanks! was mostly irritated by the word "macro" but now I understand how that works | 22:16:16 |
das_j | This is probably what's needed to disable lseek:
diff --git a/src/copy.c b/src/copy.c
index cb9018f93..2a4ccc061 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -502,7 +502,7 @@ write_zeros (int fd, off_t n_bytes)
return true;
}
-#ifdef SEEK_HOLE
+#if 0
/* Perform an efficient extent copy, if possible. This avoids
the overhead of detecting holes in hole-introducing/preserving
copy, and thus makes copying sparse files much more efficient.
@@ -1095,7 +1095,7 @@ infer_scantype (int fd, struct stat const *sb,
&& ST_NBLOCKS (*sb) < sb->st_size / ST_NBLOCKSIZE))
return PLAIN_SCANTYPE;
-#ifdef SEEK_HOLE
+#if 0
scan_inference->ext_start = lseek (fd, 0, SEEK_DATA);
if (0 <= scan_inference->ext_start)
return LSEEK_SCANTYPE;
@@ -1377,7 +1377,7 @@ copy_reg (char const *src_name, char const *dst_name,
off_t n_read;
bool wrote_hole_at_eof = false;
if (! (
-#ifdef SEEK_HOLE
+#if 0
scantype == LSEEK_SCANTYPE
? lseek_copy (source_desc, dest_desc, buf, buf_size, hole_size,
scan_inference.ext_start, src_open_sb.st_size,
diff --git a/tests/seek-data-capable b/tests/seek-data-capable
index cc6372214..6e7a9ec1e 100644
--- a/tests/seek-data-capable
+++ b/tests/seek-data-capable
@@ -1,5 +1,7 @@
import sys, os, errno, platform
+sys.exit(1)
+
# Pass an _empty_ file
if len(sys.argv) != 2:
sys.exit(1)
| 22:27:45 |
das_j | I saved the mail draft and I'm going to open the bug report tomorrow at 12:00 (roughly, don't count on my timekeeping skills). The current version also mentions that the other two changes might not be related. If anyone can prove that one of the breakages I cannot reproduce is actually related to the same commit, I'll happily add it to the report :) Good night for now | 22:30:11 |