mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Kernel

Threads by month
  • ----- 2025 -----
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
kernel@openeuler.org

December 2021

  • 27 participants
  • 170 discussions
[PATCH OLK-5.10 017/107] fs/ntfs3: Remove unused including <linux/version.h>
by Yin Xiujiang 08 Dec '21

08 Dec '21
From: Jiapeng Chong <jiapeng.chong(a)linux.alibaba.com> mainline inclusion from mainline-v5.15 commit 1263eddfea9988125a4b9608efecc8aff2c721f9 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4G67J?from=project-issue CVE: NA ---------------------------------------------------------------------- Eliminate the follow versioncheck warning: ./fs/ntfs3/inode.c: 16 linux/version.h not needed. Reported-by: Abaci Robot <abaci(a)linux.alibaba.com> Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") Signed-off-by: Jiapeng Chong <jiapeng.chong(a)linux.alibaba.com> Reviewed-by: Kari Argillander <kari.argillander(a)gmail.com> Signed-off-by: Konstantin Komarov <almaz.alexandrovich(a)paragon-software.com> Signed-off-by: Yin Xiujiang <yinxiujiang(a)kylinos.cn> --- fs/ntfs3/inode.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c index a573c6e98cb8..ed64489edf73 100644 --- a/fs/ntfs3/inode.c +++ b/fs/ntfs3/inode.c @@ -13,7 +13,6 @@ #include <linux/namei.h> #include <linux/nls.h> #include <linux/uio.h> -#include <linux/version.h> #include <linux/writeback.h> #include "debug.h" -- 2.30.0
1 0
0 0
[PATCH OLK-5.10 016/107] fs/ntfs3: Fix fall-through warnings for Clang
by Yin Xiujiang 08 Dec '21

08 Dec '21
From: "Gustavo A. R. Silva" <gustavoars(a)kernel.org> mainline inclusion from mainline-v5.15 commit abfeb2ee2103f07dd93b9d7b32317e26d1c8ef79 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4G67J?from=project-issue CVE: NA ---------------------------------------------------------------------- Fix the following fallthrough warnings: fs/ntfs3/inode.c:1792:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/ntfs3/index.c:178:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] This helps with the ongoing efforts to globally enable -Wimplicit-fallthrough for Clang. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva <gustavoars(a)kernel.org> Reviewed-by: Nathan Chancellor <nathan(a)kernel.org> Signed-off-by: Konstantin Komarov <almaz.alexandrovich(a)paragon-software.com> Signed-off-by: Yin Xiujiang <yinxiujiang(a)kylinos.cn> --- fs/ntfs3/index.c | 1 + fs/ntfs3/inode.c | 1 + 2 files changed, 2 insertions(+) diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c index 9386c551e208..189d46e2c38d 100644 --- a/fs/ntfs3/index.c +++ b/fs/ntfs3/index.c @@ -175,6 +175,7 @@ static inline NTFS_CMP_FUNC get_cmp_func(const struct INDEX_ROOT *root) default: break; } + break; default: break; } diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c index bf51e294432e..a573c6e98cb8 100644 --- a/fs/ntfs3/inode.c +++ b/fs/ntfs3/inode.c @@ -1789,6 +1789,7 @@ int ntfs_unlink_inode(struct inode *dir, const struct dentry *dentry) switch (err) { case 0: drop_nlink(inode); + break; case -ENOTEMPTY: case -ENOSPC: case -EROFS: -- 2.30.0
1 0
0 0
[PATCH OLK-5.10 015/107] fs/ntfs3: Fix one none utf8 char in source file
by Yin Xiujiang 08 Dec '21

08 Dec '21
From: Kari Argillander <kari.argillander(a)gmail.com> mainline inclusion from mainline-v5.15 commit be87e821fdb5ec8c6d404f29e118130c7879ce5b category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4G67J?from=project-issue CVE: NA ---------------------------------------------------------------------- In one source file there is for some reason non utf8 char. But hey this is fs development so this kind of thing might happen. Signed-off-by: Kari Argillander <kari.argillander(a)gmail.com> Signed-off-by: Konstantin Komarov <almaz.alexandrovich(a)paragon-software.com> Signed-off-by: Yin Xiujiang <yinxiujiang(a)kylinos.cn> --- fs/ntfs3/frecord.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c index c3121bf9c62f..e377d72477df 100644 --- a/fs/ntfs3/frecord.c +++ b/fs/ntfs3/frecord.c @@ -1784,7 +1784,7 @@ enum REPARSE_SIGN ni_parse_reparse(struct ntfs_inode *ni, struct ATTRIB *attr, /* * WOF - Windows Overlay Filter - used to compress files with lzx/xpress * Unlike native NTFS file compression, the Windows Overlay Filter supports - * only read operations. This means that it doesn�t need to sector-align each + * only read operations. This means that it doesn't need to sector-align each * compressed chunk, so the compressed data can be packed more tightly together. * If you open the file for writing, the Windows Overlay Filter just decompresses * the entire file, turning it back into a plain file. -- 2.30.0
1 0
0 0
[PATCH OLK-5.10 014/107] fs/ntfs3: Remove unused variable cnt in ntfs_security_init()
by Yin Xiujiang 08 Dec '21

08 Dec '21
From: Nathan Chancellor <nathan(a)kernel.org> mainline inclusion from mainline-v5.15 commit 8c01308b6d6b2bc8e9163c6a3400856fb782dee6 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4G67J?from=project-issue CVE: NA ---------------------------------------------------------------------- Clang warns: fs/ntfs3/fsntfs.c:1874:9: warning: variable 'cnt' set but not used [-Wunused-but-set-variable] size_t cnt, off; ^ 1 warning generated. It is indeed unused so remove it. Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") Signed-off-by: Nathan Chancellor <nathan(a)kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers(a)google.com> Reviewed-by: Kari Argillander <kari.argillander(a)gmail.com> Signed-off-by: Konstantin Komarov <almaz.alexandrovich(a)paragon-software.com> Signed-off-by: Yin Xiujiang <yinxiujiang(a)kylinos.cn> --- fs/ntfs3/fsntfs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/ntfs3/fsntfs.c b/fs/ntfs3/fsntfs.c index 92140050fb6c..c6599c514acf 100644 --- a/fs/ntfs3/fsntfs.c +++ b/fs/ntfs3/fsntfs.c @@ -1871,7 +1871,7 @@ int ntfs_security_init(struct ntfs_sb_info *sbi) struct ATTRIB *attr; struct ATTR_LIST_ENTRY *le; u64 sds_size; - size_t cnt, off; + size_t off; struct NTFS_DE *ne; struct NTFS_DE_SII *sii_e; struct ntfs_fnd *fnd_sii = NULL; @@ -1946,7 +1946,6 @@ int ntfs_security_init(struct ntfs_sb_info *sbi) sbi->security.next_off = Quad2Align(sds_size - SecurityDescriptorsBlockSize); - cnt = 0; off = 0; ne = NULL; @@ -1964,8 +1963,6 @@ int ntfs_security_init(struct ntfs_sb_info *sbi) next_id = le32_to_cpu(sii_e->sec_id) + 1; if (next_id >= sbi->security.next_id) sbi->security.next_id = next_id; - - cnt += 1; } sbi->security.ni = ni; -- 2.30.0
1 0
0 0
[PATCH OLK-5.10 013/107] fs/ntfs3: Fix integer overflow in multiplication
by Yin Xiujiang 08 Dec '21

08 Dec '21
From: Colin Ian King <colin.king(a)canonical.com> mainline inclusion from mainline-v5.15 commit 71eeb6ace80be7389d942b9647765417e5b039f7 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4G67J?from=project-issue CVE: NA ---------------------------------------------------------------------- The multiplication of the u32 data_size with a int is being performed using 32 bit arithmetic however the results is being assigned to the variable nbits that is a size_t (64 bit) value. Fix a potential integer overflow by casting the u32 value to a size_t before the multiply to use a size_t sized bit multiply operation. Addresses-Coverity: ("Unintentional integer overflow") Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") Signed-off-by: Colin Ian King <colin.king(a)canonical.com> Signed-off-by: Konstantin Komarov <almaz.alexandrovich(a)paragon-software.com> Signed-off-by: Yin Xiujiang <yinxiujiang(a)kylinos.cn> --- fs/ntfs3/index.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c index 6aa9540ece47..9386c551e208 100644 --- a/fs/ntfs3/index.c +++ b/fs/ntfs3/index.c @@ -2012,7 +2012,7 @@ static int indx_shrink(struct ntfs_index *indx, struct ntfs_inode *ni, unsigned long pos; const unsigned long *bm = resident_data(b); - nbits = le32_to_cpu(b->res.data_size) * 8; + nbits = (size_t)le32_to_cpu(b->res.data_size) * 8; if (bit >= nbits) return 0; -- 2.30.0
1 0
0 0
[PATCH OLK-5.10 012/107] fs/ntfs3: Add ifndef + define to all header files
by Yin Xiujiang 08 Dec '21

08 Dec '21
From: Kari Argillander <kari.argillander(a)gmail.com> mainline inclusion from mainline-v5.15 commit 87790b65343932411af43bc9b218f086ecebd6a5 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4G67J?from=project-issue CVE: NA ---------------------------------------------------------------------- Add guards so that compiler will only include header files once. Signed-off-by: Kari Argillander <kari.argillander(a)gmail.com> Signed-off-by: Konstantin Komarov <almaz.alexandrovich(a)paragon-software.com> Signed-off-by: Yin Xiujiang <yinxiujiang(a)kylinos.cn> --- fs/ntfs3/debug.h | 5 +++++ fs/ntfs3/ntfs.h | 3 +++ fs/ntfs3/ntfs_fs.h | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/fs/ntfs3/debug.h b/fs/ntfs3/debug.h index 15ac42185e5b..357d9f4dfba7 100644 --- a/fs/ntfs3/debug.h +++ b/fs/ntfs3/debug.h @@ -7,6 +7,9 @@ */ // clang-format off +#ifndef _LINUX_NTFS3_DEBUG_H +#define _LINUX_NTFS3_DEBUG_H + #ifndef Add2Ptr #define Add2Ptr(P, I) ((void *)((u8 *)(P) + (I))) #define PtrOffset(B, O) ((size_t)((size_t)(O) - (size_t)(B))) @@ -61,4 +64,6 @@ void ntfs_inode_printk(struct inode *inode, const char *fmt, ...) #define ntfs_free(p) kfree(p) #define ntfs_vfree(p) kvfree(p) #define ntfs_memdup(src, len) kmemdup(src, len, GFP_NOFS) + +#endif /* _LINUX_NTFS3_DEBUG_H */ // clang-format on diff --git a/fs/ntfs3/ntfs.h b/fs/ntfs3/ntfs.h index 40398e6c39c9..16da514af124 100644 --- a/fs/ntfs3/ntfs.h +++ b/fs/ntfs3/ntfs.h @@ -7,6 +7,8 @@ */ // clang-format off +#ifndef _LINUX_NTFS3_NTFS_H +#define _LINUX_NTFS3_NTFS_H /* TODO: * - Check 4K mft record and 512 bytes cluster @@ -1235,4 +1237,5 @@ struct SID { }; static_assert(offsetof(struct SID, SubAuthority) == 8); +#endif /* _LINUX_NTFS3_NTFS_H */ // clang-format on diff --git a/fs/ntfs3/ntfs_fs.h b/fs/ntfs3/ntfs_fs.h index c8ea6dd38c21..b5da2f06f7cb 100644 --- a/fs/ntfs3/ntfs_fs.h +++ b/fs/ntfs3/ntfs_fs.h @@ -6,6 +6,9 @@ */ // clang-format off +#ifndef _LINUX_NTFS3_NTFS_FS_H +#define _LINUX_NTFS3_NTFS_FS_H + #define MINUS_ONE_T ((size_t)(-1)) /* Biggest MFT / smallest cluster */ #define MAXIMUM_BYTES_PER_MFT 4096 @@ -1085,3 +1088,5 @@ static inline void le64_sub_cpu(__le64 *var, u64 val) { *var = cpu_to_le64(le64_to_cpu(*var) - val); } + +#endif /* _LINUX_NTFS3_NTFS_FS_H */ -- 2.30.0
1 0
0 0
[PATCH OLK-5.10 011/107] fs/ntfs3: Use linux/log2 is_power_of_2 function
by Yin Xiujiang 08 Dec '21

08 Dec '21
From: Kari Argillander <kari.argillander(a)gmail.com> mainline inclusion from mainline-v5.15 commit 528c9b3d1edf291685151afecd741d176f527ddf category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4G67J?from=project-issue CVE: NA ---------------------------------------------------------------------- We do not need our own implementation for this function in this driver. It is much better to use generic one. Signed-off-by: Kari Argillander <kari.argillander(a)gmail.com> Signed-off-by: Konstantin Komarov <almaz.alexandrovich(a)paragon-software.com> Signed-off-by: Yin Xiujiang <yinxiujiang(a)kylinos.cn> --- fs/ntfs3/ntfs_fs.h | 5 ----- fs/ntfs3/run.c | 3 ++- fs/ntfs3/super.c | 9 +++++---- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/fs/ntfs3/ntfs_fs.h b/fs/ntfs3/ntfs_fs.h index 0c3ac89c3115..c8ea6dd38c21 100644 --- a/fs/ntfs3/ntfs_fs.h +++ b/fs/ntfs3/ntfs_fs.h @@ -972,11 +972,6 @@ static inline struct buffer_head *ntfs_bread(struct super_block *sb, return NULL; } -static inline bool is_power_of2(size_t v) -{ - return v && !(v & (v - 1)); -} - static inline struct ntfs_inode *ntfs_i(struct inode *inode) { return container_of(inode, struct ntfs_inode, vfs_inode); diff --git a/fs/ntfs3/run.c b/fs/ntfs3/run.c index f9c362ac672e..60c64deab738 100644 --- a/fs/ntfs3/run.c +++ b/fs/ntfs3/run.c @@ -9,6 +9,7 @@ #include <linux/blkdev.h> #include <linux/buffer_head.h> #include <linux/fs.h> +#include <linux/log2.h> #include <linux/nls.h> #include "debug.h" @@ -376,7 +377,7 @@ bool run_add_entry(struct runs_tree *run, CLST vcn, CLST lcn, CLST len, if (!used) { bytes = 64; } else if (used <= 16 * PAGE_SIZE) { - if (is_power_of2(run->allocated)) + if (is_power_of_2(run->allocated)) bytes = run->allocated << 1; else bytes = (size_t)1 diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c index 84d4f389f685..903975b7e832 100644 --- a/fs/ntfs3/super.c +++ b/fs/ntfs3/super.c @@ -29,6 +29,7 @@ #include <linux/exportfs.h> #include <linux/fs.h> #include <linux/iversion.h> +#include <linux/log2.h> #include <linux/module.h> #include <linux/nls.h> #include <linux/parser.h> @@ -735,13 +736,13 @@ static int ntfs_init_from_boot(struct super_block *sb, u32 sector_size, boot_sector_size = (u32)boot->bytes_per_sector[1] << 8; if (boot->bytes_per_sector[0] || boot_sector_size < SECTOR_SIZE || - !is_power_of2(boot_sector_size)) { + !is_power_of_2(boot_sector_size)) { goto out; } /* cluster size: 512, 1K, 2K, 4K, ... 2M */ sct_per_clst = true_sectors_per_clst(boot); - if (!is_power_of2(sct_per_clst)) + if (!is_power_of_2(sct_per_clst)) goto out; mlcn = le64_to_cpu(boot->mft_clst); @@ -757,14 +758,14 @@ static int ntfs_init_from_boot(struct super_block *sb, u32 sector_size, /* Check MFT record size */ if ((boot->record_size < 0 && SECTOR_SIZE > (2U << (-boot->record_size))) || - (boot->record_size >= 0 && !is_power_of2(boot->record_size))) { + (boot->record_size >= 0 && !is_power_of_2(boot->record_size))) { goto out; } /* Check index record size */ if ((boot->index_size < 0 && SECTOR_SIZE > (2U << (-boot->index_size))) || - (boot->index_size >= 0 && !is_power_of2(boot->index_size))) { + (boot->index_size >= 0 && !is_power_of_2(boot->index_size))) { goto out; } -- 2.30.0
1 0
0 0
[PATCH OLK-5.10 010/107] fs/ntfs3: Fix various spelling mistakes
by Yin Xiujiang 08 Dec '21

08 Dec '21
From: Colin Ian King <colin.king(a)canonical.com> mainline inclusion from mainline-v5.15 commit f8d87ed9f0d546ac5b05e8e7d2b148d4b77599fa category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4G67J?from=project-issue CVE: NA ---------------------------------------------------------------------- There is a spelling mistake in a ntfs_err error message. Also fix various spelling mistakes in comments. Signed-off-by: Colin Ian King <colin.king(a)canonical.com> Reviewed-by: Kari Argillander <kari.argillander(a)gmail.com> Signed-off-by: Konstantin Komarov <almaz.alexandrovich(a)paragon-software.com> Signed-off-by: Yin Xiujiang <yinxiujiang(a)kylinos.cn> --- fs/ntfs3/debug.h | 2 +- fs/ntfs3/lib/decompress_common.c | 2 +- fs/ntfs3/run.c | 2 +- fs/ntfs3/super.c | 4 ++-- fs/ntfs3/upcase.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/ntfs3/debug.h b/fs/ntfs3/debug.h index dfaa4c79dc6d..15ac42185e5b 100644 --- a/fs/ntfs3/debug.h +++ b/fs/ntfs3/debug.h @@ -3,7 +3,7 @@ * * Copyright (C) 2019-2021 Paragon Software GmbH, All rights reserved. * - * useful functions for debuging + * useful functions for debugging */ // clang-format off diff --git a/fs/ntfs3/lib/decompress_common.c b/fs/ntfs3/lib/decompress_common.c index 83c9e93aea77..850d8e8c8f1f 100644 --- a/fs/ntfs3/lib/decompress_common.c +++ b/fs/ntfs3/lib/decompress_common.c @@ -292,7 +292,7 @@ int make_huffman_decode_table(u16 decode_table[], const u32 num_syms, * of as simply the root of the tree. The * representation of these internal nodes is * simply the index of the left child combined - * with the special bits 0xC000 to distingush + * with the special bits 0xC000 to distinguish * the entry from direct mapping and leaf node * entries. */ diff --git a/fs/ntfs3/run.c b/fs/ntfs3/run.c index 5cdf6efe67e0..f9c362ac672e 100644 --- a/fs/ntfs3/run.c +++ b/fs/ntfs3/run.c @@ -949,7 +949,7 @@ int run_unpack(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, if (next_vcn > 0x100000000ull || (lcn + len) > 0x100000000ull) { ntfs_err( sbi->sb, - "This driver is compiled whitout CONFIG_NTFS3_64BIT_CLUSTER (like windows driver).\n" + "This driver is compiled without CONFIG_NTFS3_64BIT_CLUSTER (like windows driver).\n" "Volume contains 64 bits run: vcn %llx, lcn %llx, len %llx.\n" "Activate CONFIG_NTFS3_64BIT_CLUSTER to process this case", vcn64, lcn, len); diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c index 6be13e256c1a..84d4f389f685 100644 --- a/fs/ntfs3/super.c +++ b/fs/ntfs3/super.c @@ -124,7 +124,7 @@ void ntfs_inode_printk(struct inode *inode, const char *fmt, ...) /* * Shared memory struct. * - * on-disk ntfs's upcase table is created by ntfs formater + * on-disk ntfs's upcase table is created by ntfs formatter * 'upcase' table is 128K bytes of memory * we should read it into memory when mounting * Several ntfs volumes likely use the same 'upcase' table @@ -1208,7 +1208,7 @@ static int ntfs_fill_super(struct super_block *sb, void *data, int silent) sbi->def_entries = 1; done = sizeof(struct ATTR_DEF_ENTRY); sbi->reparse.max_size = MAXIMUM_REPARSE_DATA_BUFFER_SIZE; - sbi->ea_max_size = 0x10000; /* default formater value */ + sbi->ea_max_size = 0x10000; /* default formatter value */ while (done + sizeof(struct ATTR_DEF_ENTRY) <= bytes) { u32 t32 = le32_to_cpu(t->type); diff --git a/fs/ntfs3/upcase.c b/fs/ntfs3/upcase.c index 9617382aca64..b53943538f9f 100644 --- a/fs/ntfs3/upcase.c +++ b/fs/ntfs3/upcase.c @@ -27,7 +27,7 @@ static inline u16 upcase_unicode_char(const u16 *upcase, u16 chr) /* * Thanks Kari Argillander <kari.argillander(a)gmail.com> for idea and implementation 'bothcase' * - * Straigth way to compare names: + * Straight way to compare names: * - case insensitive * - if name equals and 'bothcases' then * - case sensitive -- 2.30.0
1 0
0 0
[PATCH OLK-5.10 009/107] fs/ntfs3: Add NTFS3 in fs/Kconfig and fs/Makefile
by Yin Xiujiang 08 Dec '21

08 Dec '21
From: Konstantin Komarov <almaz.alexandrovich(a)paragon-software.com> mainline inclusion from mainline-v5.15 commit 6e5be40d32fb1907285277c02e74493ed43d77fe category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4G67J?from=project-issue CVE: NA ---------------------------------------------------------------------- This adds NTFS3 in fs/Kconfig and fs/Makefile Signed-off-by: Konstantin Komarov <almaz.alexandrovich(a)paragon-software.com> Signed-off-by: Yin Xiujiang <yinxiujiang(a)kylinos.cn> --- fs/Kconfig | 1 + fs/Makefile | 1 + 2 files changed, 2 insertions(+) diff --git a/fs/Kconfig b/fs/Kconfig index 3cc647e00f3c..225088d505f4 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -145,6 +145,7 @@ menu "DOS/FAT/EXFAT/NT Filesystems" source "fs/fat/Kconfig" source "fs/exfat/Kconfig" source "fs/ntfs/Kconfig" +source "fs/ntfs3/Kconfig" endmenu endif # BLOCK diff --git a/fs/Makefile b/fs/Makefile index fec76c1b4e06..73acb48ce6bc 100644 --- a/fs/Makefile +++ b/fs/Makefile @@ -102,6 +102,7 @@ obj-$(CONFIG_SYSV_FS) += sysv/ obj-$(CONFIG_CIFS) += cifs/ obj-$(CONFIG_HPFS_FS) += hpfs/ obj-$(CONFIG_NTFS_FS) += ntfs/ +obj-$(CONFIG_NTFS3_FS) += ntfs3/ obj-$(CONFIG_UFS_FS) += ufs/ obj-$(CONFIG_EFS_FS) += efs/ obj-$(CONFIG_JFFS2_FS) += jffs2/ -- 2.30.0
1 0
0 0
[PATCH OLK-5.10 008/107] fs/ntfs3: Add Kconfig, Makefile and doc
by Yin Xiujiang 08 Dec '21

08 Dec '21
From: Konstantin Komarov <almaz.alexandrovich(a)paragon-software.com> mainline inclusion from mainline-v5.15 commit 12dad495eaab95e0bb784c43869073617c513ea4 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4G67J?from=project-issue CVE: NA ---------------------------------------------------------------------- This adds Kconfig, Makefile and doc Signed-off-by: Konstantin Komarov <almaz.alexandrovich(a)paragon-software.com> Signed-off-by: Yin Xiujiang <yinxiujiang(a)kylinos.cn> --- Documentation/filesystems/index.rst | 1 + Documentation/filesystems/ntfs3.rst | 106 ++++++++++++++++++++++++++++ fs/ntfs3/Kconfig | 46 ++++++++++++ fs/ntfs3/Makefile | 36 ++++++++++ 4 files changed, 189 insertions(+) create mode 100644 Documentation/filesystems/ntfs3.rst create mode 100644 fs/ntfs3/Kconfig create mode 100644 fs/ntfs3/Makefile diff --git a/Documentation/filesystems/index.rst b/Documentation/filesystems/index.rst index 98f59a864242..757684537248 100644 --- a/Documentation/filesystems/index.rst +++ b/Documentation/filesystems/index.rst @@ -97,6 +97,7 @@ Documentation for filesystem implementations. nilfs2 nfs/index ntfs + ntfs3 ocfs2 ocfs2-online-filecheck omfs diff --git a/Documentation/filesystems/ntfs3.rst b/Documentation/filesystems/ntfs3.rst new file mode 100644 index 000000000000..ffe9ea0c1499 --- /dev/null +++ b/Documentation/filesystems/ntfs3.rst @@ -0,0 +1,106 @@ +.. SPDX-License-Identifier: GPL-2.0 + +===== +NTFS3 +===== + + +Summary and Features +==================== + +NTFS3 is fully functional NTFS Read-Write driver. The driver works with +NTFS versions up to 3.1, normal/compressed/sparse files +and journal replaying. File system type to use on mount is 'ntfs3'. + +- This driver implements NTFS read/write support for normal, sparse and + compressed files. +- Supports native journal replaying; +- Supports extended attributes + Predefined extended attributes: + - 'system.ntfs_security' gets/sets security + descriptor (SECURITY_DESCRIPTOR_RELATIVE) + - 'system.ntfs_attrib' gets/sets ntfs file/dir attributes. + Note: applied to empty files, this allows to switch type between + sparse(0x200), compressed(0x800) and normal; +- Supports NFS export of mounted NTFS volumes. + +Mount Options +============= + +The list below describes mount options supported by NTFS3 driver in addition to +generic ones. + +=============================================================================== + +nls=name This option informs the driver how to interpret path + strings and translate them to Unicode and back. If + this option is not set, the default codepage will be + used (CONFIG_NLS_DEFAULT). + Examples: + 'nls=utf8' + +uid= +gid= +umask= Controls the default permissions for files/directories created + after the NTFS volume is mounted. + +fmask= +dmask= Instead of specifying umask which applies both to + files and directories, fmask applies only to files and + dmask only to directories. + +nohidden Files with the Windows-specific HIDDEN (FILE_ATTRIBUTE_HIDDEN) + attribute will not be shown under Linux. + +sys_immutable Files with the Windows-specific SYSTEM + (FILE_ATTRIBUTE_SYSTEM) attribute will be marked as system + immutable files. + +discard Enable support of the TRIM command for improved performance + on delete operations, which is recommended for use with the + solid-state drives (SSD). + +force Forces the driver to mount partitions even if 'dirty' flag + (volume dirty) is set. Not recommended for use. + +sparse Create new files as "sparse". + +showmeta Use this parameter to show all meta-files (System Files) on + a mounted NTFS partition. + By default, all meta-files are hidden. + +prealloc Preallocate space for files excessively when file size is + increasing on writes. Decreases fragmentation in case of + parallel write operations to different files. + +no_acs_rules "No access rules" mount option sets access rights for + files/folders to 777 and owner/group to root. This mount + option absorbs all other permissions: + - permissions change for files/folders will be reported + as successful, but they will remain 777; + - owner/group change will be reported as successful, but + they will stay as root + +acl Support POSIX ACLs (Access Control Lists). Effective if + supported by Kernel. Not to be confused with NTFS ACLs. + The option specified as acl enables support for POSIX ACLs. + +noatime All files and directories will not update their last access + time attribute if a partition is mounted with this parameter. + This option can speed up file system operation. + +=============================================================================== + +ToDo list +========= + +- Full journaling support (currently journal replaying is supported) over JBD. + + +References +========== +https://www.paragon-software.com/home/ntfs-linux-professional/ + - Commercial version of the NTFS driver for Linux. + +almaz.alexandrovich(a)paragon-software.com + - Direct e-mail address for feedback and requests on the NTFS3 implementation. diff --git a/fs/ntfs3/Kconfig b/fs/ntfs3/Kconfig new file mode 100644 index 000000000000..6e4cbc48ab8e --- /dev/null +++ b/fs/ntfs3/Kconfig @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: GPL-2.0-only +config NTFS3_FS + tristate "NTFS Read-Write file system support" + select NLS + help + Windows OS native file system (NTFS) support up to NTFS version 3.1. + + Y or M enables the NTFS3 driver with full features enabled (read, + write, journal replaying, sparse/compressed files support). + File system type to use on mount is "ntfs3". Module name (M option) + is also "ntfs3". + + Documentation: <file:Documentation/filesystems/ntfs3.rst> + +config NTFS3_64BIT_CLUSTER + bool "64 bits per NTFS clusters" + depends on NTFS3_FS && 64BIT + help + Windows implementation of ntfs.sys uses 32 bits per clusters. + If activated 64 bits per clusters you will be able to use 4k cluster + for 16T+ volumes. Windows will not be able to mount such volumes. + + It is recommended to say N here. + +config NTFS3_LZX_XPRESS + bool "activate support of external compressions lzx/xpress" + depends on NTFS3_FS + help + In Windows 10 one can use command "compact" to compress any files. + 4 possible variants of compression are: xpress4k, xpress8k, xpress16k and lzx. + If activated you will be able to read such files correctly. + + It is recommended to say Y here. + +config NTFS3_FS_POSIX_ACL + bool "NTFS POSIX Access Control Lists" + depends on NTFS3_FS + select FS_POSIX_ACL + help + POSIX Access Control Lists (ACLs) support additional access rights + for users and groups beyond the standard owner/group/world scheme, + and this option selects support for ACLs specifically for ntfs + filesystems. + NOTE: this is linux only feature. Windows will ignore these ACLs. + + If you don't know what Access Control Lists are, say N. diff --git a/fs/ntfs3/Makefile b/fs/ntfs3/Makefile new file mode 100644 index 000000000000..279701b62bbe --- /dev/null +++ b/fs/ntfs3/Makefile @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Makefile for the ntfs3 filesystem support. +# + +# to check robot warnings +ccflags-y += -Wint-to-pointer-cast \ + $(call cc-option,-Wunused-but-set-variable,-Wunused-const-variable) \ + $(call cc-option,-Wold-style-declaration,-Wout-of-line-declaration) + +obj-$(CONFIG_NTFS3_FS) += ntfs3.o + +ntfs3-y := attrib.o \ + attrlist.o \ + bitfunc.o \ + bitmap.o \ + dir.o \ + fsntfs.o \ + frecord.o \ + file.o \ + fslog.o \ + inode.o \ + index.o \ + lznt.o \ + namei.o \ + record.o \ + run.o \ + super.o \ + upcase.o \ + xattr.o + +ntfs3-$(CONFIG_NTFS3_LZX_XPRESS) += $(addprefix lib/,\ + decompress_common.o \ + lzx_decompress.o \ + xpress_decompress.o \ + ) \ No newline at end of file -- 2.30.0
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • Older →

HyperKitty Powered by HyperKitty