<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/usr, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-10-07T16:53:05+00:00</updated>
<entry>
<title>gen_init_cpio: Ignore fsync() returning EINVAL on pipes</title>
<updated>2025-10-07T16:53:05+00:00</updated>
<author>
<name>Dmitry Safonov</name>
<email>dima@arista.com</email>
</author>
<published>2025-10-07T03:46:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=38492c5743f8b7213ca86f0cd72ea625af35d5ef'/>
<id>urn:sha1:38492c5743f8b7213ca86f0cd72ea625af35d5ef</id>
<content type='text'>
The reproducer:
echo | ./usr/gen_init_cpio /dev/stdin &gt; /dev/null

fsync() on a pipe fd returns -EINVAL, which makes gen_init_cpio fail.
Ignore -EINVAL from fsync().

Fixes: ae18b94099b0 ("gen_init_cpio: support -o &lt;output_file&gt; parameter")
Cc: David Disseldorp &lt;ddiss@suse.de&gt;
Cc: Nicolas Schier &lt;nsc@kernel.org&gt;
Signed-off-by: Dmitry Safonov &lt;dima@arista.com&gt;
Reviewed-by: David Disseldorp &lt;ddiss@suse.de&gt;
Link: https://patch.msgid.link/20251007-gen_init_cpio-pipe-v2-1-b098ab94b58a@arista.com
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>kbuild: uapi: Strip comments before size type check</title>
<updated>2025-10-06T18:31:19+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2025-10-06T12:33:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=66128f4287b04aef4d4db9bf5035985ab51487d5'/>
<id>urn:sha1:66128f4287b04aef4d4db9bf5035985ab51487d5</id>
<content type='text'>
On m68k, check_sizetypes in headers_check reports:

    ./usr/include/asm/bootinfo-amiga.h:17: found __[us]{8,16,32,64} type without #include &lt;linux/types.h&gt;

This header file does not use any of the Linux-specific integer types,
but merely refers to them from comments, so this is a false positive.
As of commit c3a9d74ee413bdb3 ("kbuild: uapi: upgrade check_sizetypes()
warning to error"), this check was promoted to an error, breaking m68k
all{mod,yes}config builds.

Fix this by stripping simple comments before looking for Linux-specific
integer types.

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Reviewed-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Link: https://patch.msgid.link/949f096337e28d50510e970ae3ba3ec9c1342ec0.1759753998.git.geert@linux-m68k.org
[nathan: Adjust comment and remove unnecessary escaping from slashes in
         regex]
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>gen_init_cpio: add -a &lt;data_align&gt; as reflink optimization</title>
<updated>2025-08-20T23:02:56+00:00</updated>
<author>
<name>David Disseldorp</name>
<email>ddiss@suse.de</email>
</author>
<published>2025-08-19T03:05:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5467e85508fd106443311eb7973ef588b4ef8bb6'/>
<id>urn:sha1:5467e85508fd106443311eb7973ef588b4ef8bb6</id>
<content type='text'>
As described in buffer-format.rst, the existing initramfs.c extraction
logic works fine if the cpio filename field is padded out with trailing
zeros, with a caveat that the padded namesize can't exceed PATH_MAX.

Add filename zero-padding logic to gen_init_cpio, which can be triggered
via the new -a &lt;data_align&gt; parameter. Performance and storage
utilization is improved for Btrfs and XFS workloads, as copy_file_range
can reflink the entire source file into a filesystem block-size aligned
destination offset within the cpio archive.

Btrfs benchmarks run on 6.15.8-1-default (Tumbleweed) x86_64 host:
  &gt; truncate --size=2G /tmp/backing.img
  &gt; /sbin/mkfs.btrfs /tmp/backing.img
  ...
  Sector size:        4096        (CPU page size: 4096)
  ...
  &gt; sudo mount /tmp/backing.img mnt
  &gt; sudo chown $USER mnt
  &gt; cd mnt
  mnt&gt; dd if=/dev/urandom of=foo bs=1M count=20 &amp;&amp; cat foo &gt;/dev/null
  ...
  mnt&gt; echo "file /foo foo 0755 0 0" &gt; list
  mnt&gt; perf stat -r 10 gen_init_cpio -o unaligned_btrfs list
  ...
            0.023496 +- 0.000472 seconds time elapsed  ( +-  2.01% )

  mnt&gt; perf stat -r 10 gen_init_cpio -o aligned_btrfs -a 4096 list
  ...
           0.0010010 +- 0.0000565 seconds time elapsed  ( +-  5.65% )

  mnt&gt; /sbin/xfs_io -c "fiemap -v" unaligned_btrfs
  unaligned_btrfs:
   EXT: FILE-OFFSET      BLOCK-RANGE      TOTAL FLAGS
     0: [0..40967]:      695040..736007   40968   0x1
  mnt&gt; /sbin/xfs_io -c "fiemap -v" aligned_btrfs
  aligned_btrfs:
   EXT: FILE-OFFSET      BLOCK-RANGE      TOTAL FLAGS
     0: [0..7]:          26768..26775         8   0x0
     1: [8..40967]:      269056..310015   40960 0x2000
     2: [40968..40975]:  26776..26783         8   0x1
  mnt&gt; /sbin/btrfs fi du unaligned_btrfs aligned_btrfs
       Total   Exclusive  Set shared  Filename
    20.00MiB    20.00MiB       0.00B  unaligned_btrfs
    20.01MiB     8.00KiB    20.00MiB  aligned_btrfs

XFS benchmarks run on same host:
  &gt; sudo umount mnt &amp;&amp; rm /tmp/backing.img
  &gt; truncate --size=2G /tmp/backing.img
  &gt; /sbin/mkfs.xfs /tmp/backing.img
  ...
           =                       reflink=1    ...
  data     =                       bsize=4096   blocks=524288, imaxpct=25
  ...
  &gt; sudo mount /tmp/backing.img mnt
  &gt; sudo chown $USER mnt
  &gt; cd mnt
  mnt&gt; dd if=/dev/urandom of=foo bs=1M count=20 &amp;&amp; cat foo &gt;/dev/null
  ...
  mnt&gt; echo "file /foo foo 0755 0 0" &gt; list
  mnt&gt; perf stat -r 10 gen_init_cpio -o unaligned_xfs list
  ...
            0.011069 +- 0.000469 seconds time elapsed  ( +-  4.24% )

  mnt&gt; perf stat -r 10 gen_init_cpio -o aligned_xfs -a 4096 list
  ...
            0.001273 +- 0.000288 seconds time elapsed  ( +- 22.60% )

  mnt&gt; /sbin/xfs_io -c "fiemap -v" unaligned_xfs
   unaligned_xfs:
   EXT: FILE-OFFSET      BLOCK-RANGE      TOTAL FLAGS
     0: [0..40967]:      106176..147143   40968   0x0
     1: [40968..65023]:  147144..171199   24056 0x801
  mnt&gt; /sbin/xfs_io -c "fiemap -v" aligned_xfs
   aligned_xfs:
   EXT: FILE-OFFSET      BLOCK-RANGE      TOTAL FLAGS
     0: [0..7]:          120..127             8   0x0
     1: [8..40967]:      192..41151       40960 0x2000
     2: [40968..40975]:  236728..236735       8   0x0
     3: [40976..106495]: 236736..302255   65520 0x801

The alignment is best-effort; a stderr message is printed if alignment
can't be achieved due to PATH_MAX overrun, with fallback to non-padded
filename. This allows it to still be useful for opportunistic alignment,
e.g. on aarch64 Btrfs with 64K block-size. Alignment failure messages
provide an indicator that reordering of the cpio-manifest may be
beneficial.

Archive read performance for reflinked initramfs images may suffer due
to the effects of fragmentation, particularly on spinning disks. To
mitigate excessive fragmentation, files with lengths less than
data_align aren't padded.

Signed-off-by: David Disseldorp &lt;ddiss@suse.de&gt;
Reviewed-by: Nicolas Schier &lt;nsc@kernel.org&gt;
Link: https://lore.kernel.org/r/20250819032607.28727-8-ddiss@suse.de
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>gen_initramfs.sh: use gen_init_cpio -o parameter</title>
<updated>2025-08-20T23:02:56+00:00</updated>
<author>
<name>David Disseldorp</name>
<email>ddiss@suse.de</email>
</author>
<published>2025-08-19T03:05:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9135564db4904e82a3207bd2d134ca64ce618047'/>
<id>urn:sha1:9135564db4904e82a3207bd2d134ca64ce618047</id>
<content type='text'>
gen_init_cpio can now write to a file directly, so use it when
gen_initramfs.sh is called with -o (e.g. usr/Makefile invocation).

Signed-off-by: David Disseldorp &lt;ddiss@suse.de&gt;
Reviewed-by: Nicolas Schier &lt;nsc@kernel.org&gt;
Link: https://lore.kernel.org/r/20250819032607.28727-6-ddiss@suse.de
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>gen_init_cpio: avoid duplicate strlen calls</title>
<updated>2025-08-20T23:02:56+00:00</updated>
<author>
<name>David Disseldorp</name>
<email>ddiss@suse.de</email>
</author>
<published>2025-08-19T03:05:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=348ff9e3c1cf1a4124be1c94937dfc131bf6be29'/>
<id>urn:sha1:348ff9e3c1cf1a4124be1c94937dfc131bf6be29</id>
<content type='text'>
We determine the filename length for the cpio header, so shouldn't
recalculate it when writing out the filename.

Signed-off-by: David Disseldorp &lt;ddiss@suse.de&gt;
Reviewed-by: Nicolas Schier &lt;nsc@kernel.org&gt;
Link: https://lore.kernel.org/r/20250819032607.28727-5-ddiss@suse.de
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>gen_init_cpio: attempt copy_file_range for file data</title>
<updated>2025-08-20T23:02:55+00:00</updated>
<author>
<name>David Disseldorp</name>
<email>ddiss@suse.de</email>
</author>
<published>2025-08-19T03:05:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=97169cd6d95b338f2dbf5d3154b7d2233fce7d8a'/>
<id>urn:sha1:97169cd6d95b338f2dbf5d3154b7d2233fce7d8a</id>
<content type='text'>
The copy_file_range syscall can improve copy performance by cloning
extents between cpio archive source and destination files.
Existing read / write based copy logic is retained for fallback in case
the copy_file_range syscall is unsupported or unavailable due to
cross-filesystem EXDEV, etc.

Clone or reflink, as opposed to copy, of source file extents into the
output cpio archive may (e.g. on Btrfs and XFS) require alignment of the
output to the filesystem block size. This could be achieved by inserting
padding entries into the cpio archive manifest.

Signed-off-by: David Disseldorp &lt;ddiss@suse.de&gt;
Reviewed-by: Nicolas Schier &lt;nsc@kernel.org&gt;
Link: https://lore.kernel.org/r/20250819032607.28727-4-ddiss@suse.de
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>gen_init_cpio: support -o &lt;output_file&gt; parameter</title>
<updated>2025-08-20T23:02:55+00:00</updated>
<author>
<name>David Disseldorp</name>
<email>ddiss@suse.de</email>
</author>
<published>2025-08-19T03:05:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ae18b94099b04264b32e33b057114024bc72c993'/>
<id>urn:sha1:ae18b94099b04264b32e33b057114024bc72c993</id>
<content type='text'>
This is another preparatory change to allow for reflink-optimized
cpio archives with file data written / cloned via copy_file_range().
The output file is truncated prior to write, so that it maps to
usr/gen_initramfs.sh usage. It may make sense to offer an append option
in future, for easier archive concatenation.

Signed-off-by: David Disseldorp &lt;ddiss@suse.de&gt;
Reviewed-by: Nicolas Schier &lt;nsc@kernel.org&gt;
Link: https://lore.kernel.org/r/20250819032607.28727-3-ddiss@suse.de
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>gen_init_cpio: write to fd instead of stdout stream</title>
<updated>2025-08-20T23:02:55+00:00</updated>
<author>
<name>David Disseldorp</name>
<email>ddiss@suse.de</email>
</author>
<published>2025-08-19T03:05:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1400227773201918f270dda48f20afcd613d9bc3'/>
<id>urn:sha1:1400227773201918f270dda48f20afcd613d9bc3</id>
<content type='text'>
In preparation for more efficient archiving using copy_file_range(),
switch from writing archive data to stdout to using STDOUT_FILENO and
I/O via write(), dprintf(), etc.
Basic I/O error handling is added to cover cases such as ENOSPC. Partial
writes are treated as errors.

Signed-off-by: David Disseldorp &lt;ddiss@suse.de&gt;
Reviewed-by: Nicolas Schier &lt;nsc@kernel.org&gt;
Link: https://lore.kernel.org/r/20250819032607.28727-2-ddiss@suse.de
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>kbuild: uapi: upgrade check_declarations() warning to error</title>
<updated>2025-08-13T21:00:35+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2025-08-13T06:17:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b8d762c9830538c743066cbfb1f8c8a40f8e9d58'/>
<id>urn:sha1:b8d762c9830538c743066cbfb1f8c8a40f8e9d58</id>
<content type='text'>
No problematic declarations exist anymore.

Make sure it stays this way.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Reviewed-by: Nicolas Schier &lt;nsc@kernel.org&gt;
Link: https://lore.kernel.org/r/20250813-kbuild-hdrtest-fixes-v2-5-8a7921ca3a03@linutronix.de
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
<entry>
<title>kbuild: uapi: upgrade check_sizetypes() warning to error</title>
<updated>2025-08-13T21:00:34+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2025-08-13T06:16:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c3a9d74ee413bdb3007b39e62418f9757a0642e6'/>
<id>urn:sha1:c3a9d74ee413bdb3007b39e62418f9757a0642e6</id>
<content type='text'>
No problematic type usages exist anymore.

Make sure it stays this way.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Reviewed-by: Nicolas Schier &lt;nsc@kernel.org&gt;
Link: https://lore.kernel.org/r/20250813-kbuild-hdrtest-fixes-v2-4-8a7921ca3a03@linutronix.de
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
</content>
</entry>
</feed>
