Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp971294iog; Wed, 15 Jun 2022 17:06:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uZ6qxFGMhZex9YY5STHRMGvZ8isLO+CdNsVtV2K+NePFY3X+TDW4JCIPljNqqIQTbZh7P+ X-Received: by 2002:a17:90b:180e:b0:1e8:3023:eeb9 with SMTP id lw14-20020a17090b180e00b001e83023eeb9mr2044457pjb.55.1655337964151; Wed, 15 Jun 2022 17:06:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655337964; cv=none; d=google.com; s=arc-20160816; b=ssNZ+PoZBpzw7niiqD/DMvJ98HVf2dY0FVL0wmvFlLr8IjvHrgNhBBE+L31o00LGTW jHBL/Uhnw9zoZTZNKHKpd8oOoFWjFKiYMiUR/iSLNkpEL0G8Sm+CPGSYTHNXqnD0LqD+ eHTeYb5BUPq3oIRlokaHAhKXn9XHhbFAs0JMxoUndBVEzE8m0Fib0CniKHCz2535qZlF 06HPpmlpBiW3FHiHfHURrvHPFDmkDKy71XsokkvUbelI0WOO6RICRgFpbZfyBHYDe232 u6C9IaD4mm4+zgMzXBd3azq1SYutoWOUIrUsMg7U1O04yNwZfNetX3kJCliNYLwbUOJ8 GeFA== 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=TjrLziy58ZPaAU3v+9B9SU6cvHeqP5a6AK4pBCNtki4=; b=GAgyegpV2MBV1/mC9fY4TPb6g9MjBB6zv7NEXqByU3SH3D6XIEMA04HkHK/ykEE2g0 rbx8upp6NDwr9MZJFgJWphLagJUgjAmPl4DWEb8wPW+VS07So0Vbp3mcN4z7692CjmcC TcmPFDG28k90FYgcozPG6c/QneuLc9Iiavp/LxD0yUGMXSSVOSrnHLxy1k4tamuErlZh 4U+guPw/QyMLNFS5MeW2ro+mLPZlvhHdYTEqNMTRHOFfaL1DmYRpH807gy62797E95ih 7+nncNy9UnVSMkG7thK3nI+jqRqDB8x/z/JgJou6f8RId961gXofBq4XXDYDfxGDT3k7 mvDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jgVdLgvp; 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 b7-20020a170902e94700b0015e8daafcb0si445921pll.239.2022.06.15.17.05.38; Wed, 15 Jun 2022 17:06:04 -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=jgVdLgvp; 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 S1349590AbiFPAFK (ORCPT + 99 others); Wed, 15 Jun 2022 20:05:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236390AbiFPAFJ (ORCPT ); Wed, 15 Jun 2022 20:05:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 809BD54FB2; Wed, 15 Jun 2022 17:05:00 -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 25BCA61A77; Thu, 16 Jun 2022 00:05:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DE0FC3411A; Thu, 16 Jun 2022 00:04:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655337899; bh=twKDf6UE+kS3vngFTnZTxVTzoWdtagr989JXNITgwOw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jgVdLgvp0/JpnSn+TbW+19ECVOHgg2dvTd36K9dJ22dJewyA3ZwH85RLqqQhJ4rwu eQRyLfRWbmNBVSY1p7ja1StME1gpGVXoweCk085gvuq5K3fYghi7s3zN8llC5NB4DT 7wMD56EHiUonIGs1WJIuErOZsdSVBXzjwJossod7XVa/UXSqTAr+0i+J9fC9mSo86u MC0so6r8yjPi2hY2EBAN05ziiHSbiTb48hzbZsYl8kqWGa29RP58h+SFfWlo9UOmhj mkduUSoEiKc7lQO9oM1+UBROu6epiy9J3JLrz6s5NI0683ClKMWFzU9kyryIEZ0z5n RaO3GdDZGXmCw== Date: Wed, 15 Jun 2022 17:04:57 -0700 From: Eric Biggers To: Christoph Hellwig Cc: Dave Chinner , "Darrick J. Wong" , 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> <20220520032739.GB1098723@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-8.3 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 Wed, Jun 15, 2022 at 06:12:04AM -0700, Christoph Hellwig wrote: > On Mon, Jun 13, 2022 at 10:25:12PM -0700, Eric Biggers wrote: > > While working on the man-pages update, I'm having second thoughts about the > > stx_offset_align_optimal field. Does any filesystem other than XFS actually > > want stx_offset_align_optimal, when st[x]_blksize already exists? Many network > > filesystems, as well as tmpfs when hugepages are enabled, already report large > > (megabytes) sizes in st[x]_blksize. And all documentation I looked at (man > > pages for Linux, POSIX, FreeBSD, NetBSD, macOS) documents st_blksize as > > something like "the preferred blocksize for efficient I/O". It's never > > documented as being limited to PAGE_SIZE, which makes sense because it's not. > > Yes. While st_blksize is utterly misnamed, it has always aways been > the optimal I/O size. > > > Perhaps for now we should just add STATX_DIOALIGN instead of STATX_IOALIGN, > > leaving out the stx_offset_align_optimal field? What do people think? > > Yes, this sounds like a good plan. One more thing. I'm trying to add support for STATX_DIOALIGN on block devices. Unfortunately I don't think it is going to work, at all, since the inode is for the device node and not the block device itself. This is true even after the file is opened (I previously thought that at least that case would work). Were you expecting that this would work on block devices? It seems they will need a different API -- a new BLK* ioctl, or files in /sys/block/$dev/queue. - Eric