From patchwork Thu Oct 3 10:25:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Kent X-Patchwork-Id: 11172441 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4268213BD for ; Thu, 3 Oct 2019 10:25:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1FAFA21D71 for ; Thu, 3 Oct 2019 10:25:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728469AbfJCKZW (ORCPT ); Thu, 3 Oct 2019 06:25:22 -0400 Received: from icp-osb-irony-out7.external.iinet.net.au ([203.59.1.107]:42874 "EHLO icp-osb-irony-out7.external.iinet.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726199AbfJCKZW (ORCPT ); Thu, 3 Oct 2019 06:25:22 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CsAQDHy5Vd/7q70HYNWRwBAQEEAQEMBAEBgWeBbwWBF4EvhCKPKgMGgRGBI4h3j0WBZwkBAQEBAQEBAQEnEAEBhDsDAoJqOBMCDAEBAQQBAQEBAQUDAYVYQoVaJwRSKA0CJgJJFgqDLIF2rgx1fzMahB4BCwGFfIEMKIFlikF4gQeBETOCKnOCYQEDgUeDJYJYBIxdJIIvN4VYYUOWVIIthwiOKwyOEwOLHJZJkyKBek0uCoMnCRYxgX8XgQQBAociO4VMZ45JK4InAQE X-IPAS-Result: A2CsAQDHy5Vd/7q70HYNWRwBAQEEAQEMBAEBgWeBbwWBF4EvhCKPKgMGgRGBI4h3j0WBZwkBAQEBAQEBAQEnEAEBhDsDAoJqOBMCDAEBAQQBAQEBAQUDAYVYQoVaJwRSKA0CJgJJFgqDLIF2rgx1fzMahB4BCwGFfIEMKIFlikF4gQeBETOCKnOCYQEDgUeDJYJYBIxdJIIvN4VYYUOWVIIthwiOKwyOEwOLHJZJkyKBek0uCoMnCRYxgX8XgQQBAociO4VMZ45JK4InAQE X-IronPort-AV: E=Sophos;i="5.67,251,1566835200"; d="scan'208";a="207652623" Received: from unknown (HELO [192.168.1.222]) ([118.208.187.186]) by icp-osb-irony-out7.iinet.net.au with ESMTP; 03 Oct 2019 18:25:18 +0800 Subject: [PATCH v4 00/17] xfs: mount API patch series From: Ian Kent To: linux-xfs Cc: Brian Foster , Eric Sandeen , David Howells , Dave Chinner , Al Viro Date: Thu, 03 Oct 2019 18:25:18 +0800 Message-ID: <157009817203.13858.7783767645177567968.stgit@fedora-28> User-Agent: StGit/unknown-version MIME-Version: 1.0 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org This patch series add support to xfs for the new kernel mount API as described in the LWN article at https://lwn.net/Articles/780267/. In the article there's a lengthy description of the reasons for adopting the API and problems expected to be resolved by using it. The series has been applied to the repository located at git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git, and built and some simple tests run on it along with the generic xfstests. Other things that continue to cause me concern: - Message logging. There is error logging done in the VFS by the mount-api code, some is VFS specific while some is file system specific. This can lead to duplicated and sometimes inconsistent logging. The mount-api feature of saving error message text to the mount context for later retrieval by fsopen()/fsconfig()/fsmount() users is the reason the mount-api log macros are present. But, at the moment (last time I looked), these macros will either log the error message or save it to the mount context. There's not yet a way to modify this behaviour so it which can lead to messages, possibly needed for debug purposes, not being sent to the kernel log. There's also the pr_xxx() log functions (not a problem for xfs AFAICS) that aren't aware of the mount context at all. In the xfs patches I've used the same method that is used in gfs2 and was suggested by Al Viro (essentially return the error if fs_parse() returns one) except that I've also not used the mount api log macros to minimise the possibility of lost log messages. This isn't the best so follow up patches for RFC (with a slightly wider audience) will be needed to try and improve this aspect of the mount api. Changes for v4: - changed xfs_fill_super() cleanup back to what it was in v2, until I can work out what's causing the problem had previously seen (I can't reproduce it myself), since it looks like it was right from the start. - use get_tree_bdev() instead of vfs_get_block_super() in xfs_get_tree() as requested by Al Viro. - removed redundant initialisation in xfs_fs_fill_super(). - fix long line in xfs_validate_params(). - no need to validate if parameter parsing fails, just return the error. - summarise reconfigure comment about option handling, transfer bulk of comment to commit log message. - use minimal change in xfs_parse_param(), deffer discussion of mount api logging improvements until later and with a wider audience. Changes for v3: - fix struct xfs_fs_context initialisation in xfs_parseargs(). - move call to xfs_validate_params() below label "done". - if allocation of xfs_mount fails return ENOMEM immediately. - remove erroneous kfree(mp) in xfs_fill_super(). - move the removal of xfs_fs_remount() and xfs_test_remount_options() to the switch to mount api patch. - retain original usage of distinct