diff options
| author | Namjae Jeon <linkinjeon@kernel.org> | 2026-08-31 15:16:38 +0900 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-10-12 20:36:27 +0900 |
| commit | fc4f170aa1f10e080c131f0c0890090b50127dc0 (patch) | |
| tree | 3da7b68ad01be209bb9c4577a76871f57a36521c /tools/lib/python/kdoc/parse_data_structs.py | |
| parent | c85ccf99bf46666689182ff711e5759a9260b3b9 (diff) | |
| download | linux-next-fc4f170aa1f10e080c131f0c0890090b50127dc0.tar.gz linux-next-fc4f170aa1f10e080c131f0c0890090b50127dc0.zip | |
ntfs: add named stream ioctls support
NTFS supports multiple named $DATA attributes, commonly known as alternate
data streams. Add NTFS-specific ioctls to list, read, write, and remove
named streams through an opened base file or directory.
The UAPI provides separate commands for each operation.
- NTFS_IOC_STREAM_READ
- NTFS_IOC_STREAM_WRITE
- NTFS_IOC_STREAM_REMOVE
- NTFS_IOC_LIST_STREAMS
Read and write requests use struct ntfs_stream to specify the stream name,
byte offset, and transfer length. Writes create the stream if it does not
already exist. A write failure after creation may leave the new stream
visible. It is not rolled back because another caller may already have
opened it. Userspace can remove it with NTFS_IOC_STREAM_REMOVE.
The list command returns variable-length entries containing each named
stream's data size, allocated size, and name. If the buffer is too small,
the command returns -ENOSPC without copying entries. bytes_returned reports
the required buffer size, and stream_count reports the number of streams.
Stream names use the mounted filesystem NLS by default. Set
NTFS_STREAM_FL_UTF16 to pass or receive raw UTF-16LE names. In NLS mode,
names that cannot be represented by the mounted character set are omitted
from the list. Use UTF-16 mode for lossless enumeration. Read and write
transfers are limited to 16 MiB per request.
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/parse_data_structs.py')
0 files changed, 0 insertions, 0 deletions
