ksmbd: persist FSCTL_SET_SPARSE state

Advertise FILE_SUPPORTS_SPARSE_FILES so clients can use FSCTL_SET_SPARSE.
Do not mark regular files sparse just because sparse support is advertised;
FILE_ATTRIBUTE_SPARSE_FILE should reflect the state set by
FSCTL_SET_SPARSE.

Persist the sparse attribute in the DOS attribute xattr regardless of
the store dos attributes setting.  Restore the sparse and compressed bits
from that xattr when only those emulated attributes need to be preserved.

Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
This commit is contained in:
Namjae Jeon 2026-07-08 22:12:20 +09:00
commit 159e727f76