Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2132513pxb; Fri, 5 Feb 2021 09:39:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmiTkezLZSl4xJb2wYk0TKorK9yI2BfOKQP0jj7mJhCm6ZgRtQolFjZ0hvWcc/uMPyUDGv X-Received: by 2002:a50:d4d9:: with SMTP id e25mr4636321edj.183.1612546777053; Fri, 05 Feb 2021 09:39:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612546777; cv=none; d=google.com; s=arc-20160816; b=dU40Ru1Nkp7vgbne1/yflG/EvU0/LqpSYGAJfvkD9AtRnGlbHuJoBNF4Ib/DSwoWue OXgtTR4Po9cPgn94f5M9Be0SywTHrLVf2MpIH+1ZxWoaaLppTds/0IKUFl7yzaGsJV+J enS5n7AYznisdLOCKP4sBRhJNBHAex+WOSpcLrtj+dJv4elukJb74jH+qMmA0NNaOuNt gsS18nL4xFWLWhClNY8MkS7WoJYXfSkOr5qVJcRE9gY1N7CkZ9c4SPnNhjwkNKCr+20Y Sh+Wi0YBJa5FlD1ZD1oeWTqhkwdaPyt4kILhbtZ9GgaBeXIfx2/nHZL3oOip7BpvppzD HqnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=QxHZ7zkNwS3vOwf8iMhsp2q9+rtT6cil8rW7SQC6zmE=; b=RBdy5PdyKZZYvPAilURLEw5TT+3MT98oL8oKHc4wQAhxmCPqGTnCYXyFScptmlJf5v hUiOPeCUzsHSKVjaIjtqRcotsVmYwn3iC0uNQfimI66zNszx8pn3t0F4SlS3j5v9j1AD BQvH69dXSqU+alV7FR1ggHLsos1sn2f9U0DycXDwa0o+SHp9BKLYrfy9dzOIgSUFpTMV GeZaiWQN9kaDOgo+WbbMk7wJ6LDs1RDyxfUGQHdaP7hHLISntbZHbq19Vx/kiWKk9VUY AFJEwlgHJ6Z+SrdcDBqemcbhLpJg96fYhRVKoxEsz/I/xps1q1bNRii/vXDQX92eKeSB m6dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b=Uiib2VPA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y29si6200060edi.212.2021.02.05.09.39.11; Fri, 05 Feb 2021 09:39:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b=Uiib2VPA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233257AbhBEPyW (ORCPT + 99 others); Fri, 5 Feb 2021 10:54:22 -0500 Received: from relaydlg-01.paragon-software.com ([81.5.88.159]:56478 "EHLO relaydlg-01.paragon-software.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233355AbhBEPuy (ORCPT ); Fri, 5 Feb 2021 10:50:54 -0500 Received: from dlg2.mail.paragon-software.com (vdlg-exch-02.paragon-software.com [172.30.1.105]) by relaydlg-01.paragon-software.com (Postfix) with ESMTPS id 7BF7282282; Fri, 5 Feb 2021 18:04:50 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paragon-software.com; s=mail; t=1612537490; bh=QxHZ7zkNwS3vOwf8iMhsp2q9+rtT6cil8rW7SQC6zmE=; h=From:To:CC:Subject:Date; b=Uiib2VPAzfz2hH0UuNlYXROGtoX7Hn9NG6gbTkvNwvdzRVpeX6LLBGxoMwJiniSRC wnggBysWHNztp/T2ASgkDn/U9DNZkVVWmFUq/s1X+a/Ui8Kvzh77eihZlZuw3yVJiU zSJfR8kmrdokIyNC9VQBfUMkR+ic/eV6f/r+SXOM= Received: from fsd-lkpg.ufsd.paragon-software.com (172.30.114.105) by vdlg-exch-02.paragon-software.com (172.30.1.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1847.3; Fri, 5 Feb 2021 18:04:49 +0300 From: Konstantin Komarov To: CC: , , , , , , , , , , , , , , , , Konstantin Komarov Subject: [PATCH v20 00/10] NTFS read-write driver GPL implementation by Paragon Software Date: Fri, 5 Feb 2021 18:02:34 +0300 Message-ID: <20210205150244.542628-1-almaz.alexandrovich@paragon-software.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.30.114.105] X-ClientProxiedBy: vdlg-exch-02.paragon-software.com (172.30.1.105) To vdlg-exch-02.paragon-software.com (172.30.1.105) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds NTFS Read-Write driver to fs/ntfs3. Having decades of expertise in commercial file systems development and huge test coverage, we at Paragon Software GmbH want to make our contribution to the Open Source Community by providing implementation of NTFS Read-Write driver for the Linux Kernel. This is fully functional NTFS Read-Write driver. Current version works with NTFS(including v3.1) and normal/compressed/sparse files and supports journal replaying. We plan to support this version after the codebase once merged, and add new features and fix bugs. For example, full journaling support over JBD will be added in later updates. v2: - patch splitted to chunks (file-wise) - build issues fixed - sparse and checkpatch.pl errors fixed - NULL pointer dereference on mkfs.ntfs-formatted volume mount fixed - cosmetics + code cleanup v3: - added acl, noatime, no_acs_rules, prealloc mount options - added fiemap support - fixed encodings support - removed typedefs - adapted Kernel-way logging mechanisms - fixed typos and corner-case issues v4: - atomic_open() refactored - code style updated - bugfixes v5: - nls/nls_alt mount options added - Unicode conversion fixes - Improved very fragmented files operations - logging cosmetics v6: - Security Descriptors processing changed added system.ntfs_security xattr to set SD - atomic_open() optimized - cosmetics v7: - Security Descriptors validity checks added (by Mark Harmstone) - atomic_open() fixed for the compressed file creation with directio case - remount support - temporarily removed readahead usage - cosmetics v8: - Compressed files operations fixed v9: - Further cosmetics applied as suggested by Joe Perches v10: - operations with compressed/sparse files on very fragmented volumes improved - reduced memory consumption for above cases v11: - further compressed files optimizations: reads/writes are now skipping bufferization - journal wipe to the initial state optimized (bufferization is also skipped) - optimized run storage (re-packing cluster metainformation) - fixes based on Matthew Wilcox feedback to the v10 - compressed/sparse/normal could be set for empty files with 'system.ntfs_attrib' xattr v12: - nls_alt mount option removed after discussion with Pali Rohar - fixed ni_repack() - fixed resident files transition to non-resident when size increasing v13: - nested_lock fix (lockdep) - out-of-bounds read fix (KASAN warning) - resident->nonresident transition fixed for compressed files - load_nls() missed fix applied - some sparse utility warnings fixes v14: - support for additional compression types (we've adapted WIMLIB's implementation, authored by Eric Biggers, into ntfs3) v15: - kernel test robot warnings fixed - lzx/xpress compression license headers updated v16: - lzx/xpress moved to initial ntfs-3g plugin code - mutexes instead of a global spinlock for compresions - FALLOC_FL_PUNCH_HOLE and FALLOC_FL_COLLAPSE_RANGE implemented - CONFIG_NTFS3_FS_POSIX_ACL added v17: - FALLOC_FL_COLLAPSE_RANGE fixed - fixes for Mattew Wilcox's and Andy Lavr's concerns v18: - ntfs_alloc macro splitted into two ntfs_malloc + ntfs_zalloc - attrlist.c: always use ntfs_cmp_names instead of memcmp; compare entry names only for entry with vcn == 0 - dir.c: remove unconditional ni_lock in ntfs_readdir - fslog.c: corrected error case behavior - index.c: refactored due to modification of ntfs_cmp_names; use rw_semaphore for read/write access to alloc_run and bitmap_run while ntfs_readdir - run.c: separated big/little endian code in functions - upcase.c: improved ntfs_cmp_names, thanks to Kari Argillander for idea and 'bothcase' implementation v19: - fixed directory bitmap for 2MB cluster size - fixed rw_semaphore init for directories v20: - fixed issue with incorrect hidden/system attribute setting on root subdirectories - use kvmalloc instead of kmalloc for runs array - fixed index behavior on volumes with cluster size more than 4k - current build info is added into module info instead of printing on insmod Konstantin Komarov (10): fs/ntfs3: Add headers and misc files fs/ntfs3: Add initialization of super block fs/ntfs3: Add bitmap fs/ntfs3: Add file operations and implementation fs/ntfs3: Add attrib operations fs/ntfs3: Add compression fs/ntfs3: Add NTFS journal fs/ntfs3: Add Kconfig, Makefile and doc fs/ntfs3: Add NTFS3 in fs/Kconfig and fs/Makefile fs/ntfs3: Add MAINTAINERS Documentation/filesystems/ntfs3.rst | 107 + MAINTAINERS | 7 + fs/Kconfig | 1 + fs/Makefile | 1 + fs/ntfs3/Kconfig | 45 + fs/ntfs3/Makefile | 31 + fs/ntfs3/attrib.c | 2085 +++++++++++ fs/ntfs3/attrlist.c | 457 +++ fs/ntfs3/bitfunc.c | 135 + fs/ntfs3/bitmap.c | 1495 ++++++++ fs/ntfs3/debug.h | 64 + fs/ntfs3/dir.c | 583 +++ fs/ntfs3/file.c | 1133 ++++++ fs/ntfs3/frecord.c | 3083 ++++++++++++++++ fs/ntfs3/fslog.c | 5204 +++++++++++++++++++++++++++ fs/ntfs3/fsntfs.c | 2535 +++++++++++++ fs/ntfs3/index.c | 2637 ++++++++++++++ fs/ntfs3/inode.c | 2057 +++++++++++ fs/ntfs3/lib/decompress_common.c | 332 ++ fs/ntfs3/lib/decompress_common.h | 352 ++ fs/ntfs3/lib/lib.h | 26 + fs/ntfs3/lib/lzx_decompress.c | 683 ++++ fs/ntfs3/lib/xpress_decompress.c | 155 + fs/ntfs3/lznt.c | 452 +++ fs/ntfs3/namei.c | 592 +++ fs/ntfs3/ntfs.h | 1238 +++++++ fs/ntfs3/ntfs_fs.h | 1072 ++++++ fs/ntfs3/record.c | 609 ++++ fs/ntfs3/run.c | 1120 ++++++ fs/ntfs3/super.c | 1478 ++++++++ fs/ntfs3/upcase.c | 100 + fs/ntfs3/xattr.c | 1085 ++++++ 32 files changed, 30954 insertions(+) create mode 100644 Documentation/filesystems/ntfs3.rst create mode 100644 fs/ntfs3/Kconfig create mode 100644 fs/ntfs3/Makefile create mode 100644 fs/ntfs3/attrib.c create mode 100644 fs/ntfs3/attrlist.c create mode 100644 fs/ntfs3/bitfunc.c create mode 100644 fs/ntfs3/bitmap.c create mode 100644 fs/ntfs3/debug.h create mode 100644 fs/ntfs3/dir.c create mode 100644 fs/ntfs3/file.c create mode 100644 fs/ntfs3/frecord.c create mode 100644 fs/ntfs3/fslog.c create mode 100644 fs/ntfs3/fsntfs.c create mode 100644 fs/ntfs3/index.c create mode 100644 fs/ntfs3/inode.c create mode 100644 fs/ntfs3/lib/decompress_common.c create mode 100644 fs/ntfs3/lib/decompress_common.h create mode 100644 fs/ntfs3/lib/lib.h create mode 100644 fs/ntfs3/lib/lzx_decompress.c create mode 100644 fs/ntfs3/lib/xpress_decompress.c create mode 100644 fs/ntfs3/lznt.c create mode 100644 fs/ntfs3/namei.c create mode 100644 fs/ntfs3/ntfs.h create mode 100644 fs/ntfs3/ntfs_fs.h create mode 100644 fs/ntfs3/record.c create mode 100644 fs/ntfs3/run.c create mode 100644 fs/ntfs3/super.c create mode 100644 fs/ntfs3/upcase.c create mode 100644 fs/ntfs3/xattr.c base-commit: dd86e7fa07a3ec33c92c957ea7b642c4702516a0 -- 2.25.4