Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1568824rbb; Mon, 26 Feb 2024 13:48:11 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXDZRNYF4/EAOh+jrysqGNhTFKNFBmFRqq0Kpfm4SMKMP33LtLLughtBLz0nPVSM/AJOVYepIQ+tylAM1e1OpvvJR/bDDnWoUVZCkbYDQ== X-Google-Smtp-Source: AGHT+IGMFg7Fg5og9FeimwxhlAJNsEaCwIUrJAwUCZNB6C8znoej1n9PL0XFDN5v5QiNtrXLugyL X-Received: by 2002:a05:6358:560d:b0:17b:62ac:1dd1 with SMTP id b13-20020a056358560d00b0017b62ac1dd1mr10361426rwf.8.1708984091561; Mon, 26 Feb 2024 13:48:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708984091; cv=pass; d=google.com; s=arc-20160816; b=dXLWJDq8X4kX/MrlmOI7PJitpA2ex5kyapp28Mi+0bTMkkgpsCkDoxZupY++G+SoRS j1PuhYn8jxFlW6BkXNC6k2VVPqbgsfrwZvf5zrBVkeZG6I6PRoje7uCvfvx6a4YLKFDM jHps3uVpFmM50RMrBccIrMzjenL1/UlixFdIVFJgEbioAcITbvDbRZDiyihLzc0UArRV 5fd5beTdzFKPCqlRGPD89dnVlIkjX2ZlMgr37nkUi2hoQqy3sOCDfgfBIJgBrlonYqS7 1RjX0vrXZn/EIDiYxVKxf7KAK4NKYdEyybYrljpg6PKnTIgqKiDem5zwZd2BTg48up7t EWvg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=WwkLzcOkTdepCEL/rTOLTVwMFBrXTv/HE2I151NYxEg=; fh=7MAL/yP9fLlWS1Y9MG0K/YKkxZENack3OOc7KvLirGU=; b=gPlhI1lnM1y7JUFDj8xWF5rmLngjM3waqy2GWjhBuW4lWyTDi0PYHGdk9rBNqG3Pqw 5OTpypJM9yFgt+TTn8cJpokLgO/54EUwMhcifvbxQAFdVkfYr8VMiLX1HMIYVPK7OT7X yaJ3RN2rmT7UBNuyMHUbnE68v7bQyXlTUVWLg98N9gqEg3kFDWZxFcd0wqRO9AwhSkT3 XZneeckt7n6qL4MulhaCNLL6H9a/iNSLH1KKaZfown3R4d47xshn0dFKh4u3MfOkuH+k Pm+Yn3XQMJgtbFrBuKUoN+mrtWKgtKSAwYKCA2BlEZLO3rxVI0TiFiUIUzayh2wrK9qI U51w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fxPhBclp; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-82368-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82368-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id t62-20020a632d41000000b005dbdc98c15csi4288691pgt.709.2024.02.26.13.48.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 13:48:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82368-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fxPhBclp; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-82368-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82368-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3BB5F28E011 for ; Mon, 26 Feb 2024 21:48:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A8600131E35; Mon, 26 Feb 2024 21:48:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fxPhBclp" Received: from mail-oo1-f49.google.com (mail-oo1-f49.google.com [209.85.161.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 057F3405CE; Mon, 26 Feb 2024 21:47:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708984080; cv=none; b=glQXV47LL/kC0X0HDsc+2qUIzPWnpHhzp2UTy/TF0DN4Wq++72oWOEXb6+0sqCHmcX12WsLzNoup/u3gDbVCeOtCYqbw9MCoHqx+4iSKWSLJaYIQlcR6NucPRFGjYgQRsm3YFkhyGvG2nyjj/8PppSjbdoENzZSFuDAHjKS22J4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708984080; c=relaxed/simple; bh=+mhRZDCckO6W8K7cXxypdompx2eyAZlDqNRYXBm0lRQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GRHMcO2ldTXHr2jvC7d/XKR0IG6gUeGxZ0DHfwR1h8oG3GtwTIBuCVbLsUs5mDBPw/YuMEzapDYdhNzvHfGD32LXnu0pV44G1doIZdk+DHOCk9e0g5W0WKLQhd4lhkdjpMQGPXW0D+3/u0KTqNSnhLl/eA5VMiu6oGd6gjnBxXk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=groves.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=fxPhBclp; arc=none smtp.client-ip=209.85.161.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=groves.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oo1-f49.google.com with SMTP id 006d021491bc7-5a0669228b6so1321600eaf.0; Mon, 26 Feb 2024 13:47:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708984076; x=1709588876; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=WwkLzcOkTdepCEL/rTOLTVwMFBrXTv/HE2I151NYxEg=; b=fxPhBclpFQ+5AkFBIq5hzfZ7XqCxzt4Zaj0eafEVX/3clW9wh2zFGB6lyYsKlB3UhV 0belvW+1FJPyFvnoDmqU1Yo6bugWLktH/8SckZJaTcoZVEay8vpIfNVZ3A97gzSqPqrK dgoINt2sjdu5aUZWysjxGoTJe8kKosXu/csZaYOGrEeFENrQIknk2XZQDJGsWtZkg97/ fH/tROE+VJwxtRD455Ctjy5oJPco6uAS7c5cnBg02JIYiyLW96/LHVU5I1lVs5qXa2+u rPL0reWB/9l0GyxlzUjPN1vfjR72LG2Ro77IXRWXwWahM8LA4Z+c1VlaY2A9nmbH8hek 1Izg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708984076; x=1709588876; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WwkLzcOkTdepCEL/rTOLTVwMFBrXTv/HE2I151NYxEg=; b=j4wMFwoT0Xa+DZxKMXZDgktBUGdvxmRR3nUkyzgK75iF6+dGV1T3VtsHNCvgJXiGeL a7WuAHuQo6FELGK9EkolZb4aTNZXTEWIdyr46x6CxtyuO6ZQPBQuB03yAcKmr5eo6wlL 4nalqTAck1R4HrH/9Dz+DE10DOlt0vcujZOV3cbXfMAnMHyN+LgAgXFvOEdljXbJTAGR 50crZuyuVBqKXACCzAOuDiYChKOwmPoy/kd6QJgWP6Pbj8rTrQLGCPxpIBk4IyvJ91Ix kPvYzugBr8aNgWN7CfZJ2hytHVNAOhJIOWXmJnB4Ps4qujoGh+DW6TLPaxdX3vD55bsb 93KA== X-Forwarded-Encrypted: i=1; AJvYcCUwNszFzu0JYKIv6QxA0SKt8VkHctio9biJ2bZyA40YOMGD+pxvBstiKqdHlU9wipyXpo6pRUEsRsMpsM3g77Q9/LwX/QyMMSy7gmxwyS0Y5gKarVP4nC2XS12oAQoFHe1Dm+4G7UGFVTVjTgbPEuTo4Y88xmp2+1nnHwiSt6TqglftDyF+++bMKFm6WZKHgGcggv05JOPc+buSZQ66WuSwWA== X-Gm-Message-State: AOJu0Yw/eO0xf+3PXlk+bg+lMRXKTETmxaaeuCDcNcw+9mwjjUBWO9bS V8MX+1/mGABoIRR73rCMASf1M9kFEyFjpLvdsvaeawKDuuZPQK82 X-Received: by 2002:a4a:ee8e:0:b0:5a0:5ac0:e81c with SMTP id dk14-20020a4aee8e000000b005a05ac0e81cmr6718130oob.6.1708984076000; Mon, 26 Feb 2024 13:47:56 -0800 (PST) Received: from Borg-9.local (070-114-203-196.res.spectrum.com. [70.114.203.196]) by smtp.gmail.com with ESMTPSA id h26-20020a4ad29a000000b005a0174b67c0sm1415632oos.3.2024.02.26.13.47.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 13:47:55 -0800 (PST) Sender: John Groves Date: Mon, 26 Feb 2024 15:47:53 -0600 From: John Groves To: Jonathan Cameron Cc: John Groves , Jonathan Corbet , Dan Williams , Vishal Verma , Dave Jiang , Alexander Viro , Christian Brauner , Jan Kara , Matthew Wilcox , linux-cxl@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, nvdimm@lists.linux.dev, john@jagalactic.com, Dave Chinner , Christoph Hellwig , dave.hansen@linux.intel.com, gregory.price@memverge.com Subject: Re: [RFC PATCH 09/20] famfs: Add super_operations Message-ID: References: <537f836056c141ae093c42b9623d20de919083b1.1708709155.git.john@groves.net> <20240226125136.00002e64@Huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240226125136.00002e64@Huawei.com> On 24/02/26 12:51PM, Jonathan Cameron wrote: > On Fri, 23 Feb 2024 11:41:53 -0600 > John Groves wrote: > > > Introduce the famfs superblock operations > > > > Signed-off-by: John Groves > > --- > > fs/famfs/famfs_inode.c | 72 ++++++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 72 insertions(+) > > create mode 100644 fs/famfs/famfs_inode.c > > > > diff --git a/fs/famfs/famfs_inode.c b/fs/famfs/famfs_inode.c > > new file mode 100644 > > index 000000000000..3329aff000d1 > > --- /dev/null > > +++ b/fs/famfs/famfs_inode.c > > @@ -0,0 +1,72 @@ > > +// SPDX-License-Identifier: GPL-2.0 > > +/* > > + * famfs - dax file system for shared fabric-attached memory > > + * > > + * Copyright 2023-2024 Micron Technology, inc > > + * > > + * This file system, originally based on ramfs the dax support from xfs, > > + * is intended to allow multiple host systems to mount a common file system > > + * view of dax files that map to shared memory. > > + */ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > That's a lot of header for such a small patch.. I'm going to guess > they aren't all used - bring them in as you need them - I hope > you never need some of these! I didn't phase in headers in this series. Based on these recommendations, the next version of this series is gonna have to be 100% constructed from scratch, but okay. My head hurts just thinking about it. I need a nap... I've been rebasing for 3 weeks to get this series out, and it occurs to me that maybe there are tools I'm not aware of that make it eaiser? I'm just typing "rebase -i..." 200 times a day. Is there a less soul-crushing way? > > > > + > > +#include "famfs_internal.h" > > + > > +#define FAMFS_DEFAULT_MODE 0755 > > + > > +static const struct super_operations famfs_ops; > > +static const struct inode_operations famfs_file_inode_operations; > > +static const struct inode_operations famfs_dir_inode_operations; > > Why are these all up here? These forward declarations are needed by a later patch in the series. They were in famfs_internal.h, but they are only used in this file, so I moved them here. For all answers such as this, I will hereafter reply "rebase fu", with further clarification only if necessary. > > > + > > +/********************************************************************************** > > + * famfs super_operations > > + * > > + * TODO: implement a famfs_statfs() that shows size, free and available space, etc. > > + */ > > + > > +/** > > + * famfs_show_options() - Display the mount options in /proc/mounts. > Run kernel doc script + fix all warnings. Will do; I actually think I have already fixed those... > > > + */ > > +static int famfs_show_options( > > + struct seq_file *m, > > + struct dentry *root) > Not that familiar with fs code, but this unusual kernel style. I'd go with > something more common > > static int famfs_show_options(struct seq_file *m, struct dentry *root) Done. To all functions... > > > +{ > > + struct famfs_fs_info *fsi = root->d_sb->s_fs_info; > > + > > + if (fsi->mount_opts.mode != FAMFS_DEFAULT_MODE) > > + seq_printf(m, ",mode=%o", fsi->mount_opts.mode); > > + > > + return 0; > > +} > > + > > +static const struct super_operations famfs_ops = { > > + .statfs = simple_statfs, > > + .drop_inode = generic_delete_inode, > > + .show_options = famfs_show_options, > > +}; > > + > > + > One blank line probably fine. Done > > > Add the rest of the stuff a module normally has, author etc in this > patch. Because "rebase fu" I'm not sure the order will remain the same. Will try not to make anybody tell me this again though... John