public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Jaegeuk Kim <jaegeuk.kim@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Jaegeuk Kim <jaegeuk.kim@samsung.com>,
	"'Vyacheslav Dubeyko'" <slava@dubeyko.com>,
	viro@zeniv.linux.org.uk, "'Theodore Ts'o'" <tytso@mit.edu>,
	gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	chur.lee@samsung.com, cm224.lee@samsung.com,
	jooyoung.hwang@samsung.com
Subject: Re: [PATCH 11/16] f2fs: add inode operations for special inodes
Date: Wed, 17 Oct 2012 09:54:10 +1100	[thread overview]
Message-ID: <20121016225410.GA26797@dastard> (raw)
In-Reply-To: <1350426621.1958.119.camel@kjgkr>

On Wed, Oct 17, 2012 at 07:30:21AM +0900, Jaegeuk Kim wrote:
> > > > OTOH, I think xattr itself is for users, not for communicating
> > > > between file system and users.
> > > 
> > > No, you are mistaken in that point, as Dave explained.
> > 
> > e.g. selinux, IMA, ACLs, capabilities, etc all communicate
> > information that the kernel uses for access control. That's why
> > xattrs have different namespaces like "system", "security" and
> > "user". Only user attributes are truly for user data
> > - the rest are for communicating information to the kernel....
> > 
> 
> I agree that "system" is used by kernel.
> How about the file system view?

Not sure what you mean - the filesystem woul dsimply read the xattrs
in the system namespace as it needs, just like the other subsystems
like selinux or IMA do.

> Would you explain what file systems retrieve xattrs and use
> them with their own purpose?

I think cachefs users a "CacheFiles.cache" namespace for storing
information it needs in xattrs. ecryptfs stores crypto metadata in
xattrs in the lower filesytem. NFSv4 servers store junction mount
information in xattrs.

So there are examples where filesystems use xattrs for special
information. However, in most cases filesystems don't need xattrs
for their own metadata primarily because that gets added to their
own on-disk formats. IThe above are all "overlay" style filesystems
that don't have their own on-disk formats, so need to use xattrs to
store their per-inode metadata.

The case of access hints and allocation policies are not somethign
that are native to any filesystem on-disk format. They are abstract
concepts that really only the software generating/using that
information knows about. Given we want the software that uses this
information to be in VFS, it is separate from every filesystem and
this is exactly the use case that system xattrs were intended for.
:)

> Sorry, I'm not familiar with xattrs in depth.
> 
> Unfortunately, "system" is not implemented in f2fs yet. :(

If you've already implemented the user.* namespace, then it's
trivial to support the other namespaces - it's just prefixing the
xattrs with the appropriate string instead of "user"....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2012-10-16 22:54 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-05 12:03 [PATCH 11/16] f2fs: add inode operations for special inodes 김재극
2012-10-06 18:59 ` Al Viro
2012-10-13 20:52 ` Arnd Bergmann
2012-10-13 21:57   ` Vyacheslav Dubeyko
2012-10-13 22:21   ` Vyacheslav Dubeyko
2012-10-14  7:09     ` Jaegeuk Kim
2012-10-14 12:06       ` Vyacheslav Dubeyko
2012-10-14 15:19         ` Arnd Bergmann
     [not found]           ` <CAN863PuYDSSFmaKtsVvdX4aFpS8hAMvFmhJpsky0x=ySn0QsqQ@mail.gmail.com>
2012-10-15 14:05             ` Arnd Bergmann
2012-10-16  2:29               ` Jaegeuk Kim
2012-10-16 16:14                 ` Arnd Bergmann
2012-10-16 21:43                   ` Jaegeuk Kim
2012-10-17  3:44                     ` Jaegeuk Kim
2012-10-17 12:22                       ` Arnd Bergmann
2012-10-17  8:35                     ` Arnd Bergmann
2012-10-15 22:34           ` Dave Chinner
2012-10-16  2:00             ` Jaegeuk Kim
2012-10-16 11:38               ` Arnd Bergmann
2012-10-16 20:38                 ` Jaegeuk Kim
2012-10-17 12:25                   ` Arnd Bergmann
2012-10-18  5:37                     ` Jaegeuk Kim
2012-10-16 20:44                 ` Dave Chinner
2012-10-16 22:30                   ` Jaegeuk Kim
2012-10-16 22:54                     ` Dave Chinner [this message]
2012-10-17  3:25                       ` Jaegeuk Kim
2012-10-17 12:50                     ` Arnd Bergmann
2012-10-24  2:49                       ` Dave Chinner
2012-10-24 12:02                         ` Arnd Bergmann
2012-10-14  6:51   ` Jaegeuk Kim

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=20121016225410.GA26797@dastard \
    --to=david@fromorbit.com \
    --cc=arnd@arndb.de \
    --cc=chur.lee@samsung.com \
    --cc=cm224.lee@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jaegeuk.kim@gmail.com \
    --cc=jaegeuk.kim@samsung.com \
    --cc=jooyoung.hwang@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=slava@dubeyko.com \
    --cc=tytso@mit.edu \
    --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