From: Christoph Hellwig <hch@infradead.org>
To: Barry Naujok <bnaujok@sgi.com>
Cc: xfs@oss.sgi.com, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/4] XFS: add op_flags field and helpers to xfs_da_args
Date: Tue, 13 May 2008 04:34:58 -0400 [thread overview]
Message-ID: <20080513083458.GB21919@infradead.org> (raw)
In-Reply-To: <20080513080152.598022276@chook.melbourne.sgi.com>
On Tue, May 13, 2008 at 05:57:51PM +1000, Barry Naujok wrote:
> The end of the xfs_da_args structure has 4 unsigned char fields for
> true/false information on directory and attr operations using the
> xfs_da_args structure.
>
> The following converts these 4 into a op_flags field that uses the
> first 4 bits for these fields and allows expansion for future
> operation information (eg. case-insensitive lookup request).
>
> There is also a bit of EOL whitespace cleanup too.
Looks generally good to me. A few stylistic comments:
- I don't think the xfs_da_is*_op wrappers help readability, we'd
be better off without those.
- op_flags seems like a rather odd name to me, what about
lookup_flags instead?
And the hinks below are an awfull lot of random reformatting that don't
belong into this patch. As they're sensible what about just commiting
the beforehand?
> dsize = dp->i_df.if_bytes;
> -
> +
> switch (dp->i_d.di_format) {
> case XFS_DINODE_FMT_EXTENTS:
> - /*
> - * If there is no attr fork and the data fork is extents,
> - * determine if creating the default attr fork will result
> - * in the extents form migrating to btree. If so, the
> - * minimum offset only needs to be the space required for
> + /*
> + * If there is no attr fork and the data fork is extents,
> + * determine if creating the default attr fork will result
> + * in the extents form migrating to btree. If so, the
> + * minimum offset only needs to be the space required for
> * the btree root.
> - */
> + */
> if (!dp->i_d.di_forkoff && dp->i_df.if_bytes > mp->m_attroffset)
> dsize = XFS_BMDR_SPACE_CALC(MINDBTPTRS);
> break;
> -
> +
> case XFS_DINODE_FMT_BTREE:
> /*
> * If have data btree then keep forkoff if we have one,
> - * otherwise we are adding a new attr, so then we set
> - * minforkoff to where the btree root can finish so we have
> + * otherwise we are adding a new attr, so then we set
> + * minforkoff to where the btree root can finish so we have
> * plenty of room for attrs
> */
> if (dp->i_d.di_forkoff) {
> - if (offset < dp->i_d.di_forkoff)
> + if (offset < dp->i_d.di_forkoff)
> return 0;
> - else
> + else
> return dp->i_d.di_forkoff;
> } else
> dsize = XFS_BMAP_BROOT_SPACE(dp->i_df.if_broot);
> break;
> }
> -
> - /*
> - * A data fork btree root must have space for at least
> +
> + /*
> + * A data fork btree root must have space for at least
> * MINDBTPTRS key/ptr pairs if the data fork is small or empty.
> */
> minforkoff = MAX(dsize, XFS_BMDR_SPACE_CALC(MINDBTPTRS));
next prev parent reply other threads:[~2008-05-13 8:34 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-13 7:57 [PATCH 0/4] XFS: Case-insensitive support - ASCII only Barry Naujok
2008-05-13 7:57 ` [PATCH 1/4] XFS: Name operation vector for hash and compare Barry Naujok
2008-05-13 8:31 ` Christoph Hellwig
2008-05-13 7:57 ` [PATCH 2/4] XFS: add op_flags field and helpers to xfs_da_args Barry Naujok
2008-05-13 8:34 ` Christoph Hellwig [this message]
2008-05-14 6:12 ` Barry Naujok
2008-05-13 7:57 ` [PATCH 3/4] XFS: Return case-insensitive match for dentry cache Barry Naujok
2008-05-13 8:57 ` Christoph Hellwig
2008-05-14 6:15 ` Barry Naujok
2008-05-14 7:55 ` Barry Naujok
2008-05-15 4:57 ` Christoph Hellwig
2008-05-15 5:14 ` Barry Naujok
2008-05-15 13:43 ` Anton Altaparmakov
2008-05-15 14:11 ` Christoph Hellwig
2008-05-16 0:30 ` Barry Naujok
2008-05-16 7:25 ` Anton Altaparmakov
2008-05-20 2:24 ` Barry Naujok
2008-05-20 18:23 ` Christoph Hellwig
2008-05-20 20:50 ` Sunil Mushran
2008-05-13 7:57 ` [PATCH 4/4] XFS: ASCII case-insensitive support Barry Naujok
2008-05-13 8:58 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2008-05-14 7:52 [PATCH 0/4] XFS: ASCII case-insensitivity support Barry Naujok
2008-05-14 7:52 ` [PATCH 2/4] XFS: add op_flags field and helpers to xfs_da_args Barry Naujok
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=20080513083458.GB21919@infradead.org \
--to=hch@infradead.org \
--cc=bnaujok@sgi.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=xfs@oss.sgi.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).