All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tiger Yang <tiger.yang@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 2/2] ocfs2-tools: Add extended attribute support in fsck.ocfs2
Date: Fri, 25 Jul 2008 16:56:04 +0800	[thread overview]
Message-ID: <48899524.3050805@oracle.com> (raw)
In-Reply-To: <48898644.9090307@oracle.com>


Tao Ma wrote:

>> +static inline int ocfs2_xattr_extent_recs_per_inode(int blocksize)
>> +{
>> +    int size;
>> +
>> +    size = blocksize - offsetof(struct ocfs2_xattr_block,
>> +                    xb_attrs.xb_root.xt_list.l_recs);
>> +
>> +    return (size / sizeof(struct ocfs2_extent_rec));
>> +}
> I remember with 512, there is no xattr in inode.

This function only used in index block, it's not for inode block.

>> +    for (i = le16_to_cpu(el->l_next_free_rec) - 1; i >= 0; i--) {
> no le16_to_cpu in tools. there are also some below, please remove them.

ok.

>> +        ret = io_read_block(ost->ost_fs->fs_io, blkno, block_num, bhs);
> bucket size isn't block size. So you can't just read and handle the 
> first block for a bucket. the same for the write.

So I read block_num blocks not first block.


>> +    if (di->i_dyn_features & OCFS2_HAS_XATTR_FL) {
> you mean inline_xattr here?

my fault. I mean OCFS2_INLINE_XATTR_FL.


>> +    if (!(xb->xb_flags & OCFS2_XATTR_INDEXED)) {
> you should handle xb_flags swap first.
ok.

Thanks for review.

tiger

  reply	other threads:[~2008-07-25  8:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-25  7:06 [Ocfs2-devel] [PATCH 1/2] ocfs2-tools: Add extended attribute support in mkfs.ocfs2 Tiger Yang
2008-07-25  7:06 ` [Ocfs2-devel] [PATCH 2/2] ocfs2-tools: Add extended attribute support in fsck.ocfs2 Tiger Yang
2008-07-25  7:52   ` Tao Ma
2008-07-25  8:56     ` Tiger Yang [this message]
2008-07-25  9:08       ` Tao Ma
2008-07-25  9:33 ` [Ocfs2-devel] [PATCH 1/2] ocfs2-tools: Add extended attribute support in mkfs.ocfs2 Joel Becker
2008-07-29  5:49   ` Tiger Yang
2008-07-29  7:09     ` Tao Ma
2008-07-29 22:23     ` Joel Becker

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=48899524.3050805@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.