[Bug gold/26541] gold makes incorrect usage of fallocate in fallback path
https://sourceware.org/bugzilla/show_bug.cgi?id=26541 holger.berger at googlemail dot com changed: What|Removed |Added CC||holger.berger at googlemail dot co ||m --- Comment #1 from holger.berger at googlemail dot com --- I see the same thing, and it actually leads to failure of ld.gold on a certain version of lustre filesystem. ld.gold: fatal error: a.out: Unknown error 524 -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gold/26541] gold makes incorrect usage of fallocate in fallback path
https://sourceware.org/bugzilla/show_bug.cgi?id=26541 --- Comment #3 from holger.berger at googlemail dot com --- for me this patch works, but I think lustre should not leak it's internal error code to teh client side, so the lustre part should probably not be part of an official fix, and I think later versions of lustre fix that issue. diff --git a/gold/output.cc b/gold/output.cc index b7505ff..23a24ce 100644 --- a/gold/output.cc +++ b/gold/output.cc @@ -134,16 +134,17 @@ gold_fallocate(int o, off_t offset, off_t len) if (parameters->options().posix_fallocate()) { int err = ::posix_fallocate(o, offset, len); - if (err != EINVAL && err != ENOSYS && err != EOPNOTSUPP) + if (err != EINVAL && err != ENOSYS && err != EOPNOTSUPP && err != 524 /* LUSTRE_ENOTSUPP == 524 Operation is not supported */ ) return err; } #endif // defined(HAVE_POSIX_FALLOCATE) #ifdef HAVE_FALLOCATE { +errno = 0; int err = ::fallocate(o, 0, offset, len); -if (err != EINVAL && err != ENOSYS && err != EOPNOTSUPP) - return err; +if (err == -1 && (errno != EINVAL && errno != ENOSYS && errno != EOPNOTSUPP && errno != 524 /* LUSTRE_ENOTSUPP == 524 Operation is not supported */ )) + return errno; } #endif // defined(HAVE_FALLOCATE) -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gold/26541] gold makes incorrect usage of fallocate in fallback path
https://sourceware.org/bugzilla/show_bug.cgi?id=26541 --- Comment #6 from holger.berger at googlemail dot com --- correct... the proper patch would not contain the 524 thing, but some sort of patch is needed. Am Fr., 19. Feb. 2021 um 18:56 Uhr schrieb bugdal at aerifal dot cx < sourceware-bugzi...@sourceware.org>: > https://sourceware.org/bugzilla/show_bug.cgi?id=26541 > > --- Comment #5 from Rich Felker --- > Ah no, at least according to your patch the original gold bug seems to be > there > still too. > > -- > You are receiving this mail because: > You are on the CC list for the bug. -- You are receiving this mail because: You are on the CC list for the bug.