linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tao Ma <tao.ma@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Tiger Yang <tiger.yang@oracle.com>,
	Mark Fasheh <mfasheh@suse.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	ocfs2-devel@oss.oracle.com
Subject: Re: [Ocfs2-devel] [PATCH 13/39] ocfs2: Add extended attribute support
Date: Wed, 08 Oct 2008 22:04:40 +0800	[thread overview]
Message-ID: <48ECBDF8.9060008@oracle.com> (raw)
In-Reply-To: <20081008133453.GH25392@lst.de>



Christoph Hellwig wrote:
> On Wed, Oct 08, 2008 at 09:56:41AM +0800, Tiger Yang wrote:
>> I have looked the patch for btrfs about this. We are different.
>> Btrfs store the whole xattr name including the prefix "user." 
>> "trusted.", we store index number instead of it.
> 
> I looked at the git tree and there are two users of
> ocfs2_xattr_handler().
> 
>  (1) for using the ->list handler in listattr.  That's something I fixed
>      in btrfs that I wanted to point you to.  The whole concept of a
>      ->list handler is stupid, and it was only added as a hack for
>      the tmpfs "generic" xattr support which is a mess.  Instead of
>      looking up a handler that would only do the same thing anyway
>      for all on-disk attributes just call the code directly and
>      have a map from index to prefix (look at
>      fs/xfs/linux-2.6/xfs_xattr.c for an example).  You
>      also have a check for OCFS2_MOUNT_NOUSERXATTR for the user
>      attributes, but that's much easier done by just checking the
>      index in an if (and I'd personally just kill it completely, the
>      options doesn't seem useful - but that's an unrelated bit)
yes, you are right. The handler for list is borrowed from ext3 and 
somewhat ugly. We just need the prefix name but use such a complicated 
method. Just a map from index to prefix should work fine.
>  
>  (2) For generating the hash.  I don't quite understand why you want to
>      also hash the prefix if it's not store on disk anyway but sorted
>      into the numeric buckets.
This is done intentionally. See the design doc 
http://oss.oracle.com/osswiki/OCFS2/DesignDocs/ExtendedAttributes.
"Each entry has a 32-bit hash value associated with it. The hash value 
is calculated using the full (prefix.suffix) name of the xattr to avoid 
hash collisions when the same suffix is used in multiple attribute 
namespaces. "
So Mark, do you think we need this prefix hash?
Anyway, if we make consensus that the hash calculation doesn't need 
prefix any more, we can remove the ocfs2_xattr_handler safely.

Regards,
Tao

  reply	other threads:[~2008-10-08 14:05 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-24 22:00 [PATCH 0/39] Ocfs2 updates for 2.6.28 Mark Fasheh
2008-09-24 22:00 ` [PATCH 01/39] ocfs2: POSIX file locks support Mark Fasheh
2008-10-02  6:11   ` Andrew Morton
2008-10-07 20:09     ` Mark Fasheh
2008-09-24 22:00 ` [PATCH 02/39] ocfs2: Track local alloc bits internally Mark Fasheh
2008-09-24 22:00 ` [PATCH 03/39] ocfs2: throttle back local alloc when low on disk space Mark Fasheh
2008-10-02  6:11   ` Andrew Morton
2008-09-24 22:00 ` [PATCH 04/39] ocfs2: track local alloc state via debugfs Mark Fasheh
2008-10-02  6:11   ` Andrew Morton
2008-10-07 20:10     ` Mark Fasheh
2008-09-24 22:00 ` [PATCH 05/39] ocfs2: Modify ocfs2_num_free_extents for future xattr usage Mark Fasheh
2008-09-24 22:00 ` [PATCH 06/39] ocfs2: Use ocfs2_extent_list instead of ocfs2_dinode Mark Fasheh
2008-09-24 22:00 ` [PATCH 07/39] ocfs2: Abstract ocfs2_extent_tree in b-tree operations Mark Fasheh
2008-09-24 22:00 ` [PATCH 08/39] ocfs2: Make high level btree extend code generic Mark Fasheh
2008-09-24 22:00 ` [PATCH 09/39] ocfs2: Add the basic xattr disk layout in ocfs2_fs.h Mark Fasheh
2008-09-24 22:00 ` [PATCH 10/39] ocfs2: Add helper function in uptodate.c for removing xattr clusters Mark Fasheh
2008-10-02  6:11   ` Andrew Morton
2008-10-07 20:18     ` Mark Fasheh
2008-09-24 22:00 ` [PATCH 11/39] ocfs2: Add extent tree operation for xattr value btrees Mark Fasheh
2008-10-02  6:12   ` Andrew Morton
2008-10-07 20:19     ` Mark Fasheh
2008-10-02  6:12   ` Andrew Morton
2008-10-07 21:19     ` Mark Fasheh
2008-09-24 22:00 ` [PATCH 12/39] ocfs2: reserve inline space for extended attribute Mark Fasheh
2008-09-24 22:00 ` [PATCH 13/39] ocfs2: Add extended attribute support Mark Fasheh
2008-10-02  6:12   ` Andrew Morton
2008-10-07 20:22     ` Mark Fasheh
2008-10-02  8:16   ` [Ocfs2-devel] " Christoph Hellwig
2008-10-07 22:08     ` Mark Fasheh
2008-10-08  1:56       ` Tiger Yang
2008-10-08 13:16         ` Christoph Hellwig
2008-10-08 13:34         ` Christoph Hellwig
2008-10-08 14:04           ` Tao Ma [this message]
2008-10-09  0:38             ` Mark Fasheh
2008-10-08 13:22       ` Christoph Hellwig
2008-09-24 22:00 ` [PATCH 14/39] ocfs2: Add xattr index tree operations Mark Fasheh
2008-09-24 22:00 ` [PATCH 15/39] ocfs2: Add xattr bucket iteration for large numbers of EAs Mark Fasheh
2008-09-24 22:00 ` [PATCH 16/39] ocfs2: Add xattr lookup code xattr btrees Mark Fasheh
2008-09-24 22:00 ` [PATCH 17/39] ocfs2: Optionally limit extent size in ocfs2_insert_extent() Mark Fasheh
2008-09-24 22:00 ` [PATCH 18/39] ocfs2: Enable xattr set in index btree Mark Fasheh
2008-09-24 22:01 ` [PATCH 19/39] ocfs2: Delete all xattr buckets during inode removal Mark Fasheh
2008-09-24 22:01 ` [PATCH 20/39] ocfs2: Add incompatible flag for extended attribute Mark Fasheh
2008-09-24 22:01 ` [PATCH 21/39] ocfs2: fix printk format warnings Mark Fasheh
2008-09-24 22:01 ` [PATCH 22/39] ocfs2: Prefix the extent tree operations structure Mark Fasheh
2008-09-24 22:01 ` [PATCH 23/39] ocfs2: Prefix the ocfs2_extent_tree structure Mark Fasheh
2008-09-24 22:01 ` [PATCH 24/39] ocfs2: Make ocfs2_extent_tree get/put instead of alloc Mark Fasheh
2008-09-24 22:01 ` [PATCH 25/39] ocfs2: Make 'private' into 'object' on ocfs2_extent_tree Mark Fasheh
2008-09-24 22:01 ` [PATCH 26/39] ocfs2: Provide the get_root_el() method to ocfs2_extent_tree_operations Mark Fasheh
2008-09-24 22:01 ` [PATCH 27/39] ocfs2: Use struct ocfs2_extent_tree in ocfs2_num_free_extents() Mark Fasheh
2008-09-24 22:01 ` [PATCH 28/39] ocfs2: Determine an extent tree's max_leaf_clusters in an et_op Mark Fasheh
2008-09-24 22:01 ` [PATCH 29/39] ocfs2: Create specific get_extent_tree functions Mark Fasheh
2008-09-24 22:01 ` [PATCH 30/39] ocfs2: Add an insertion check to ocfs2_extent_tree_operations Mark Fasheh
2008-09-24 22:01 ` [PATCH 31/39] ocfs2: Make ocfs2_extent_tree the first-class representation of a tree Mark Fasheh
2008-09-24 22:01 ` [PATCH 32/39] ocfs2: Comment struct ocfs2_extent_tree_operations Mark Fasheh
2008-09-24 22:01 ` [PATCH 33/39] ocfs2: Change ocfs2_get_*_extent_tree() to ocfs2_init_*_extent_tree() Mark Fasheh
2008-09-24 22:01 ` [PATCH 34/39] ocfs2: bug-fix for journal extend in xattr Mark Fasheh
2008-09-24 22:01 ` [PATCH 35/39] ocfs2: Resolve deadlock in ocfs2_xattr_free_block Mark Fasheh
2008-09-24 22:01 ` [PATCH 36/39] ocfs2: Limit inode allocation to 32bits Mark Fasheh
2008-09-24 22:01 ` [PATCH 37/39] ocfs2: Add the 'inode64' mount option Mark Fasheh
2008-09-24 22:01 ` [PATCH 38/39] ocfs2: Switch over to JBD2 Mark Fasheh
2008-09-24 22:01 ` [PATCH 39/39] ocfs2: Add xattr mount option in ocfs2_show_options() Mark Fasheh
2008-09-28  5:16 ` [PATCH 0/39] Ocfs2 updates for 2.6.28 Tao Ma

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=48ECBDF8.9060008@oracle.com \
    --to=tao.ma@oracle.com \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfasheh@suse.com \
    --cc=ocfs2-devel@oss.oracle.com \
    --cc=tiger.yang@oracle.com \
    /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).