Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6100420iog; Thu, 23 Jun 2022 11:19:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t6IPazERURf4BgBEeAoAxZ7x0/eO0acKb5oyeRJNrnSpTZcRNdZ+cnqCLKy86BM/Eu//wy X-Received: by 2002:a05:6402:11c7:b0:42e:c47a:ffdf with SMTP id j7-20020a05640211c700b0042ec47affdfmr12391883edw.113.1656008362243; Thu, 23 Jun 2022 11:19:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656008362; cv=none; d=google.com; s=arc-20160816; b=GLZszF5iq0gLF/UlY8HJc9/ej/PvVXTWAy3PZCSGCbOInaUzgTUZZ9Ml14Q3RGvkAq wVVW+nPoASNRpnt447Ju+LojybOsZ5RtKZQzcqJotl/+R1G+pSGwCXRhKTAt5eb64vSv kclJr96zxq8OY0535t54eOFVB6auAkzcPXiH51rtIqIKnoPSBKVcfAv4EyJqUs7q5MlV xejiDDfnHxyVaxDBk1XRRI4/EDVPYgosWWLukJRr7RIMh3Ta9NYrUNvTnaZL2a1atV80 1J3SA5wZOm3ulX06mwTj3OiuG/yHhjrr0PgkIb3H5py1B5PshguAH296l7e6c0icKDOs ghBw== 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=9l89qyGbBGPiEsudUcvyHOzT5am4ksD2gPvevcRQpKo=; b=Lla/9oa3+c81k4epHrsGkJmBRKwWPLB9p3JbnzPQyER8mO0S6vu9NlsLFfH9XiWn8B WBrHqXcU4OE1BYCA68laEGiC9TbSM1ApojIWrkSj2bbjFid/4cW9H+yeBQYIC7QD/vhs 0plyjIU21G7I56pACqAuMQGU9skXPR2Ny9Uh0wVas7b0gMBSSY7CFaCuR2LoUZ5TO16H lHjmRnuGSIalSAm13XSVEIn+J4dbvvATO43bqfuEEuYuqAZlT7m6/lj6F2ikb8UN7rA0 prId/BtTzliNuc5Kl7D99hzj36cnlv9JTbE9P0tgvYZtQ88tCOFhoY5rIUyK1wQJuZ9I 11jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PyKKn5Am; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hu9-20020a170907a08900b00707f49cf9e6si22515451ejc.68.2022.06.23.11.18.50; Thu, 23 Jun 2022 11:19:22 -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=@kernel.org header.s=k20201202 header.b=PyKKn5Am; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236616AbiFWSSh (ORCPT + 99 others); Thu, 23 Jun 2022 14:18:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236852AbiFWSQt (ORCPT ); Thu, 23 Jun 2022 14:16:49 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 186994D9C9; Thu, 23 Jun 2022 10:23:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 22CD5B824BC; Thu, 23 Jun 2022 17:23:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 812B1C3411B; Thu, 23 Jun 2022 17:23:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656005002; bh=wHCbmf5IRU39rWTli2nZUaGZkhlxJIj37MxQFogSdEY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PyKKn5AmJY5LA84KqOczZyyRySup5L6Azsjk02/PDhbsW5QDnbgiunWdXq6+5Hdly so5Jt85YlQB9yKrlKNekvT01BKoj61uSsEu/gk7IN2BYRRSZpJ27dJHNI3qqcUG7Au zhBqRL1Qly6dDmbG/gEgCOJOudXz40JLfL6p+bxfc6GS+W4PIbHRpxLNi83ee1O/GS uP5kPq9auC78LW6pOr1jPPca7r7KzTXLrrbzcVjhNuSFmJf/idfZ+iKYrqA82FALa/ yKF7FO0a8934AaK2M+hpSsOnQSPqHVFK1nrJQcNXnJEua4rVcuQoWL5ptjezOKzdVE vp2zp8L/1LTLQ== Date: Thu, 23 Jun 2022 10:23:20 -0700 From: Eric Biggers To: "Darrick J. Wong" Cc: 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-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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: > > diff --git a/include/linux/stat.h b/include/linux/stat.h > > index 7df06931f25d8..ff277ced50e9f 100644 > > --- a/include/linux/stat.h > > +++ b/include/linux/stat.h > > @@ -50,6 +50,8 @@ struct kstat { > > struct timespec64 btime; /* File creation time */ > > u64 blocks; > > u64 mnt_id; > > + u32 dio_mem_align; > > + u32 dio_offset_align; > > 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. However, if we need more fields as Avi Kivity requested at https://lore.kernel.org/r/6c06b2d4-2d96-c4a6-7aca-5147a91e7cf2@scylladb.com that is going to complicate things. I haven't had a chance to look into whether those extra fields are really needed. Your opinion on whether XFS (and any other filesystem) needs them would be appreciated. > > And I guess you're tabling the "optimal" IO discussions for now, because > there are too many variants of what that means? > Yes, that's omitted for now due to the apparent redundancy with stx_blksize. - Eric