]> git.ipfire.org Git - thirdparty/systemd.git/commit
shared/copy: simplify argument convention for reflink_range 43034/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Wed, 15 Jul 2026 10:59:45 +0000 (12:59 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Wed, 15 Jul 2026 11:54:40 +0000 (13:54 +0200)
commit8437a7605ad12797722ebe6bd2c8cb0fed1d096d
treec3e564ab34d2f398060ddda49cf02081eb515d36
parent5efd4688a9b0541ab0453c415d72ee5c1accec83
shared/copy: simplify argument convention for reflink_range

reflink_range() would treat size==UINT64_MAX as "copy everything", but
only if the offsets were 0. There are only two callers: one always passes
a fixed size, the other translated size==UINT64_MAX to 0. Make things
more uniform by always treating size==UINT64_MAX the same as size==0.
src/shared/copy.c
src/shared/copy.h