[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YqpzqZQgu0Zz+vW1@sol.localdomain>
Date: Wed, 15 Jun 2022 17:04:57 -0700
From: Eric Biggers <ebiggers@...nel.org>
To: Christoph Hellwig <hch@...radead.org>
Cc: Dave Chinner <david@...morbit.com>,
"Darrick J. Wong" <djwong@...nel.org>,
linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net, linux-xfs@...r.kernel.org,
linux-api@...r.kernel.org, linux-fscrypt@...r.kernel.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
Keith Busch <kbusch@...nel.org>
Subject: Re: [RFC PATCH v2 1/7] statx: add I/O alignment information
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
Powered by blists - more mailing lists