From: Tiger Yang <tiger.yang@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 7/8] ocfs2: Add extended attributes support. v1
Date: Wed, 18 Jun 2008 17:30:21 +0800 [thread overview]
Message-ID: <4858D5AD.4010405@oracle.com> (raw)
In-Reply-To: <20080617175903.GC28100@wotan.suse.de>
Mark Fasheh wrote:
>> Go ahead and add a field to record inline xattr size on the inode. For now,
>> if we're going to take some space for inline EA, you will always just set it
>> to osb->s_min_inline_xattr, which is always OCFS2_MIN_XATTR_INLINE_SIZE.
>>
>> So, use osb->s_min_inline_xattr to figure out whether there's enough space
>> in the inode for xattrs and set the initial inode field based on it. But
>> after that, use i_inline_xattr_size (or whatever you call it) to figure out
>> offset to start in the inode from the end of block, how many bytes to scan,
>> etc.
>>
>> The two reasons I think this is a good idea:
>>
>> - The inline xattr data size is explicitely stored on disk, as opposed to
>> being assumed from a constant stored in memory.
>>
>> - We don't have to rely on the minimum size to stay the same for all inodes on
>> a file system. If we need to tune defaults, this becomes much easier if
>> new inodes can just inherit the new value without affecting existing ones.
>>
Thanks your suggestion, Your idea make me thought more about this.
ocfs2-tools:
1. In mkfs.ocfs2, we set OCFS2_FEATURE_INCOMPAT_XATTR flag in
ocfs2_super_block->s_feature_incompat.
This flag protect EAs value blocks (clusters) not released by old
version fsck.ocfs2.
2. In mkfs.ocfs2, we set OCFS2_XATTR_INLINE_SIZE (current is 256) into a
field in ocfs2_super_block, say s_xattr_inline_size.
3. Tunefs.ocfs2 could set those flag and value on formatted ocfs2 partition.
kernel modules:
OCFS2_FEATURE_INCOMPAT_XATTR flag could prevent old kernel module mount
ocfs2 file system which already has EAs in it. Because they don't know
the xattr existed, they may destroy the inline xattr.
We will check OCFS2_FEATURE_INCOMPAT_XATTR flag when we try to set
xattr. This means we can mount the ocfs2 filesystem which didn't support
xattr, but can't set xattr in it. Because without
OCFS2_FEATURE_INCOMPAT_XATTR, the EAs value blocks could be destroyed
by fsck.ocfs2.
When we mount the ocfs2 filesystem which formated by new version
mkfs.ocfs2, our kernel module will set osb->s_xattr_inline_size
according to the on-disk super block. I am not sure whether all inode
in this file system could only use this value for xattr inline? I think
fixed xattr inline size in one file system can make things simple
because its convenient for calculate extent record count or inline data
size. So we can only change this value by tunefs.ocfs2 or mkfs.ocfs2.
Best regards,
tiger
next prev parent reply other threads:[~2008-06-18 9:30 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-05 7:16 [Ocfs2-devel] [PATCH 0/8] ocfs2: Add extended attributes for ocfs2. V1 Tao Ma
2008-06-05 7:24 ` [Ocfs2-devel] [PATCH 7/8] ocfs2: Add extended attributes support. v1 Tiger Yang
2008-06-13 3:22 ` Mark Fasheh
2008-06-16 7:18 ` Tao Ma
2008-06-16 10:22 ` Tiger Yang
2008-06-17 17:59 ` Mark Fasheh
2008-06-18 9:30 ` Tiger Yang [this message]
2008-06-17 23:32 ` Mark Fasheh
2008-06-27 7:49 ` Tiger Yang
2008-06-27 18:10 ` Mark Fasheh
2008-06-30 2:53 ` Tao Ma
2008-06-05 7:31 ` [Ocfs2-devel] [PATCH 1/8] Modify ocfs2_num_free_extents for future xattr usage.v1 Tao Ma
2008-06-05 7:32 ` [Ocfs2-devel] [PATCH 2/8] Use ocfs2_extent_list instead of ocfs2_dinode.v1 Tao Ma
2008-06-05 7:32 ` [Ocfs2-devel] [PATCH 3/8] Make ocfs2_lock_allocators generic for extent allocation.v1 Tao Ma
2008-06-11 23:31 ` Mark Fasheh
2008-06-12 1:40 ` Tao Ma
2008-06-12 23:51 ` Mark Fasheh
2008-06-05 7:33 ` [Ocfs2-devel] [PATCH 4/8] Make extend allocation generic.v1 Tao Ma
2008-06-12 20:59 ` Mark Fasheh
2008-06-13 2:08 ` Tao Ma
2008-06-05 7:33 ` [Ocfs2-devel] [PATCH 5/8] Add xattr header in ocfs2.v1 Tao Ma
2008-06-12 21:21 ` Mark Fasheh
2008-06-13 1:54 ` Tao Ma
2008-06-05 7:34 ` [Ocfs2-devel] [PATCH 6/8] Add extent tree operation for xattr value.v1 Tao Ma
2008-06-12 23:44 ` Mark Fasheh
2008-06-13 1:48 ` Tao Ma
2008-06-13 2:56 ` Mark Fasheh
2008-06-13 3:28 ` Tao Ma
2008-06-13 2:39 ` Mark Fasheh
2008-06-05 7:35 ` [Ocfs2-devel] [PATCH 8/8] Add large numbers of extended attributes support for ocfs2.v1 Tao Ma
2008-06-06 6:26 ` [Ocfs2-devel] [PATCH 8/8] (Imporved)Add " 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=4858D5AD.4010405@oracle.com \
--to=tiger.yang@oracle.com \
--cc=ocfs2-devel@oss.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.