LLVM/project f8ecd1f — clang/include/clang/Basic BuiltinsHexagon.td BuiltinsHexagonDep.td, llvm/test/CodeGen/ARM/GlobalISel arm-legalize-fp.mir

Merge branch 'main' into users/mrsidims/fix-amdgpu-narrow-i64-int-to-fp-cost-tests
DeltaFile
+5,423-1,527llvm/test/CodeGen/ARM/GlobalISel/arm-legalize-fp.mir
+2,147-0clang/include/clang/Basic/BuiltinsHexagonDep.td
+1-2,137clang/include/clang/Basic/BuiltinsHexagon.td
+16-1,151llvm/test/CodeGen/X86/masked_expandload_f16.ll
+16-1,055llvm/test/CodeGen/X86/masked_expandload_bf16.ll
+14-1,013llvm/test/CodeGen/X86/masked_compressstore_f16.ll
+7,617-6,8831,591 files not shown
+52,096-23,3271,597 files

LLVM/project 7887331 — llvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp, llvm/lib/Target/SystemZ SystemZISelLowering.h SystemZISelLowering.cpp

[SystemZ] Define isTypeDesirableForOp to use in DAGCombine (#239841)

SystemZ widens vector integer sources to the fp element width in its
combine and the generic narrowing undid it alternating forever on
<4 x i16> and masked <4 x i64> sources of <4 x double>.

Consult isTypeDesirableForOp before narrowing, passing the node rather
than the opcode so the target can see the fp result type next to the
candidate operand type. SystemZ rejects vector operands narrower than
the fp elements.

Fixes #239444
DeltaFile
+49-0llvm/test/CodeGen/SystemZ/vec-move-23.ll
+8-0llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
+4-2llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+1-0llvm/lib/Target/SystemZ/SystemZISelLowering.h
+62-24 files

LLVM/project 0036a24 — llvm/lib/Target/AMDGPU AMDGPUTargetTransformInfo.cpp, llvm/test/Analysis/CostModel/AMDGPU store.ll load.ll

[AMDGPU] Price misaligned flat and LDS accesses with the LDS misaligned bug

In WGP mode on subtargets with the LDS misaligned bug, a flat access is
split into pieces no wider than its alignment and no narrower than 4
bytes, and an LDS access aligned below 4 bytes uses 8-byte pieces as one
aligned to 4 does.
DeltaFile
+121-60llvm/test/Analysis/CostModel/AMDGPU/store.ll
+121-60llvm/test/Analysis/CostModel/AMDGPU/load.ll
+4-1llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+246-1213 files

LLVM/project 79f0cc8 — llvm/lib/Target/AMDGPU AMDGPU.h AMDGPUTargetTransformInfo.cpp, llvm/test/Analysis/CostModel/AMDGPU store.ll load.ll

[AMDGPU] Price buffer fat pointer memory operations

Price buffer fat pointer accesses as global accesses, except that an
aligned load is not widened and a vector of odd width elements is not
split element by element. Without relaxed buffer bounds checking, a
vector of elements that are a multiple of 32 bits wide is accessed in
pieces no wider than its alignment and no narrower than 4 bytes, and a
vector of other byte-sized or power of 2 wide elements in pieces of the
largest power of 2 bytes that divides the element size. The width comes
from buffer fat pointer lowering, which now exposes it. When the pointer
is a buffer resource plus a constant offset, the offset and a constant
number of records give the same bounds facts lowering uses to access it
in wider pieces.
DeltaFile
+38-35llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
+51-20llvm/test/Analysis/CostModel/AMDGPU/store.ll
+51-20llvm/test/Analysis/CostModel/AMDGPU/load.ll
+56-14llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+9-0llvm/lib/Target/AMDGPU/AMDGPU.h
+205-895 files

LLVM/project 46600c2 — llvm/lib/Target/AMDGPU AMDGPULowerBufferFatPointers.cpp AMDGPUTargetTransformInfo.cpp, llvm/test/Analysis/CostModel/AMDGPU store.ll load.ll

apply comments
DeltaFile
+354-0llvm/test/Analysis/CostModel/AMDGPU/buffer-fat-pointer-oob-mode.ll
+21-1llvm/test/Analysis/CostModel/AMDGPU/store.ll
+21-1llvm/test/Analysis/CostModel/AMDGPU/load.ll
+8-4llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+3-3llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
+407-95 files

LLVM/project 7937223 — llvm/test/Analysis/CostModel/AMDGPU store.ll load.ll

[NFC][AMDGPU] Precommit buffer fat pointer and gfx1010 memory cost tests
DeltaFile
+294-0llvm/test/Analysis/CostModel/AMDGPU/load.ll
+235-0llvm/test/Analysis/CostModel/AMDGPU/store.ll
+529-02 files

LLVM/project 5aa3b5e — llvm/lib/Target/AMDGPU AMDGPUInstCombineIntrinsic.cpp AMDGPUTargetTransformInfo.cpp, llvm/lib/Target/AMDGPU/Utils AMDGPUBaseInfo.h AMDGPUBaseInfo.cpp

[AMDGPU] Price constant address space memory operations (#238840)

Price constant address space accesses as global accesses, except for
loads selected to scalar loads of up to 64 bytes. These are loads from
the 32-bit constant address space, and loads from the constant address
space whose pointer is an argument passed in SGPRs or a constant, plus
constant offsets, both aligned to 4 bytes or to their size. A scalar
load is widened as its lowering does. An integer whose size is not a
multiple of 4 bytes is loaded as whole dwords, plus a byte load when its
size is 7 modulo 8, since the last byte of such a remainder is left out
of the scalar load. A type with no legal dword vector equivalent is
split into the largest power of 2 pieces that fit, and once the
remainder fits in the alignment it is widened to a power of 2 piece of
up to the alignment, at most 8 bytes for byte vectors. A 3-dword
remainder of a legal dword vector takes a fourth dword when aligned to 8
on a subtarget without scalar dwordx3 loads.

Assisted-By: Claude Code Opus 5
DeltaFile
+234-37llvm/test/Analysis/CostModel/AMDGPU/load.ll
+121-71llvm/test/Transforms/SLPVectorizer/AMDGPU/ordered-reduction-fma-fusion.ll
+60-4llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+5-22llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
+20-0llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+6-0llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
+446-1346 files

LLVM/project c662173 — llvm/tools/llvm-strings llvm-strings.cpp

[llvm-strings] Initialise UCh. (#240607)

Although mbrtoc32() will only return 1 if UCh has been written to, that
write comes from an uninstrumented libc and triggers an MSAN false
positive. Explicitly initialise UCh from the LLVM side to suppress this.
DeltaFile
+1-1llvm/tools/llvm-strings/llvm-strings.cpp
+1-11 files

LLVM/project 6e58f6f — llvm/lib/Transforms/Vectorize VPlanUtils.cpp, llvm/test/Transforms/LoopVectorize invariant-store-vectorization.ll runtime-checks-hoist.ll

[VPlan] Hoist invariant base of pointer adds in runtime checks. (#240542)

When expanding a variant pointer add for the runtime checks of an inner
loop in a loop nest, operands invariant in the outer loop were expanded
individually and added to the pointer inside the outer loop.

If the pointer itself is invariant in the outer loop, use the sum of all
invariant operands as ptradd base instead, so it is expanded in IR and
hoisted out of the outer loop whole. The sum of the variant operands is
expanded as offset, as for integer adds.
DeltaFile
+12-3llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+6-6llvm/test/Transforms/LoopVectorize/runtime-checks-hoist.ll
+3-3llvm/test/Transforms/LoopVectorize/invariant-store-vectorization.ll
+21-123 files

LLVM/project 80ffb71 — llvm/lib/Transforms/Scalar InferAddressSpaces.cpp, llvm/test/Transforms/InferAddressSpaces optnone-func-unchanged.ll

[InferAddressSpaces] Don't replace uses in other functions

`performPointerReplacement` visits every use of a value in the postorder
list. When the value is a constant expression, some of these uses can be
in other functions. It already skipped such uses, but only after
`replaceIfSimplePointerUse`, so when the pass ran on one function, it
could still rewrite a load, store, `atomicrmw`, or `cmpxchg` in another
function, even in an `optnone` function.

This PR skips a use in another function before any replacement, like
#70611 did for the other users of a constant.

This PR was assisted by AI but I reviewed all the changes.
DeltaFile
+16-0llvm/test/Transforms/InferAddressSpaces/optnone-func-unchanged.ll
+3-3llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp
+19-32 files

LLVM/project 8ff4628 — libc/test/src/math/smoke pow_test.cpp

Add comments for edge cases and hard-to-round cases in powf_test.
DeltaFile
+76-0libc/test/src/math/smoke/pow_test.cpp
+76-01 files

FreeBSD/src ad8f475 — sys/kern link_elf.c

link_elf: bounds-check the DT_HASH offset

parse_dynamic() builds the symbol hash table at ef->address + d_ptr
without checking that d_ptr lies within the mapped image, so a crafted
DT_HASH entry causes an out-of-bounds read of the hash header.  Reject
the object with ENOEXEC when the header does not fit in the image.

Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D61323
DeltaFile
+8-1sys/kern/link_elf.c
+8-11 files

FreeBSD/src 4b1963d — sys/kern link_elf_obj.c

link_elf_obj: validate section name offsets

A section name offset (sh_name) indexes the section name string table
without being checked against shstrcnt, and the result is passed to
strcmp(), so a corrupt object causes an out-of-bounds read.  Check that
the table is NUL-terminated and that every sh_name lies within it, in
both the preload and file paths, and reject the object with ENOEXEC.

Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D61338
DeltaFile
+27-0sys/kern/link_elf_obj.c
+27-01 files

FreeBSD/src 4e2c284 — sys/kern link_elf_obj.c

link_elf_obj: validate symbol name offsets

A symbol name offset (st_name) indexes the string table in several
places without being checked against ddbstrcnt, so a corrupt object
causes an out-of-bounds read.  Check that the string table is
NUL-terminated and that every st_name lies within it, in both the
preload and file paths, and reject the object with ENOEXEC.

Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D61322
DeltaFile
+25-0sys/kern/link_elf_obj.c
+25-01 files

FreeBSD/src f068327 — sys/kern link_elf_obj.c

link_elf_obj: bounds-check e_shstrndx in link_elf_load_file()

e_shstrndx is used to index the section header array after only being
checked against zero, so a malformed object can make the linker read up
to about 64K entries past the end of shdr[].  Reject such a file with
ENOEXEC, as link_elf_link_preload() already does.

Reported by:    llm-postcr
Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D61321
DeltaFile
+6-0sys/kern/link_elf_obj.c
+6-01 files

LLVM/project 00f4ec3 — mlir/lib/Dialect/XeGPU/Transforms XeGPULayoutImpl.cpp, mlir/test/Dialect/XeGPU propagate-layout-subgroup-invalid.mlir propagate-layout-subgroup.mlir

[mlir][XeGPU] Retry smaller inst_data when picking subgroup layouts (#239888)

Subgroup layout propagation always used the largest hardware block as
`inst_data`. When each subgroup's tile is smaller than that block, no
layout was found and propagation failed. For example, `64x16xf32` over
32 subgroups gives each subgroup `2x16`, which is smaller than the
`8x16` block.

This PR retries with smaller blocks until a subgroup layout fits:
- store_nd / prefetch_nd: try smaller block sizes.
- dpas / dpas_mx: try smaller M.

The largest block is still tried first, so existing results don't
change.

assisted-by-claude

---------

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+104-36mlir/lib/Dialect/XeGPU/Transforms/XeGPULayoutImpl.cpp
+44-0mlir/test/Dialect/XeGPU/propagate-layout-subgroup.mlir
+0-15mlir/test/Dialect/XeGPU/propagate-layout-subgroup-invalid.mlir
+148-513 files

LLVM/project 7636b8a — llvm/include/llvm/MC MCTargetOptions.h MCMachObjectWriter.h, llvm/lib/MC MCToolOptions.td MCAsmInfoDarwin.cpp

[MC][MachO] Add an option to relocate cross-section offsets in DWARF (#239793)

Mach-O objects store references from one DWARF section into another as
bare offsets rather than relocations. For comparison in ELF, DWARF
references are relocations against sections that start at address 0.

Because of this Mach-O DWARF sections cannot be concatenated by tools
such as ld -r. However, this would be useful for some niche use-cases
such as doing an incremental (ld -r) link and then creating a static
archive that is then distributed to another machine.

This patch adds MCTargetOptions::MachORelocatableDwarf and a
-macho-relocatable-dwarf flag, which sets
DwarfUsesRelocationsAcrossSections for Darwin targets. When it is set,
every __DWARF section is also assigned address 0, like in ELF.

Assisted-by: Claude
DeltaFile
+57-0llvm/test/MC/MachO/AArch64/relocatable-dwarf.s
+25-11llvm/lib/MC/MachObjectWriter.cpp
+3-4llvm/include/llvm/MC/MCMachObjectWriter.h
+2-1llvm/lib/MC/MCAsmInfoDarwin.cpp
+3-0llvm/include/llvm/MC/MCTargetOptions.h
+2-0llvm/lib/MC/MCToolOptions.td
+92-161 files not shown
+93-167 files

GhostBSD/ports fea7127 — sysutils/bsdisks Makefile, sysutils/bsdisks/files patch-objectmanager.cpp patch-block.h

Merge pull request #131 from ghostbsd/bsdisks-automount

sysutils/bsdisks: add HintAuto and TimeMediaDetected for automount
DeltaFile
+50-0sysutils/bsdisks/files/patch-drive.cpp
+20-0sysutils/bsdisks/files/patch-drive.h
+19-0sysutils/bsdisks/files/patch-block.cpp
+12-0sysutils/bsdisks/files/patch-objectmanager.cpp
+12-0sysutils/bsdisks/files/patch-block.h
+1-0sysutils/bsdisks/Makefile
+114-06 files

LLVM/project 8a4be9e — clang/lib/CIR/CodeGen CIRGenModule.cpp, clang/test/CIR/CodeGen named-module-available-externally-skip.cppm

[CIR] Address reviewer feedback

Assisted-by: Cursor / Claude Opus 5.5
DeltaFile
+0-112clang/test/CIR/CodeGen/named-module-available-externally-skip.cppm
+29-0clang/test/CodeGenCXX/module-funcs-from-imports.cppm
+15-6clang/lib/CIR/CodeGen/CIRGenModule.cpp
+44-1183 files

GhostBSD/ports 57f5cdc — sysutils/bsdisks/files patch-objectmanager.cpp patch-drive.h

sysutils/bsdisks: refresh TimeMediaDetected on media change

TimeMediaDetected was only set when the drive appeared, so a card
inserted into a card reader that was already plugged in, or a disc
inserted into an optical drive, got a stale time and gvfs would not
automount it. Update it on devd MEDIACHANGE and send
PropertiesChanged so gvfs picks up the new value.

Use read-only accessors for TimeDetected and TimeMediaDetected,
matching the other Drive properties.
DeltaFile
+34-3sysutils/bsdisks/files/patch-drive.cpp
+9-4sysutils/bsdisks/files/patch-drive.h
+12-0sysutils/bsdisks/files/patch-objectmanager.cpp
+55-73 files

LLVM/project c30bc0d — llvm/test/tools/llvm-strings negative-char.test locale.test

Revert "[test][llvm-strings] Use printf for interpreting octal of echo -e" (#240613)

Reverts llvm/llvm-project#240529

Apparently this breaks things for z/OS. Not that it's easy to tell given
there's no upstream CI for z/OS as far as I can tell.

Co-authored-by: Jackson Stogel <jtstogel at gmail.com>
DeltaFile
+8-8llvm/test/tools/llvm-strings/encoding.test
+3-3llvm/test/tools/llvm-strings/locale.test
+3-3llvm/test/tools/llvm-strings/length.test
+1-1llvm/test/tools/llvm-strings/negative-char.test
+15-154 files

LLVM/project 4f031f3 — llvm/test/tools/llvm-strings negative-char.test locale.test

Revert "[test][llvm-strings] Use printf for interpreting octal of echo -e (#2…"

This reverts commit 55122cbdf14dfd7e81f830f424f06c4ef7fb4c4d.
DeltaFile
+8-8llvm/test/tools/llvm-strings/encoding.test
+3-3llvm/test/tools/llvm-strings/locale.test
+3-3llvm/test/tools/llvm-strings/length.test
+1-1llvm/test/tools/llvm-strings/negative-char.test
+15-154 files

LLVM/project eb476fc — llvm/lib/Target/SystemZ SystemZISelLowering.h SystemZISelLowering.cpp, llvm/test/CodeGen/SystemZ atomicrmw-xchg-02.ll

SystemZ: Lower sub-word atomicrmw during type legalization (#238532)

Produce the ATOMIC_LOADW_* nodes when replacing the illegal i8/i16
results, instead of custom lowering the promoted node later. This
removes the no-op custom type legalization case.

Constants are now any-extended, so one test materializes an immediate
with llill instead of lhi.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+43-54llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
+2-2llvm/lib/Target/SystemZ/SystemZISelLowering.h
+1-1llvm/test/CodeGen/SystemZ/atomicrmw-xchg-02.ll
+46-573 files

FreeBSD/src 8686152 — sys/netpfil/ipfilter/netinet ip_nat.c

ipfilter: Remove erroneous ntohs()

The original commit was wrong.  ipf_nat_builddivertmp() builds the UDP
template with the length in host byte order

M_DUP() copies that value unchanged. The old code was therefore correct.
It added fin_plen in host order and then did a single htons().

The original patch was discussed with Co-Pilot, which pointed out the
original bug. claude-opus-5-5 discovered the ntohs() error that
co-pilot suggested.

Interestingly this code had been running here for a couple of months.

Reported by:    llm-postcr
Fixes:          72cc9e3766f4
DeltaFile
+0-1sys/netpfil/ipfilter/netinet/ip_nat.c
+0-11 files

LLVM/project 5286aa0 — llvm/lib/Transforms/Vectorize VPlanLowering.cpp VPlanTransforms.h, llvm/test/Transforms/LoopVectorize alias-mask-needs-freeze.ll alias-mask-interleave-groups.ll

[LV] Expand alias-mask pointer bounds after the SCEV checks. (#240556)

materializeAliasMask expanded the diff-check pointer bounds via
VPExpandSCEVRecipes in the entry block, before the SCEV checks. The
bounds come from LAA's SCEVs, which are computed under LAA's predicates
(e.g. versioned strides), so they are only valid if the predicates hold.

For example a bound could become%n /u (%y + 1) after versioning 
%stride == 1, which divides by zero for %y == -1 and %stride != 1, 
while the original loop is well defined.

Expand the bounds directly in the alias-mask check block using
VPSCEVExpander, which is dominated by the SCEV checks.
DeltaFile
+80-3llvm/test/Transforms/LoopVectorize/alias-mask.ll
+9-6llvm/lib/Transforms/Vectorize/VPlanLowering.cpp
+10-5llvm/lib/Transforms/Vectorize/VPlanTransforms.h
+4-4llvm/test/Transforms/LoopVectorize/alias-mask-interleave-groups.ll
+1-1llvm/test/Transforms/LoopVectorize/alias-mask-needs-freeze.ll
+1-1llvm/test/Transforms/LoopVectorize/AArch64/alias-mask.ll
+105-201 files not shown
+106-217 files

LLVM/project c7fcb57 — clang/include/clang/Basic DiagnosticGroups.td DiagnosticSemaKinds.td, clang/lib/Sema SemaStmt.cpp

[Clang][OBT] Diagnose overflow handlers in local class member functions

The overflow handler diagnostics skipped any body finished while another
function scope was active, so that a lambda is diagnosed with its
enclosing function. That also skipped member functions of local classes,
which the enclosing walk does not visit, so they were never diagnosed.
Skip only nested lambdas. A local class member function is a separate
function, so it can warn under -Woverflow-behavior-no-handler but never
under -Woverflow-behavior-unreachable-handler.

Also inline the three single-use diagnostic groups, and use %enum_select
for the lambda or block in -Woverflow-behavior-unreachable-handler.

Signed-off-by: Justin Stitt <justinstitt at google.com>
DeltaFile
+37-0clang/test/SemaCXX/overflow-behavior-handler-warnings.cpp
+26-0clang/test/CodeGenCXX/overflow-behavior-handler.cpp
+11-9clang/lib/Sema/SemaStmt.cpp
+7-5clang/include/clang/Basic/DiagnosticSemaKinds.td
+0-4clang/include/clang/Basic/DiagnosticGroups.td
+81-185 files

LLVM/project b8dc66b — libc/src/__support/fixed_point fx_bits.h

[libc][stdfix][NFC] Use cpp::numeric_limits<T>::digits in divifx (#239900)

Use `cpp::numeric_limits<T>::digits` in `divifx` to count value bits
instead of `sizeof(IntType) * 8 - cpp::is_signed_v<IntType>`.

Also compare `INTERMEDIATE_BITS` against
`cpp::numeric_limits<int64_t>::digits` (63) instead of `64` for signed
types, since `INTERMEDIATE_BITS` excludes the sign bit.

Follows
https://github.com/llvm/llvm-project/pull/235602#issuecomment-6417638445.
DeltaFile
+7-4libc/src/__support/fixed_point/fx_bits.h
+7-41 files

LLVM/project 7e5b09c — libc/shared/math log10p1bf16.h, libc/src/__support/math log10p1bf16.h

[libc][math][c++23] Add log10p1bf16 math function (#235343)

This PR adds the `log10p1bf16` math function to LLVM libc for the
`bfloat16` type. It computes `log10(1 + x)` and handles special cases
like NaN, infinity, zero, and the domain boundary at `x = -1`.

The implementation uses a polynomial approximation for small inputs and
range reduction with a lookup table for other inputs. Special cases are
handled to maintain the expected floating-point behavior, including
exception behavior.

Added unit tests for accuracy, special values, and exception handling,
along with smoke tests. Updated the relevant libc entrypoint lists,
CMake files, and Bazel build files to integrate the function into both
build systems.

Validated the implementation using the available CMake and Bazel build
and test targets.


    [4 lines not shown]
DeltaFile
+174-0libc/src/__support/math/log10p1bf16.h
+98-0libc/test/src/math/smoke/log10p1bf16_test.cpp
+45-0libc/test/src/math/log10p1bf16_test.cpp
+27-0libc/shared/math/log10p1bf16.h
+25-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+25-0libc/src/math/log10p1bf16.h
+394-026 files not shown
+501-132 files

OpenZFS/src 468ad6a — cmd/zdb zdb.c

zdb: borrow only the length read in the --anyraid-map dump

vdev_anyraid_read_map() reads each tile map chunk at its rounded
length, not as a full 16 MiB buffer, but print_anyraid_mapping()
borrows and returns SPA_MAXBLOCKSIZE bytes of each buffer.  Debug
builds abort on 'zdb --anyraid-map -vv' and higher: "VERIFY3U(
abd->abd_size, >=, n) failed (512 >= 16777216)" in abd_borrow_buf().
Borrow and return the size of each buffer.

Also free the two arrays that zdb_print_anyraid_tile_layout()
allocates for its separator lines, which valgrind reports as lost
with any --anyraid-map -v level.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Paul Dagnelie <paul.dagnelie at klarasystems.com>
Signed-off-by: Tigerblue77 <37409593+tigerblue77 at users.noreply.github.com>
Closes #19728
DeltaFile
+8-5cmd/zdb/zdb.c
+8-51 files

OpenZFS/src 1f3ad31 — module/zfs vdev_anyraid.c

anyraid: write the last tile's entries when a map chunk fills

vdev_anyraid_write_map_sync() issues each 16 MiB chunk of the tile map
as soon as an entry fills it, but when that entry belongs to the last
tile it stops and leaves the chunk to the final write.  If the entry
was the skip entry before that tile, or the location of one of its
copies but not the last, the remaining entries of the tile are never
written: once the vdev is opened again, the map has lost that tile or
some of its copies.

Stop only when the entry that filled the chunk is the last one, and
otherwise issue the chunk and go on.  Found from reading, as was the
read of a full last chunk: a chunk holds 4194304 entries, and this was
not reproduced.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Paul Dagnelie <paul.dagnelie at klarasystems.com>
Signed-off-by: Tigerblue77 <37409593+tigerblue77 at users.noreply.github.com>
Closes #19728
DeltaFile
+6-2module/zfs/vdev_anyraid.c
+6-21 files