Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp537144pxb; Thu, 21 Oct 2021 04:46:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLdece8ZLREX0rKpYg0gh98Nk+p5dIxU5LXI4a82txIOotnPsuPEaKjJ/kTTiNyonhFw5t X-Received: by 2002:a17:906:8a7b:: with SMTP id hy27mr248193ejc.308.1634816772100; Thu, 21 Oct 2021 04:46:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634816772; cv=none; d=google.com; s=arc-20160816; b=bYCqZvcacqKSmzbo9yHkTKaf8VkL+K+vez7cMnzHDdOzUVxZ5BJLQap2P58//Xp+Ic C/flTX0VnBIkV+/m1Te+digqfaGRxLuTa7Q1Lv470YudfU3op/mtjXTu18dZoODYIWXQ +BpdwqPc7RxQqoHM23TtaPXBnZ/f0qbaFXd5LsMn9Tq0vOCc+cd155lTTVnLkxsWW87+ PkhMEJfsNpx9x5Yv+4H4bWmURlG6EaEGP74dwVAllSrf7T3w0cMVySJ/5BHGG16tBHi+ CTszZVUjdjDAFJ/UY5giH8GtPiyNEyOw5RnfB/RscawYKJz/qE9SlaPkfLxFyp4zhsoi IHdQ== 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=01Spz1miJqveTKFwmHuV+ca07Xv+jZgHjncZxHGs3nw=; b=GclMVIeaoRDl6Q+oc+L8Uc1SS8wYpos6E8poZuS5JR/Y49jGkBc/GnqzN13LPORPS4 p8YjALg5TWggLoOmcfTM11NisK6e1h8dj4JujPXyBz2VGGz6vS4xemOxubwboYhcaV9x UI8RjViQoGK/yUejK021XCkZSym/3HIhh2yVbSBkfeWhfT71Bc/8DD5TID+zOYvGi4gF +GnG3Ll2102YhNp8NZjKB/wr6XZl14Cw6f0ryvErXBrLlSwEHdqZug3UKc4+RDE+X+n8 VVNh/bU8Ghx3uP1dAMEFictz1+WyQ+9D/GeY3xy4JFuWWRDBLY4sE68sUufhovPcgQoB Ud8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=A+rp4Ljn; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j15si6533709edl.466.2021.10.21.04.45.37; Thu, 21 Oct 2021 04:46:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=@redhat.com header.s=mimecast20190719 header.b=A+rp4Ljn; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231138AbhJULro (ORCPT + 99 others); Thu, 21 Oct 2021 07:47:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:23491 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230349AbhJULrh (ORCPT ); Thu, 21 Oct 2021 07:47:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634816715; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=01Spz1miJqveTKFwmHuV+ca07Xv+jZgHjncZxHGs3nw=; b=A+rp4LjnkLrHOrGmlXKVMXq+pSFKUD4+I+JbWh/DaOzXXlRMmWQt5PuU5EngayU3IToq8F bYSZ04uIMi08jiFTKfhiGwK+bbqD3z+UFGhtjIft6JVJN0bWLLbZHG6uQGN0qNNg40CnxK 79rKO0XFgWACP/35oe9cgy0LE99yCjE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-511-y_jgkEPJN1CkF_mBAMJ_mA-1; Thu, 21 Oct 2021 07:45:13 -0400 X-MC-Unique: y_jgkEPJN1CkF_mBAMJ_mA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8DE5F1808304; Thu, 21 Oct 2021 11:45:12 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.194.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9BC54652AC; Thu, 21 Oct 2021 11:45:11 +0000 (UTC) From: Lukas Czerner To: linux-ext4@vger.kernel.org, tytso@mit.edu Cc: linux-fsdevel@vger.kernel.org Subject: [PATCH v3 00/13] ext4: new mount API conversion Date: Thu, 21 Oct 2021 13:44:55 +0200 Message-Id: <20211021114508.21407-1-lczerner@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org After some time I am once again resurrecting the patchset to convert the ext4 to use the new mount API (Documentation/filesystems/mount_api.txt). The series can be applied on top of the current mainline tree and the work is based on the patches from David Howells (thank you David). It was built and tested with xfstests and a new ext4 mount options regression test that was sent to the fstests list. https://www.spinics.net/lists/fstests/msg17756.html Here is a high level description of the patchset 1. Prepare the ext4 mount parameters required by the new mount API and use it for parsing, while still using the old API to get the options string. fs_parse: allow parameter value to be empty ext4: Add fs parameter specifications for mount options ext4: move option validation to a separate function ext4: Change handle_mount_opt() to use fs_parameter 2. Remove the use of ext4 super block from all the parsing code, because with the new mount API the parsing is going to be done before we even get the super block. ext4: Allow sb to be NULL in ext4_msg() ext4: move quota configuration out of handle_mount_opt() ext4: check ext2/3 compatibility outside handle_mount_opt() ext4: get rid of super block and sbi from handle_mount_ops() 3. Actually finish the separation of the parsing and super block setup into distinct steps. This is where the new ext4_fill_super() and ext4_remount() functions are created temporarily before the actual transition to the new API. ext4: Completely separate options parsing and sb setup 4. Make some last preparations and actually switch the ext4 to use the new mount API. ext4: clean up return values in handle_mount_opt() ext4: change token2str() to use ext4_param_specs ext4: switch to the new mount api 5. Cleanup the old unused structures and rearrange the parsing function. ext4: Remove unused match_table_t tokens There is still a potential to do some cleanups and perhaps refactoring such as using the fsparam_flag_no to remove the separate negative options for example. However that can be done later after the conversion to the new mount API which is the main purpose of the patchset. Signed-off-by: Lukas Czerner --- V2 -> V3: Rebase to the newer kernel, including new mount options. V1 -> V2: Rebase to the newer kernel Lukas Czerner (13): fs_parse: allow parameter value to be empty ext4: Add fs parameter specifications for mount options ext4: move option validation to a separate function ext4: Change handle_mount_opt() to use fs_parameter ext4: Allow sb to be NULL in ext4_msg() ext4: move quota configuration out of handle_mount_opt() ext4: check ext2/3 compatibility outside handle_mount_opt() ext4: get rid of super block and sbi from handle_mount_ops() ext4: Completely separate options parsing and sb setup ext4: clean up return values in handle_mount_opt() ext4: change token2str() to use ext4_param_specs ext4: switch to the new mount api ext4: Remove unused match_table_t tokens fs/ext4/super.c | 1846 +++++++++++++++++++++++-------------- fs/fs_parser.c | 31 +- include/linux/fs_parser.h | 2 +- 3 files changed, 1187 insertions(+), 692 deletions(-) base-commit: d9abdee5fd5abffd0e763e52fbfa3116de167822 -- 2.31.1