Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2828152ybl; Thu, 19 Dec 2019 22:28:29 -0800 (PST) X-Google-Smtp-Source: APXvYqwpiyr1YELVUKnYCN8AQiqBddvEeUuRNjftYSEnP8l0nQWKVmXsTp36vBn7NA3LwPztW+CP X-Received: by 2002:a05:6830:1bda:: with SMTP id v26mr12884637ota.314.1576823309282; Thu, 19 Dec 2019 22:28:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576823309; cv=none; d=google.com; s=arc-20160816; b=bW7vkC1BwHD743IjQlJCcGYM0ui+GJAtGFCxPTx1hVyvbP8deF/NkDzyT3z/Ffr7Ly tvLqAkFWGuLg+Fz2sSs5jYVSp2BQz/CxegYOZkxiZZZmK29QyjfZ4QR+X1uZ1fuyPOak F7j4JKzZt17dr1ushH8yJpRsK02c5IENDsi/wzC3THZ82jo6+dKazIbjLi5lZLi7dQ2F 6QQjYQ1VIhiSAHK7ZIDLUh5KdSJ07Rc6OiWnY8HYqnOqk6vRiux8APdC9gWiWKWWxXSh vl8BPL17IQhWN4JFd0kQKQL2JbYad3GgpqKR2n4TJjjp0cJmNGukeF6gcQi4of76YlSA HaVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type:message-id :date:subject:cc:to:from:dkim-signature:dkim-filter; bh=C1VgkaKpOShOJd4R4rUGDSkZ5bAsf7fJDpVop6OH5eE=; b=u/8j+7FSpMocI7RrCPfXWn06RVeozxSIoAaUXZu2guRCRjMrfo1pt+8jJWpVKONoZM Kv9Empigw7cSCR0ehQl369jSbOa1pFJF9iZFUOJPoDIfE2nKr642OZS7rOH7adVpEOrg Tvr2gfb7Vx68DIeE/X4u+K/5rHXpn4jPdlKRvcBUhmB5CfY6nqSHwjXul92DJiQ/hJax Jnqa9cgpqK8oV9s0SrI06z9vYsbBFBqqB15GrC7bSQLQ96DXRCuwqZ9qJa7eJW6o4bbq knbpRirng4wkeivaQn7efcNenodnLlW1CgKUtJk45PdtqxV2rSe3in4xujLKYL/TIGv6 t+6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=n+xbAuli; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3si1263114otf.42.2019.12.19.22.28.17; Thu, 19 Dec 2019 22:28:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=n+xbAuli; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727135AbfLTG1f (ORCPT + 99 others); Fri, 20 Dec 2019 01:27:35 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:20070 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725801AbfLTG1f (ORCPT ); Fri, 20 Dec 2019 01:27:35 -0500 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20191220062733epoutp0463da2e86fdb5340a5256f5a81409ee0b~iAGT7EJt41292612926epoutp04P for ; Fri, 20 Dec 2019 06:27:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20191220062733epoutp0463da2e86fdb5340a5256f5a81409ee0b~iAGT7EJt41292612926epoutp04P DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1576823253; bh=C1VgkaKpOShOJd4R4rUGDSkZ5bAsf7fJDpVop6OH5eE=; h=From:To:Cc:Subject:Date:References:From; b=n+xbAuli+Rg2m6EVdRYfHdQnW1bfC3h5/XEcJmA6bR0a9aF2e8NoafzuPu1DehxpO xWFU8T64RMctjcZ6ONR7+o/Aekn2kN3agiGL6/3ef9VThP72nYkRyJ2e0aSLrgOvmP SYse0tZhLEtsloBi+6OwbFRliaT7Ny+8Q40656Yk= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20191220062732epcas1p2fb88e902f8a6b0831907b391d992c6a0~iAGTgmeoA0045200452epcas1p22; Fri, 20 Dec 2019 06:27:32 +0000 (GMT) Received: from epsmges1p2.samsung.com (unknown [182.195.40.162]) by epsnrtp3.localdomain (Postfix) with ESMTP id 47fJh35HZmzMqYkr; Fri, 20 Dec 2019 06:27:31 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p2.samsung.com (Symantec Messaging Gateway) with SMTP id C0.DB.48498.3D96CFD5; Fri, 20 Dec 2019 15:27:31 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p4.samsung.com (KnoxPortal) with ESMTPA id 20191220062731epcas1p475b8da9288b08c87e474a0c4e88ce219~iAGSDXdpB0237302373epcas1p4-; Fri, 20 Dec 2019 06:27:31 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20191220062731epsmtrp1aef25965feb697072cc9eaf914b56e44~iAGSCmWpv2110821108epsmtrp1J; Fri, 20 Dec 2019 06:27:31 +0000 (GMT) X-AuditID: b6c32a36-a55ff7000001bd72-a6-5dfc69d3d3b3 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id B4.0A.10238.3D96CFD5; Fri, 20 Dec 2019 15:27:31 +0900 (KST) Received: from localhost.localdomain (unknown [10.88.103.87]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20191220062731epsmtip1a5221322ed0a758f5f32e49900c1f80d~iAGR4qDfB2891528915epsmtip1U; Fri, 20 Dec 2019 06:27:31 +0000 (GMT) From: Namjae Jeon To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: gregkh@linuxfoundation.org, valdis.kletnieks@vt.edu, hch@lst.de, sj1557.seo@samsung.com, linkinjeon@gmail.com, Namjae Jeon Subject: [PATCH v8 00/13] add the latest exfat driver Date: Fri, 20 Dec 2019 01:24:06 -0500 Message-Id: <20191220062419.23516-1-namjae.jeon@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCKsWRmVeSWpSXmKPExsWy7bCmnu7lzD+xBr/bdCyaF69ns1i5+iiT xfW7t5gt9uw9yWJxedccNosf0+sttvw7wmpx6f0HFgcOj52z7rJ77J+7ht1j980GNo++LasY PT5vkvM4tP0NWwBbVI5NRmpiSmqRQmpecn5KZl66rZJ3cLxzvKmZgaGuoaWFuZJCXmJuqq2S i0+ArltmDtA9SgpliTmlQKGAxOJiJX07m6L80pJUhYz84hJbpdSClJwCQ4MCveLE3OLSvHS9 5PxcK0MDAyNToMqEnIy7e16yFZxQr5j94zBrA+NB+S5GTg4JAROJzm+3mLsYuTiEBHYwSkzt aoJyPjFKHL63jhXC+cYo8eXxOhaYlnufJ7KD2EICexkl1pyVh+s4v2k3UxcjBwebgLbEny2i IDUiAvYSm2cfYAGpYRaYwyixo3cWI0hCWMBUYt+6b2A2i4CqxMllO8AW8ArYSEz70McOsUxe YvWGA2AnSQjMYJNYdqOBCSLhIvFx6lkoW1ji1fEtUA1SEi/729hBjpAQqJb4uJ8ZItzBKPHi uy2EbSxxc/0GVpASZgFNifW79CHCihI7f88FO4dZgE/i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+RI2KGzFX5OaaajHxv9pW738gT fuL9cJ310S3mUzvWv9E9KaSuE8/GYlhjbVXl/n7bebNbPFdc1Za1CMhMPi40P+m5EktxRqKh FnNRcSIAHib8iCYCAAA= X-CMS-MailID: 20191220062731epcas1p475b8da9288b08c87e474a0c4e88ce219 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20191220062731epcas1p475b8da9288b08c87e474a0c4e88ce219 References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds the latest Samsung exfat driver to fs/exfat. This is an implementation of the Microsoft exFAT specification. Previous versions of this shipped with millions of Android phones, and a random previous snaphot has been merged in drivers/staging/. Compared to the sdfat driver shipped on the phones the following changes have been made: - the support for vfat has been removed as that is already supported by fs/fat - driver has been renamed to exfat - the code has been refactored and clean up to fully integrate into the upstream Linux version and follow the Linux coding style - metadata operations like create, lookup and readdir have been further optimized - various major and minor bugs have been fixed We plan to treat this version as the future upstream for the code base once merged, and all new features and bug fixes will go upstream first. v8: - Rearrange the function grouping in exfat_fs.h (exfat_count_dir_entries, exfat_get_dentry, exfat_get_dentry_set, exfat_find_location). - Mark exfat_extract_uni_name(), exfat_get_uniname_from_ext_entry() and exfat_mirror_bh() as static. v7: - Add the helpers macros for bitmap and fat entry to improve readability. - Rename exfat_test_bitmap to exfat_find_free_bitmap. - Merge exfat_get_num_entries into exfat_calc_num_entries. - Add EXFAT_DATA_CLUSTERS and EXFAT_RESERVED_CLUSTERS macro. - Add the macros for EXFAT BIOS block(JUMP_BOOT_LEN, OEM_NAME_LEN, MUST_BE_ZERO_LEN). - Add the macros for EXFAT entry type (IS_EXFAT_CRITICAL_PRI, IS_EXFAT_BENIGN_PRI, IS_EXFAT_CRITICAL_SEC). - Add EXFAT_FILE_NAME_LEN macro. - Change the data type of is_dir with bool in __exfat_write_inode(). - Change the data type of sync with bool in exfat_set_vol_flags(). - Merge __exfat_set_vol_flags into exfat_set_vol_flags. - Fix wrong statfs->f_namelen. v6: - Fix always false comparison due to limited range of allow_utime's data type. - Move bh into loop in exfat_find_dir_entry(). - Move entry_uniname and unichar variables into an if "entry_type == TYPE_EXTEND" branch. v5: - Remove a blank line between the message and the error code in exfat_load_upcase_table. - Move brelse to the end of the while loop and rename release_bh label to free_table in exfat_load_upcase_table. - Move an error code assignment after a failed function call. - Rename labels and directly return instead of goto. - Improve the exception handling in exfat_get_dentry_set(). - Remove ->d_time leftover. - fix boolreturn.cocci warnings. v4: - Declare ALLOC_FAT_CHAIN and ALLOC_NO_FAT_CHAIN macros. - Rename labels with proper name. - Remove blank lines. - Remove pointer check for bh. - Move ep into loop in exfat_load_bitmap(). - Replace READ/WRITE_ONCE() with test_and_clear_bit() and set_bit(). - Change exfat_allow_set_time return type with bool. v3: - fix wrong sbi->s_dirt set. v2: - Check the bitmap count up to the total clusters. - Rename goto labels in several places. - Change time mode type with enumeration. - Directly return error instead of goto at first error check. - Combine seq_printf calls into a single one. Namjae Jeon (13): exfat: add in-memory and on-disk structures and headers exfat: add super block operations exfat: add inode operations exfat: add directory operations exfat: add file operations exfat: add exfat entry operations exfat: add bitmap operations exfat: add exfat cache exfat: add misc operations exfat: add nls operations exfat: add Kconfig and Makefile exfat: add exfat in fs/Kconfig and fs/Makefile MAINTAINERS: add exfat filesystem MAINTAINERS | 7 + fs/Kconfig | 3 +- fs/Makefile | 1 + fs/exfat/Kconfig | 21 + fs/exfat/Makefile | 8 + fs/exfat/balloc.c | 282 ++++++++ fs/exfat/cache.c | 325 ++++++++++ fs/exfat/dir.c | 1295 +++++++++++++++++++++++++++++++++++++ fs/exfat/exfat_fs.h | 559 ++++++++++++++++ fs/exfat/exfat_raw.h | 202 ++++++ fs/exfat/fatent.c | 472 ++++++++++++++ fs/exfat/file.c | 343 ++++++++++ fs/exfat/inode.c | 694 ++++++++++++++++++++ fs/exfat/misc.c | 240 +++++++ fs/exfat/namei.c | 1459 ++++++++++++++++++++++++++++++++++++++++++ fs/exfat/nls.c | 809 +++++++++++++++++++++++ fs/exfat/super.c | 732 +++++++++++++++++++++ 17 files changed, 7451 insertions(+), 1 deletion(-) create mode 100644 fs/exfat/Kconfig create mode 100644 fs/exfat/Makefile create mode 100644 fs/exfat/balloc.c create mode 100644 fs/exfat/cache.c create mode 100644 fs/exfat/dir.c create mode 100644 fs/exfat/exfat_fs.h create mode 100644 fs/exfat/exfat_raw.h create mode 100644 fs/exfat/fatent.c create mode 100644 fs/exfat/file.c create mode 100644 fs/exfat/inode.c create mode 100644 fs/exfat/misc.c create mode 100644 fs/exfat/namei.c create mode 100644 fs/exfat/nls.c create mode 100644 fs/exfat/super.c -- 2.17.1