Re: [PATCH] omfs: reject writes starting beyond EOF

From: Matthew Wilcox

Date: Wed Nov 04 2026 - 09:38:44 EST


On Wed, Nov 04, 2026 at 11:20:52AM +0000, Hungyu Lin wrote:
> OMFS does not initialize gaps between EOF and a buffered write. When the
> requested block lies beyond the allocated extents, omfs_get_block() grows
> the last extent and maps the write to the newly allocated block without
> accounting for the skipped logical blocks.
>
> A one-byte pwrite() at offset 8192 into an empty file returns success, as
> does fsync(), but after remounting the byte is at offset 0 and offset 8192
> reads as zero.
>
> Reject writes starting beyond i_size before block_write_begin() can
> allocate or map buffers. Overwrites, appends and writes crossing EOF
> remain allowed. Gap initialization can be implemented separately.

Why don't we just delete omfs?

This is the proprietary file system used by the Rio Karma music
player and ReplayTV DVR

Rio Karma and ReplayTV were both EOL in 2005. Let's just delete this
filesystem.