Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2378029ioo; Sat, 28 May 2022 11:47:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydTwv6cT1QamCz6Kdi+DgfVPeCu5Z9BgNpRjTHwIDoGrijbX7uBPOlpgA9FFEFM4kz75Kc X-Received: by 2002:a05:6402:84a:b0:423:fe99:8c53 with SMTP id b10-20020a056402084a00b00423fe998c53mr50118722edz.195.1653763620540; Sat, 28 May 2022 11:47:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653763620; cv=none; d=google.com; s=arc-20160816; b=Vv2GvS0EarzqFkt+bSgIItgWjckEANbs69zECiIsswGDzXWSWmZRfsmQY+z3HxVAH4 fD3xA6LdYdrPZsP9rKa0lQHlAErt2xjclEKMaiNpt/2Nb/KcTf/k//E5HlgvWYXmPT+k 6iapxgJ3g81d5yz+kOiZfmWKgrGIt0ujak8rMdLifcFOrpNsyhzCUtWCSpgJX6de1fAr u4vMpc1n8SBGj+8Ys17wAjeS4GU0bbEo0Wey/jTgR6yvmxcI9dkFwDGoZ3bSKOsfxd+t tCHdIGricMvli0Z8eVuPG3SxhHsJJUCHfjkg3Zn+5bfu68vf36IlWyjVb5mvcKD4UOL9 3ypQ== 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=zDBvnmQprD7jxgY8atjChsi7uYJY9l7EGb5ySWRzNTU=; b=uPCIgBrNgxJ8r8aM3+eydul03WtbOOuGPh4/6IAOHme3w85vuIM+r2RUWloyDuB9JU bf0VOHOYqbgKwAzhq1zP4OHNpihHaw6rglwOlHV3EmCHp4LPl7+qLxNCRxtb4XMhwdMo FuvHKYkWtXeMDtUc+hryqDzzWzCLoyOq4Vs0hbUM6JBcByKhiQ7p6G0MLXlD82EPFg0v HBA9/vWX4Iu47u5VCI1rgwca1mjly5S27VcIoDURka1EIy+MLSmVqfREVfDVgusSyfdg g2IcY2CR9OYJMqIX4FRauzdnAiQNWXsvApgoAESbPQ0lY0+nMw3LOpHnPhjuRoLMmGRb tHVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nbanzFw6; spf=softfail (google.com: domain of transitioning linux-ext4-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id a24-20020a50e718000000b0042bcbb48fe4si6912537edn.240.2022.05.28.11.47.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 11:47:00 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-ext4-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nbanzFw6; spf=softfail (google.com: domain of transitioning linux-ext4-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B7FCB23BF7; Sat, 28 May 2022 11:36:54 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242925AbiE0QW6 (ORCPT + 99 others); Fri, 27 May 2022 12:22:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232903AbiE0QW5 (ORCPT ); Fri, 27 May 2022 12:22:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B043C403C6; Fri, 27 May 2022 09:22:56 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 4CD0E61DDB; Fri, 27 May 2022 16:22:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99ED1C385A9; Fri, 27 May 2022 16:22:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653668575; bh=8XAC02Xg3Py4hds1HUWlnnOVkjDum3hK8PsY6LQ/M1I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nbanzFw6hk+ZxmKvBYBHJvrevsjnL/H+zkSXoD9fxEqQWa7YQ/GM2r6J2flebnNPk NPe+mNUtTNeKCCPHpf61gVNd7xWNTcyonFkBcaeqXmsOROx2Ap0VSGkpyGvAJurXaJ 5ajqSsKilEN0lvcbMrGl0mLjavEHF4KFROBKRTL2fVZsqYOy5Zzvi56y3UKk8c6TXn L6BQzUAinNqQ0mKfP7nt6aqyxJT9lbnXadeQhxBkRQRKxxjgLiIzD9tfJGcqEM4P+B GAlP947kLR30hrfGsg9aVcc34w4x2YXwmE8rlgwV+ki8cEbsPdRfrkMTujtXO1bTzb lT0LXL87H+JvQ== Date: Fri, 27 May 2022 09:22:54 -0700 From: "Darrick J. Wong" To: Florian Weimer 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: [RFC PATCH v2 1/7] statx: add I/O alignment information Message-ID: References: <20220518235011.153058-1-ebiggers@kernel.org> <20220518235011.153058-2-ebiggers@kernel.org> <87r14ffivd.fsf@oldenburg.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87r14ffivd.fsf@oldenburg.str.redhat.com> X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Fri, May 27, 2022 at 11:02:46AM +0200, Florian Weimer wrote: > * Eric Biggers: > > > diff --git a/include/uapi/linux/stat.h b/include/uapi/linux/stat.h > > index 1500a0f58041a..f822b23e81091 100644 > > --- a/include/uapi/linux/stat.h > > +++ b/include/uapi/linux/stat.h > > @@ -124,9 +124,13 @@ struct statx { > > __u32 stx_dev_minor; > > /* 0x90 */ > > __u64 stx_mnt_id; > > - __u64 __spare2; > > + __u32 stx_mem_align_dio; /* Memory buffer alignment for direct I/O */ > > + __u32 stx_offset_align_dio; /* File offset alignment for direct I/O */ > > /* 0xa0 */ > > - __u64 __spare3[12]; /* Spare space for future expansion */ > > + __u32 stx_offset_align_optimal; /* Optimal file offset alignment for I/O */ > > + __u32 __spare2; > > + /* 0xa8 */ > > + __u64 __spare3[11]; /* Spare space for future expansion */ > > /* 0x100 */ > > }; > > Are 32 bits enough? Would it make sense to store the base-2 logarithm > instead? I don't think a log2 will work here, XFS will want to report things like raid stripe sizes, which can be any multiple of the fs blocksize. 32 bits is probably enough, seeing as the kernel won't do an IO larger than 2GB anyway. --D > Thanks, > Florian >