diff options
| author | Namjae Jeon <linkinjeon@kernel.org> | 2026-05-23 07:59:28 +0300 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-06-15 14:00:44 +0300 |
| commit | b4b7fe2c7cbf519ab5e7edc6625c71608805fb1d (patch) | |
| tree | 5e4e42c9cebcadd261264a141532ece8e8451068 /include/linux/platform_data | |
| parent | 867b9c96dc837e09ef125a79dc151fa2fc7a5d32 (diff) | |
| download | linux-b4b7fe2c7cbf519ab5e7edc6625c71608805fb1d.tar.xz | |
exfat: add support for SEEK_HOLE and SEEK_DATA in llseek
Adds exfat_file_llseek() that implements these whence values via
the iomap layer (iomap_seek_hole() and iomap_seek_data()) using the
existing exfat_read_iomap_ops.
Unlike many other modern filesystems, exFAT does not support sparse files
with unallocated clusters (holes). In exFAT, clusters are always fully
allocated once they are written or preallocated. In addition, exFAT
maintains a separate "Valid Data Length" (valid_size) that is distinct
from the logical file size. This affects how holes are reported during
seeking. In exfat_iomap_begin(), ranges where the offset is greater
than or equal to ei->valid_size are mapped as IOMAP_UNWRITTEN, while ranges
below valid_size are mapped as IOMAP_MAPPED. This mapping behavior is used
by the iomap seek functions to correctly report SEEK_HOLE and SEEK_DATA
positions.
- Ranges with offset >= ei->valid_size are mapped as IOMAP_HOLE.
- Ranges with offset < ei->valid_size are mapped as IOMAP_MAPPED.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Christoph Hellwig <hch@lst.de>
Acked-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'include/linux/platform_data')
0 files changed, 0 insertions, 0 deletions
