Re: [PATCH] f2fs: reject immutable and append-only files in atomic replace
From: Hungyu Lin
Date: Fri Dec 04 2026 - 05:54:13 EST
On Fri, Nov 20, 2026 at 12:38 AM Hungyu Lin <dennylin0707@xxxxxxxxx> wrote:
> F2FS_IOC_START_ATOMIC_REPLACE truncates the file when the atomic write
> starts, and the commit drops the old blocks. It only checks that the
> file is open for writing and that the caller owns it. It does not look
> at the inode flags.
>
> An append-only file can be opened for writing with O_APPEND, so the
> owner of such a file can remove the data that is already there, which
> ftruncate() and open() with O_TRUNC do not allow.
Chao, gentle ping. Could you take a look?
Thanks,
Hungyu