linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: linux-cifs@vger.kernel.org, linux-api@vger.kernel.org,
	samba-technical@lists.samba.org, linux-kernel@vger.kernel.org,
	dhowells@redhat.com, linux-fsdevel@vger.kernel.org,
	linux-ext4@vger.kernel.org
Subject: Re: [PATCH] Add a pair of system calls to make extended file stats available [ver #3]
Date: Mon, 05 Jul 2010 15:59:49 +0100	[thread overview]
Message-ID: <4859.1278341989@redhat.com> (raw)
In-Reply-To: <AANLkTinms69HPgZF4blqr962Ami3oS9FC-txQj9P37SC@mail.gmail.com>

Michael Kerrisk <mtk.manpages@gmail.com> wrote:

> * Include information from the "inode_info" structure, most notably
> i_flags, but perhaps other info as well.

This thought has occurred to me, but are the contents of i_flags identical for
all filesystems?  Certainly, i_flags doesn't seem to match the FS_IOC_GETFLAGS
mask.  For example:

	#define	FS_SECRM_FL			0x00000001

vs:

	#define S_SYNC		1	/* Writes are synced at once */

I've also been asked to provide st_flags as for BSD, which aren't compatible
either:-/.

Some questions:

 (1) Does it make sense to rearrange the S_xxxx flags to match the numbers for
     FS_xxxx_FL?

 (2) Does it make sense to do the BSD st_flags compatibility in userspace?

 (3) Can we add a couple more flags to make Samba's life easier?  Say an
     archived bit and a hidden bit?

 (4) Do I actually need to provide a mask saying what st_flags are applicable
     to the file you've just queried?

 (5) How often are these flags required?  E.g. does it make more sense to keep
     them as an additional result, or does it make sense to stick them in the
     kstat and xstat structs, knowing that these are allocated on the kernel
     stack maybe as three times if an ecryptfs file?

> * Return a bit mask indicating the presence of additional information
> associated with the i-node. Here, I am thinking of flags that indicate
> that the file has any of the following: capabilities, an ACL, and
> extended attributes (obviously a superset of the previous). I could
> imagine some apps that, having got the xstat info, would be interested
> to obtain some of this other info.
> 
> Obviously, the above only make sense if the overhead of providing the
> extra information is low.

That might make sense as an 'additional result'.  These things may have to be
probed for on disk or on a server, so you might not want to return them by
default, and you may want to indicate what the filesystem can support vs what
the file actually has:

	u64	st_fs_additional_info;	/* what the filesystem supports */
	u64	st_file_additional_info; /* what the file actually has */

	#define XST_ADDINFO_CAPABILITY_MASK
	#define XST_ADDINFO_ACL
	#define XST_ADDINFO_XATTRS
	#define XST_ADDINFO_SECLABEL

David

  parent reply	other threads:[~2010-07-05 14:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100630233614.32422.97038.stgit@warthog.procyon.org.uk>
     [not found] ` <20100630233614.32422.97038.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2010-07-02  5:36   ` [PATCH] Add a pair of system calls to make extended file stats available [ver #3] Michael Kerrisk
2010-07-02 15:49     ` Andreas Dilger
2010-07-04  4:33     ` Michael Kerrisk
2010-07-05 14:59 ` David Howells [this message]
     [not found]   ` <4859.1278341989-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-07-07 14:57     ` Andreas Dilger
     [not found]   ` <9A36AB6B-7EC3-4789-89CD-D00715BEF34C-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org>
2010-07-07 15:28     ` David Howells
2010-07-08 19:44 ` Michael Kerrisk
2010-07-09 13:59 ` David Howells

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=4859.1278341989@redhat.com \
    --to=dhowells@redhat.com \
    --cc=linux-api@vger.kernel.org \
    --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=mtk.manpages@gmail.com \
    --cc=samba-technical@lists.samba.org \
    /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).