Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1596023rdb; Tue, 20 Feb 2024 00:35:03 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUPnRoK0d5bimNK8JlOf248tPQlrLGLXYcBHgyc0OuHT+FhRLy72hOWI9HhM3zKN1jfpi0JBbtLNdOOBQFrfq4s/tOl2bB2GGX83MCtNw== X-Google-Smtp-Source: AGHT+IGjvOoG6T8c/T43IU8aO18HxbqmkWJ3S8mNKYaCYAFRZI5LT6GfJ1VaQCvFIw+v9vi1rNAf X-Received: by 2002:a05:6871:5b03:b0:21e:e091:7709 with SMTP id op3-20020a0568715b0300b0021ee0917709mr4716524oac.45.1708418103538; Tue, 20 Feb 2024 00:35:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708418103; cv=pass; d=google.com; s=arc-20160816; b=uuYy79NG6bEcvlMl6RhqbFXac8Nr7twR5GzzXL3mfUPXCIc15c5/75QUU6bet4LF94 4EVz3w/JZLQO0P49KwUCcl9tLPSvc8n7PG/S7s1lJOwgGWj6IqAgfaJP225OpY0qU3jj h+kw1B9dbjJbHCWoLwx8c1Xki8UBWpZGEvQbKl9jk42Axgof+kTFNIXXucXccNRHP6aj kSOOJOXoB+oVE/ZMcNQANSKRVRX8ppQ0EsFGW9obXqY0eZJ5f5dL05RPodd6857H6Nie 8Kxgr2zB609D16yES6/zmpjOwOfXOWWyJhAEsFcKt5UAg41lb2Nisntph+J1jSoqjoF/ Qj7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=z/oYH4+I2fRdmT/gAXThrAHr9XzHkbRk7PwWUHjL5tU=; fh=ioJjkNUqCPpp/LDIpsFfrOxq639d0MI0k8qe4FJzm68=; b=UnMPiBZ/Fv/pSL9XbKIYnfeLN9QSA0eSxuYIK+icf9BX1I+EG1YTRr7epuMEs3jVuP 4Hby7THYwzUIxBBSR2/7qK6cqGV1MF+2dMVwvLYBdduK3GjgS8XhfPHw5QwsnMJQHIjX rc2wLtEHlcLWLzSDPOf0EcMtlAfo8IRwraKmovYgXVzhEV7V7LYZ8XuOEga/7shtS/jd lIeCBe08SDI+CFnXQQeZJlHId4WWaHMJeRFTR3yCfyjtEpqLqCBO/WJlkZ27YBJyVsTi AlPOZ+dqu/ou91GVTQTWHZESqDkNAlNvKWHRjmNl0bx4lq5ZRCG6L0sA5KIzpb5g7fwE dJiw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-72558-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72558-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x3-20020a636303000000b005d3a532f031si5888562pgb.257.2024.02.20.00.35.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 00:35:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72558-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-72558-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72558-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 01A03282F9F for ; Tue, 20 Feb 2024 08:29:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CBF315CDEB; Tue, 20 Feb 2024 08:29:13 +0000 (UTC) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ECF925467B; Tue, 20 Feb 2024 08:29:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708417753; cv=none; b=TjVs0CZfgtHp+TPxO3GlqXrdW7ZV45ihpriDqMNa9JGowIw2MjQNhB4jGN751BQZMyh7P1o7qwkO13+g+XRIkMMk50hSBwZv5kMYN5MaZbixvcOH04BS+U1dGMhp+JFdfggML7GNu/UFrbaumkZ35UG+YO9h110RaKhco8i+XM8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708417753; c=relaxed/simple; bh=QXaT3nMZ99hdDbzY7H8ZM5BvZ3c3AxhfZpb4C1LydmQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=s2wqPoMbLT8Q27guKgcWBVkUK3vJ2tapZBQXKOY+oOMMJ9xWZ/DGaWoLkOd30DIFgsoEts/cHosxUFT39FkS5e5Fvrt5bHcNWQQ2oy5KIqNzqmRD4j+BC+u9vud91uDbQ5N7P6A+3z0JANlNFCPHG0reWbdpEKZPlrI7vbjKbMA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 01C1868D08; Tue, 20 Feb 2024 09:29:03 +0100 (CET) Date: Tue, 20 Feb 2024 09:29:02 +0100 From: Christoph Hellwig To: John Garry Cc: axboe@kernel.dk, kbusch@kernel.org, hch@lst.de, sagi@grimberg.me, jejb@linux.ibm.com, martin.petersen@oracle.com, djwong@kernel.org, viro@zeniv.linux.org.uk, brauner@kernel.org, dchinner@redhat.com, jack@suse.cz, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-fsdevel@vger.kernel.org, tytso@mit.edu, jbongio@google.com, linux-scsi@vger.kernel.org, ojaswin@linux.ibm.com, linux-aio@kvack.org, linux-btrfs@vger.kernel.org, io-uring@vger.kernel.org, nilay@linux.ibm.com, ritesh.list@gmail.com, Prasad Singamsetty Subject: Re: [PATCH v4 06/11] block: Add atomic write support for statx Message-ID: <20240220082902.GC13785@lst.de> References: <20240219130109.341523-1-john.g.garry@oracle.com> <20240219130109.341523-7-john.g.garry@oracle.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: <20240219130109.341523-7-john.g.garry@oracle.com> User-Agent: Mutt/1.5.17 (2007-11-01) > +#define BDEV_STATX_SUPPORTED_MASK (STATX_DIOALIGN | STATX_WRITE_ATOMIC) > + if (!(request_mask & BDEV_STATX_SUPPORTED_MASK)) > + return; BDEV_STATX_SUPPORTED_MASK is misleading here. bdevs support a lot more fields, these are just the ones needing special attention. I'd do away with the extra define and just open code it. > + /* If this is a block device inode, override the filesystem > + * attributes with the block device specific parameters > + * that need to be obtained from the bdev backing inode > + */ This is not the normal kernel multi-line comment format. > + if (S_ISBLK(d_backing_inode(path.dentry)->i_mode)) > + bdev_statx(path.dentry, stat, request_mask); I know I touched this last, but does anyone remember why we have various random fixups in vfs_statx and not in vfs_getattr_nosec, where they we have more of them and also the inode at hand?