linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Ulrich Drepper <drepper@gmail.com>
Cc: dhowells@redhat.com, viro@zeniv.linux.org.uk, smfrench@gmail.com,
	jlayton@redhat.com, mcao@us.ibm.com,
	aneesh.kumar@linux.vnet.ibm.com, linux-cifs@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	samba-technical@lists.samba.org, sjayaraman@suse.de,
	linux-ext4@vger.kernel.org
Subject: Re: [PATCH 3/3] Add a pair of system calls to make extended file stats available
Date: Tue, 29 Jun 2010 23:36:56 +0100	[thread overview]
Message-ID: <26026.1277851016@redhat.com> (raw)
In-Reply-To: <AANLkTimSU_pCXW5zR8__Q3-fzgxwEUX8rPqLeZtPD_hX@mail.gmail.com>

Ulrich Drepper <drepper@gmail.com> wrote:

> On Tue, Jun 29, 2010 at 13:03, David Howells <dhowells@redhat.com> wrote:
> > Add a pair of system calls to make extended file stats available,
> > including file creation time, inode version and data version where
> > available through the underlying filesystem:
> 
> If you add something like this you might want to integrate another
> extension.  This has been discussed a long time ago.  In almost no
> situation all the information is needed.  Some of the pieces of
> information returned by the syscall might be harder to collect than
> other.

Trond mentioned this:

	There has been a lot of interest in allowing the user to specify
	exactly which fields they want the filesystem to return, and whether
	or not the kernel can use cached data or not. The main use is to allow
	specification of a 'stat light' that could help speed up
	"readdir()+multiple stat()" type queries. At last year's Filesystem
	and Storage Workshop, Mark Fasheh actually came up with an initial
	design:

	  http://www.kerneltrap.com/mailarchive/linux-fsdevel/2009/4/7/5427274

It'd be easy enough to absorb the functionality from that patch.

> It makes sense in such a situation to allow the caller to specify what she
> is interested in.  A bitmask of some sort.

I have one of those.  See the query_flags field.  One question, though, is how
to break things down.  Obvious groupings of the already extant stat stuff
might be:

	- st_dev, st_ino, st_mode, st_nlink, st_uid, st_gid, st_rdev, st_size
	- st_block, st_blksize
	- st_atime, st_mtime, st_ctime

However, what seems obvious to me might not be for some netfs or other.

> For this the syscall interface should have a parameter to specify what
> is requested and the stat-like structure should have a field
> specifying what is actually present.  The latter bitmask must be a
> superset of the former.

Got that.

> Previous discussions centered around reusing the stat data structure
> and somehow make it work.  But no clean solution was found.  If a new
> structure is added anyway this could solve the issue.

That's what I thought.  Linux has a tangled mess of stat structs:-/

> And while you're at it, maybe some spare fields at the end are nice.

I made it so that the syscall can return variable length data: the main xstat
struct, plus extra records yet to be defined.  They could even be variable
length and assembled/disassembled with something like the control message
macros for recvmsg().

David

  parent reply	other threads:[~2010-06-29 22:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-29 20:02 [PATCH 0/3] Extended file stat functions David Howells
2010-06-29 20:03 ` [PATCH 1/3] Mark arguments to certain syscalls as being const David Howells
2010-06-29 20:03 ` [PATCH 2/3] AFS: Use i_generation not i_version for the vnode uniquifier David Howells
2010-06-29 20:23 ` [PATCH 0/3] Extended file stat functions Steve French
     [not found] ` <20100629200259.23196.81509.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2010-06-29 20:03   ` [PATCH 3/3] Add a pair of system calls to make extended file stats available David Howells
     [not found]     ` <20100629200315.23196.68742.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2010-06-29 22:13       ` Ulrich Drepper
     [not found]         ` <AANLkTimSU_pCXW5zR8__Q3-fzgxwEUX8rPqLeZtPD_hX-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-29 22:33           ` Steve French
2010-06-30  8:20       ` Arnd Bergmann
2010-06-29 22:36     ` David Howells [this message]
     [not found]       ` <26026.1277851016-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-06-29 22:48         ` Joel Becker
2010-06-29 22:48       ` Sage Weil
     [not found]       ` <20100629224844.GF4150-0Ol/1UON5C7fiIqoQl7HmA@public.gmane.org>
2010-06-29 23:29         ` David Howells
     [not found]           ` <32322.1277854192-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-07-01  1:12             ` Joel Becker
2010-06-30  8:59     ` David Howells
2010-06-29 20:28   ` [PATCH 0/3] Extended file stat functions Trond Myklebust
     [not found] ` <AANLkTimIh9ZAasPnN5xxGxbupwkct7UihHcMe26r-MD7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-29 20:41   ` David Howells
2010-06-29 20:50 ` David Howells
2010-06-29 21:07 ` Bernd Schubert
     [not found] ` <201006292307.42440.bernd.schubert-97jfqw80gc6171pxa8y+qA@public.gmane.org>
2010-06-29 21:11   ` David Howells
     [not found]     ` <24517.1277845879-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-06-29 21:24       ` Bernd Schubert
2010-06-29 21:28     ` David Howells
2010-06-29 21:53       ` Bernd Schubert
2010-06-29 22:59       ` Maciej W. Rozycki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26026.1277851016@redhat.com \
    --to=dhowells@redhat.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=drepper@gmail.com \
    --cc=jlayton@redhat.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcao@us.ibm.com \
    --cc=samba-technical@lists.samba.org \
    --cc=sjayaraman@suse.de \
    --cc=smfrench@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).