Re: [PATCH v12] exfat: add EXFAT_IOC_COMBINE to append a file's clusters to another

From: Andy Lutomirski

Date: Sat Nov 28 2026 - 22:47:41 EST




> On Nov 27, 2026, at 10:35 AM, Shaopei Zhu <shaopei_1012@xxxxxxx> wrote:
>

>
> exFAT has a single size and valid_size per file, so clusters can only
> be appended at a cluster boundary of a fully initialized file. The
> destination is therefore first zero-filled up to the end of its last
> cluster with exfat_extend_valid_size(), leaving a zero-filled gap
> between the original and the appended data when its size is not
> cluster aligned. This keeps stale on-disk data out of the file and is
> documented in the uapi header.

This is weird behavior from an otherwise fairly reasonable API. How about rejecting a request that would require inserting zeros into the middle of the resulting file instead of automatically inserting zeros?

—Andy