Message ID | 20200414124304.4470-1-eesposit@redhat.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <SRS0=jDfh=56=oss.oracle.com=ocfs2-devel-bounces@kernel.org> 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 364101871 for <patchwork-ocfs2-devel@patchwork.kernel.org>; Tue, 14 Apr 2020 12:45:49 +0000 (UTC) Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 13ADA206A2 for <patchwork-ocfs2-devel@patchwork.kernel.org>; Tue, 14 Apr 2020 12:45:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13ADA206A2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 03EChIfl151094; Tue, 14 Apr 2020 12:45:23 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 30b6hpmbce-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Apr 2020 12:45:23 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 03ECfpGX054787; Tue, 14 Apr 2020 12:45:22 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3030.oracle.com with ESMTP id 30bqchjgbj-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Tue, 14 Apr 2020 12:45:22 +0000 Received: from localhost ([127.0.0.1] helo=lb-oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from <ocfs2-devel-bounces@oss.oracle.com>) id 1jOKwL-0003cM-R5; Tue, 14 Apr 2020 05:45:21 -0700 Received: from userp3030.oracle.com ([156.151.31.80]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from <eesposit@redhat.com>) id 1jOKvV-0003Uw-JA for ocfs2-devel@oss.oracle.com; Tue, 14 Apr 2020 05:44:29 -0700 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 03ECfp7V054733 for <ocfs2-devel@oss.oracle.com>; Tue, 14 Apr 2020 12:44:29 GMT Received: from userp2040.oracle.com (userp2040.oracle.com [156.151.31.90]) by userp3030.oracle.com with ESMTP id 30bqchjdmd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <ocfs2-devel@oss.oracle.com>; Tue, 14 Apr 2020 12:44:29 +0000 Received: from pps.filterd (userp2040.oracle.com [127.0.0.1]) by userp2040.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 03ECiQZr027571 for <ocfs2-devel@oss.oracle.com>; Tue, 14 Apr 2020 12:44:28 GMT Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by userp2040.oracle.com with ESMTP id 30d6x0xcmc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=OK) for <ocfs2-devel@oss.oracle.com>; Tue, 14 Apr 2020 12:44:28 +0000 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-494-mr6ULChyOoiZDwINCa4cdA-1; Tue, 14 Apr 2020 08:43:31 -0400 X-MC-Unique: mr6ULChyOoiZDwINCa4cdA-1 Received: by mail-wm1-f72.google.com with SMTP id o26so3720864wmh.1 for <ocfs2-devel@oss.oracle.com>; Tue, 14 Apr 2020 05:43:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fP9JfUaepQl9AEXacvfinBkYRVU9dDq3rlCP1SQpCoc=; b=OcPWCo3G7ZVRId99ckV9E7oPLCtI+mH+jtYJaoeHGdJ6mBUuisfpG2dx1crqnUjTvO /ZxpIusSZl+6wySkwPdJWbFqYsrs7vreGEuEJZk2TEw6JLqL3oVIJaGJs69nJSFneZha NdE/YKGXkny0ru3G/t4F3OW7tPFgA9MiMu0mGLdertXSUf1HKpZf7aKsurnbqHLSzBWt ogUqrWltAGpakkHow9YZXEvC96rWhOu+XAv6444Voi7eadJ/FDR7+L/+Z66E75Tgc2EM yVf6x0cD0EIhqfp3+mdS7wFjVN7GOryu7JIwcgs4OY3lV7/X822wKFC8s0Dgg5QZWJJ7 6jaQ== X-Gm-Message-State: AGi0Pua/2TRtUN2yuwuXl0rks96igBw6rUtzC+bNgAWAeAGGuDgYBjXv kC43LjJ2kPi5u0xJTEsA8otOhEOMiPn83aB7Ec4ipXgjl1emImTwWqvYPHbx5kUWgpF/UO+EH8j 6u/qvIk3XI13v7PbsZWGFGg== X-Received: by 2002:adf:97cc:: with SMTP id t12mr22402293wrb.261.1586868209903; Tue, 14 Apr 2020 05:43:29 -0700 (PDT) X-Google-Smtp-Source: APiQypJ2dTzegIg0xIyb6oIhZwO+Fw/tjfTAynP0eIvP7y2y/+ilzA1Tw1zlCJEMAy5qMTHNiP27og== X-Received: by 2002:adf:97cc:: with SMTP id t12mr22402243wrb.261.1586868209612; Tue, 14 Apr 2020 05:43:29 -0700 (PDT) Received: from localhost.localdomain ([194.230.155.210]) by smtp.gmail.com with ESMTPSA id m14sm16948816wrs.76.2020.04.14.05.43.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 05:43:28 -0700 (PDT) From: Emanuele Giuseppe Esposito <eesposit@redhat.com> To: linux-nfs@vger.kernel.org Date: Tue, 14 Apr 2020 14:42:54 +0200 Message-Id: <20200414124304.4470-1-eesposit@redhat.com> X-Mailer: git-send-email 2.25.2 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ip4:103.23.64.2 ip4:103.23.65.2 ip4:103.23.66.26 ip4:103.23.67.26 ip4:107.21.15.141 ip4:108.177.8.0/21 ip4:13.111.0.0/16 ip4:136.147.128.0/20 ip4:136.147.176.0/20 ip4:148.105.8.0/21 ip4:149.72.0.0/16 ip4:149.96.1.26 ip4:149.96.13.2 ip4:149.96.132.2 ip4:149.96.133.2 ip4:149.96.14.2 ip4:149.96.194.2 ip4:149.96.195.2 ip4:149.96.2.26 include:spf1.redhat.com -all X-Proofpoint-SPF-VenPass: Allowed X-PDR: PASS X-Source-IP: 205.139.110.120 X-ServerName: us-smtp-delivery-1.mimecast.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ip4:103.23.64.2 ip4:103.23.65.2 ip4:103.23.66.26 ip4:103.23.67.26 ip4:107.21.15.141 ip4:108.177.8.0/21 ip4:13.111.0.0/16 ip4:136.147.128.0/20 ip4:136.147.176.0/20 ip4:148.105.8.0/21 ip4:149.72.0.0/16 ip4:149.96.1.26 ip4:149.96.13.2 ip4:149.96.132.2 ip4:149.96.133.2 ip4:149.96.14.2 ip4:149.96.194.2 ip4:149.96.195.2 ip4:149.96.2.26 include:spf1.redhat.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9590 signatures=668686 X-Proofpoint-Spam-Details: rule=tap_spam_policies_safe policy=tap_spam_policies score=0 classifier= adjust=0 reason=safe scancount=1 engine=8.12.0-2003020000 definitions=main-2004140037 X-Spam: OrgSafeList X-SpamRule: orgsafelist X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 mlxlogscore=999 bulkscore=0 malwarescore=0 phishscore=0 mlxscore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004140105 X-Mailman-Approved-At: Tue, 14 Apr 2020 05:45:19 -0700 Cc: Song Liu <songliubraving@fb.com>, linux-usb@vger.kernel.org, bpf@vger.kernel.org, "Rafael J. Wysocki" <rafael@kernel.org>, David Airlie <airlied@linux.ie>, Benjamin Herrenschmidt <benh@kernel.crashing.org>, Heiko Carstens <heiko.carstens@de.ibm.com>, Alexei Starovoitov <ast@kernel.org>, dri-devel@lists.freedesktop.org, "J. Bruce Fields" <bfields@fieldses.org>, Hugh Dickins <hughd@google.com>, Paul Mackerras <paulus@samba.org>, John Johansen <john.johansen@canonical.com>, linux-s390@vger.kernel.org, Andrew Donnellan <ajd@linux.ibm.com>, Emanuele Giuseppe Esposito <eesposit@redhat.com>, Matthew Garrett <matthew.garrett@nebula.com>, linux-efi@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>, Daniel Borkmann <daniel@iogearbox.net>, Christian Borntraeger <borntraeger@de.ibm.com>, linux-rdma@vger.kernel.org, Michael Ellerman <mpe@ellerman.id.au>, Anton Vorontsov <anton@enomsg.org>, John Fastabend <john.fastabend@gmail.com>, James Morris <jmorris@namei.org>, Ard Biesheuvel <ardb@kernel.org>, Jason Gunthorpe <jgg@ziepe.ca>, Doug Ledford <dledford@redhat.com>, oprofile-list@lists.sf.net, Yonghong Song <yhs@fb.com>, Ian Kent <raven@themaw.net>, Andrii Nakryiko <andriin@fb.com>, Alexey Dobriyan <adobriyan@gmail.com>, "Serge E. Hallyn" <serge@hallyn.com>, netdev@vger.kernel.org, Robert Richter <rric@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, Vasily Gorbik <gor@linux.ibm.com>, Tony Luck <tony.luck@intel.com>, Kees Cook <keescook@chromium.org>, "James E.J. Bottomley" <jejb@linux.ibm.com>, autofs@vger.kernel.org, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Uma Krishnan <ukrishn@linux.ibm.com>, Maxime Ripard <mripard@kernel.org>, linux-fsdevel@vger.kernel.org, "Manoj N. Kumar" <manoj@linux.ibm.com>, Alexander Viro <viro@zeniv.linux.org.uk>, Jakub Kicinski <kuba@kernel.org>, KP Singh <kpsingh@chromium.org>, Trond Myklebust <trond.myklebust@hammerspace.com>, "Matthew R. Ochs" <mrochs@linux.ibm.com>, "David S. Miller" <davem@davemloft.net>, Felipe Balbi <balbi@kernel.org>, Mike Marciniszyn <mike.marciniszyn@intel.com>, Iurii Zaikin <yzaikin@google.com>, linux-scsi@vger.kernel.org, linux-mm@kvack.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Dennis Dalessandro <dennis.dalessandro@intel.com>, Miklos Szeredi <miklos@szeredi.hu>, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Anna Schumaker <anna.schumaker@netapp.com>, Luis Chamberlain <mcgrof@kernel.org>, Chuck Lever <chuck.lever@oracle.com>, Jeremy Kerr <jk@ozlabs.org>, Daniel Vetter <daniel@ffwll.ch>, Colin Cross <ccross@android.com>, Frederic Barrat <fbarrat@linux.ibm.com>, Paolo Bonzini <pbonzini@redhat.com>, Mike Kravetz <mike.kravetz@oracle.com>, linuxppc-dev@lists.ozlabs.org, Martin KaFai Lau <kafai@fb.com>, ocfs2-devel@oss.oracle.com Subject: [Ocfs2-devel] [PATCH 0/8] Simplefs: group and simplify linux fs code X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: <ocfs2-devel.oss.oracle.com> List-Unsubscribe: <https://oss.oracle.com/mailman/listinfo/ocfs2-devel>, <mailto:ocfs2-devel-request@oss.oracle.com?subject=unsubscribe> List-Archive: <http://oss.oracle.com/pipermail/ocfs2-devel> List-Post: <mailto:ocfs2-devel@oss.oracle.com> List-Help: <mailto:ocfs2-devel-request@oss.oracle.com?subject=help> List-Subscribe: <https://oss.oracle.com/mailman/listinfo/ocfs2-devel>, <mailto:ocfs2-devel-request@oss.oracle.com?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9590 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 mlxlogscore=999 bulkscore=0 malwarescore=0 phishscore=0 mlxscore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004140105 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9590 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 adultscore=0 mlxlogscore=999 clxscore=1015 mlxscore=0 phishscore=0 suspectscore=0 lowpriorityscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004140105 |
Series |
Simplefs: group and simplify linux fs code
|
expand
|
On Tue, Apr 14, 2020 at 02:42:54PM +0200, Emanuele Giuseppe Esposito wrote: > This series of patches introduce wrappers for functions, > arguments simplification in functions calls and most importantly > groups duplicated code in a single header, simplefs, to avoid redundancy > in the linux fs, especially debugfs and tracefs. The general goal seems worthy, but here I don't see explained why hasn't this gone through libfs, and what the intention was long term. For instance, you added some other generalizations which you have found. It was not clear that this was the goal here, to expand on these paths. What if common code on fs is found which are not part of debugfs and tracefs, how does one decide if to move to libfs or simplefs? Luis
This series of patches introduce wrappers for functions, arguments simplification in functions calls and most importantly groups duplicated code in a single header, simplefs, to avoid redundancy in the linux fs, especially debugfs and tracefs. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Emanuele Giuseppe Esposito (8): apparmor: just use vfs_kern_mount to make .null fs: extract simple_pin/release_fs to separate files fs: wrap simple_pin_fs/simple_release_fs arguments in a struct fs: introduce simple_new_inode simplefs: add alloc_anon_inode wrapper simplefs: add file creation functions debugfs: switch to simplefs inode creation API tracefs: switch to simplefs inode creation API arch/powerpc/platforms/cell/spufs/inode.c | 4 +- arch/s390/hypfs/inode.c | 4 +- drivers/gpu/drm/Kconfig | 1 + drivers/gpu/drm/drm_drv.c | 13 +- drivers/infiniband/hw/qib/qib_fs.c | 6 +- drivers/misc/cxl/Kconfig | 1 + drivers/misc/cxl/api.c | 14 +- drivers/misc/ibmasm/ibmasmfs.c | 8 +- drivers/misc/ocxl/Kconfig | 1 + drivers/oprofile/oprofilefs.c | 8 +- drivers/scsi/cxlflash/ocxl_hw.c | 15 +- drivers/usb/gadget/function/f_fs.c | 8 +- fs/Kconfig | 3 + fs/Kconfig.binfmt | 1 + fs/Makefile | 1 + fs/autofs/inode.c | 4 +- fs/binfmt_misc.c | 27 +-- fs/configfs/Kconfig | 1 + fs/configfs/mount.c | 12 +- fs/debugfs/inode.c | 171 +++---------------- fs/efivarfs/inode.c | 4 +- fs/fuse/control.c | 4 +- fs/hugetlbfs/inode.c | 8 +- fs/libfs.c | 48 ++---- fs/ocfs2/dlmfs/dlmfs.c | 8 +- fs/proc/base.c | 4 +- fs/proc/proc_sysctl.c | 5 +- fs/pstore/inode.c | 14 +- fs/ramfs/inode.c | 4 +- fs/simplefs.c | 194 ++++++++++++++++++++++ fs/tracefs/inode.c | 108 ++---------- include/linux/fs.h | 3 +- include/linux/simplefs.h | 36 ++++ ipc/mqueue.c | 4 +- kernel/bpf/inode.c | 7 +- lib/Kconfig.debug | 16 +- mm/shmem.c | 4 +- net/sunrpc/rpc_pipe.c | 4 +- security/Kconfig | 1 + security/apparmor/apparmorfs.c | 48 +++--- security/inode.c | 17 +- 41 files changed, 385 insertions(+), 459 deletions(-) create mode 100644 fs/simplefs.c create mode 100644 include/linux/simplefs.h