[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3434.1489664501@warthog.procyon.org.uk>
Date: Thu, 16 Mar 2017 11:41:41 +0000
From: David Howells <dhowells@...hat.com>
To: Eric Biggers <ebiggers3@...il.com>
Cc: dhowells@...hat.com, linux-fsdevel@...r.kernel.org,
Al Viro <viro@...iv.linux.org.uk>,
linux-kernel@...r.kernel.org, Eric Biggers <ebiggers@...gle.com>
Subject: Re: [PATCH v4] statx: optimize copy of struct statx to userspace
Eric Biggers <ebiggers3@...il.com> wrote:
> stat() instead initializes its struct on the stack and copies it to
> userspace with a single call to copy_to_user(). This turns out to be
> much faster, and changing statx to do this makes it almost as fast as
> stat:
I wonder if we actually need to copy __spare2 at the end. We could define any
future values added in there to be unset/undefined if the respective bits are
not set.
I would prefer it to be cleaner, however, and clear the unused space.
Another thought is does it make sense to rearrange struct kstat to mirror
the first part of struct statx so that this can be memcpy'd?
David
Powered by blists - more mailing lists