Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1903667iog; Sun, 26 Jun 2022 01:03:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uyFoazmVq0t69XW+8ejdUyPjEnHwqq+eQN5BbHqsIW712ijhe3B6wDeZb/nhn7ze6pwhLT X-Received: by 2002:a17:90b:1c02:b0:1ed:4bfb:7772 with SMTP id oc2-20020a17090b1c0200b001ed4bfb7772mr5144758pjb.139.1656230617507; Sun, 26 Jun 2022 01:03:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656230617; cv=none; d=google.com; s=arc-20160816; b=EuQZrxYU2AXRqTVSl340SxizNxgw+1GZ9On0je8SFBdHZZ8wYlAoDAS0pwnnzzlAeb ZOO6+LlwvxGOywc+fiYRpIhwqNFQWdaVPJroxDtaob2hInjVnUjocZxcLWfRyjIXfYUb j5ImhDb95r3wXA7sVW/eVdtsZnwJuyTLSWyePHOxqAdGTNE/r6JTBwxgqGmbnWIQvW7R qzmZwgrhvK6JMv+3cliDO9YjEGXYTClcs1MQn6P4IF5RRtUz+DM2L417AuOKUq01oCy1 6+H4eH+K3hnQILhqej88OgYGkfgiiuj7sP5Lu09MIvqHFpmNRgfNU5L9b7uWY3CaksYs n6sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=SK+swlcj6rLcYyyEH22hFIwnnjq41UijC+puP+o30FM=; b=0TtenIQhcRIu4i1yumrXR+4H6iHQiC8z5NQATs9yTeAsFDV1IRDqEErF5/xoBkNEro FChiwVr2HAB4KcQZj4iBRtXlo0B2N4ERlteXHgVM03GYazTXGmKoex/zj6aliWqufvKG Qr8w73xybW8wwsyWykZkafqwYEHNBZDHGDIj9YUYlDuH7d0iBDaFI/+9tUScIM9rxa1d cwf2tKqNXfPl4CvQYXLLKWGbZ0ntnfEJwlwQAlzRcXEzbCFjqYYqe8WUiG7Zvl7Ib4Af 4v9+llzboLM3Kk4jJofBSmDXzxpNpbaH5u1RSfwtLYDHMC9425pbkggpVOp5beUsZoue oV6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=wN58s+9L; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y24-20020a631818000000b0040ca30ff16esi8313283pgl.205.2022.06.26.01.03.24; Sun, 26 Jun 2022 01:03:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=wN58s+9L; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234045AbiFZICZ (ORCPT + 99 others); Sun, 26 Jun 2022 04:02:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233922AbiFZICY (ORCPT ); Sun, 26 Jun 2022 04:02:24 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62A5912D21; Sun, 26 Jun 2022 01:02:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=SK+swlcj6rLcYyyEH22hFIwnnjq41UijC+puP+o30FM=; b=wN58s+9LPW73zb5DoSpwvMBn9P O/0NbR77FfD6DhAmB+MTVnzTVn8/OfidqNggFO2TJyTP3S4XOhaiKax3LUFsBYb4ecM+vYKuy17ps XfP6jWHbB8eIpF2w9OzL9re1M/XfHRq4g8WaXepqS5sdNIn7YVYWBEAYYTJLYHc0l+orBDSeW/s9Y sDQ9RLe/7W0KZO3jhcRkotRD33Ygde6DunnVQAzX/kqS0jsMFPH6vT/QGaNF6eT31kMkfYYJEiTBN WVYRtwkq2pzsOM6jx/SVS4iEfk0a+8LJxrt8Kf4MHvo8TO86kVLBLNDyjUyEA675JY82UgpOEawTn jEluIU6w==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o5NDr-00AWLf-UX; Sun, 26 Jun 2022 08:02:23 +0000 Date: Sun, 26 Jun 2022 01:02:23 -0700 From: Christoph Hellwig To: "Darrick J. Wong" Cc: Eric Biggers , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-xfs@vger.kernel.org, linux-api@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Keith Busch Subject: Re: [PATCH v3 1/8] statx: add direct I/O alignment information Message-ID: References: <20220616201506.124209-1-ebiggers@kernel.org> <20220616201506.124209-2-ebiggers@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Jun 23, 2022 at 08:58:12AM -0700, Darrick J. Wong wrote: > Hmm. Does the XFS port of XFS_IOC_DIOINFO to STATX_DIOALIGN look like > this? > > struct xfs_buftarg *target = xfs_inode_buftarg(ip); > > kstat.dio_mem_align = target->bt_logical_sectorsize; > kstat.dio_offset_align = target->bt_logical_sectorsize; > kstat.result_mask |= STATX_DIOALIGN; Yes, I think so. And it would be very good to include the XFS conversion with this series as the only file systems that already supports reporting alignment constraints. I also suspect that lifting XFS_IOC_DIOINFO to common code by calling ->getattr would be useful because now all existing software using that will also do the right thing on ext4 and f2fs now.