Skip to content

Commit 2b04e06

Browse files
committed
fs: port ntfs3 from kernel 5.19 to 5.10
1 parent 915d581 commit 2b04e06

31 files changed

+30763
-2
lines changed

package/kernel/linux/modules/fs.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ $(eval $(call KernelPackage,fs-ntfs))
530530
define KernelPackage/fs-ntfs3
531531
SUBMENU:=$(FS_MENU)
532532
TITLE:=NTFS3 Read-Write file system support
533-
DEPENDS:=@(LINUX_5_4||LINUX_5_15||LINUX_5_19) +kmod-nls-base
533+
DEPENDS:=@(LINUX_5_4||LINUX_5_10||LINUX_5_15||LINUX_5_19) +kmod-nls-base
534534
KCONFIG:= \
535535
CONFIG_NTFS3_FS \
536536
CONFIG_NTFS3_64BIT_CLUSTER=y \
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
config NTFS3_FS
3+
tristate "NTFS Read-Write file system support"
4+
select NLS
5+
help
6+
Windows OS native file system (NTFS) support up to NTFS version 3.1.
7+
8+
Y or M enables the NTFS3 driver with full features enabled (read,
9+
write, journal replaying, sparse/compressed files support).
10+
File system type to use on mount is "ntfs3". Module name (M option)
11+
is also "ntfs3".
12+
13+
Documentation: <file:Documentation/filesystems/ntfs3.rst>
14+
15+
config NTFS3_64BIT_CLUSTER
16+
bool "64 bits per NTFS clusters"
17+
depends on NTFS3_FS && 64BIT
18+
help
19+
Windows implementation of ntfs.sys uses 32 bits per clusters.
20+
If activated 64 bits per clusters you will be able to use 4k cluster
21+
for 16T+ volumes. Windows will not be able to mount such volumes.
22+
23+
It is recommended to say N here.
24+
25+
config NTFS3_LZX_XPRESS
26+
bool "activate support of external compressions lzx/xpress"
27+
depends on NTFS3_FS
28+
help
29+
In Windows 10 one can use command "compact" to compress any files.
30+
4 possible variants of compression are: xpress4k, xpress8k, xpress16k and lzx.
31+
If activated you will be able to read such files correctly.
32+
33+
It is recommended to say Y here.
34+
35+
config NTFS3_FS_POSIX_ACL
36+
bool "NTFS POSIX Access Control Lists"
37+
depends on NTFS3_FS
38+
select FS_POSIX_ACL
39+
help
40+
POSIX Access Control Lists (ACLs) support additional access rights
41+
for users and groups beyond the standard owner/group/world scheme,
42+
and this option selects support for ACLs specifically for ntfs
43+
filesystems.
44+
NOTE: this is linux only feature. Windows will ignore these ACLs.
45+
46+
If you don't know what Access Control Lists are, say N.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
#
3+
# Makefile for the ntfs3 filesystem support.
4+
#
5+
6+
# to check robot warnings
7+
ccflags-y += -Wint-to-pointer-cast \
8+
$(call cc-option,-Wunused-but-set-variable,-Wunused-const-variable) \
9+
$(call cc-option,-Wold-style-declaration,-Wout-of-line-declaration)
10+
11+
obj-$(CONFIG_NTFS3_FS) += ntfs3.o
12+
13+
ntfs3-y := attrib.o \
14+
attrlist.o \
15+
bitfunc.o \
16+
bitmap.o \
17+
dir.o \
18+
fsntfs.o \
19+
frecord.o \
20+
file.o \
21+
fslog.o \
22+
inode.o \
23+
index.o \
24+
lznt.o \
25+
namei.o \
26+
record.o \
27+
run.o \
28+
super.o \
29+
upcase.o \
30+
xattr.o
31+
32+
ntfs3-$(CONFIG_NTFS3_LZX_XPRESS) += $(addprefix lib/,\
33+
decompress_common.o \
34+
lzx_decompress.o \
35+
xpress_decompress.o \
36+
)
37+
38+
ccflags-$(CONFIG_NTFS3_LZX_XPRESS) += -DCONFIG_NTFS3_LZX_XPRESS
39+
ccflags-$(CONFIG_NTFS3_FS_POSIX_ACL) += -DCONFIG_NTFS3_FS_POSIX_ACL
40+
41+
all:
42+
make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
43+
44+
clean:
45+
make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean

0 commit comments

Comments
 (0)