From: "Michael L. Semon" <mlsemon35@gmail.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 13/16] xfs: vectorise encoding/decoding directory headers
Date: Wed, 02 Oct 2013 10:07:52 -0400 [thread overview]
Message-ID: <524C28B8.8080306@gmail.com> (raw)
In-Reply-To: <1380510433-8353-14-git-send-email-david@fromorbit.com>
On 09/29/2013 11:07 PM, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> Conversion from on-disk structures to in-core header structures
> currently relies on magic number checks. If the magic number is
> wrong, but one of the supported values, we do the wrong thing with
> the encode/decode operation. Split these functions so that there are
> discrete operations for the specific directory format we are
> handling.
[snip]
> diff --git a/fs/xfs/xfs_dir2_node.c b/fs/xfs/xfs_dir2_node.c
> index 17e65c7..aea65ce 100644
> --- a/fs/xfs/xfs_dir2_node.c
> +++ b/fs/xfs/xfs_dir2_node.c
> @@ -507,20 +460,20 @@ xfs_dir2_leafn_add(
> #ifdef DEBUG
> static void
> xfs_dir2_free_hdr_check(
> - struct xfs_mount *mp,
> + struct xfs_inode *dp,
> struct xfs_buf *bp,
> xfs_dir2_db_t db)
> {
> struct xfs_dir3_icfree_hdr hdr;
>
> - xfs_dir3_free_hdr_from_disk(&hdr, bp->b_addr);
> + dp->d_ops->free_hdr_from_disk(&hdr, bp->b_addr);
>
> - ASSERT((hdr.firstdb % xfs_dir3_free_max_bests(mp)) == 0);
> + ASSERT((hdr.firstdb % xfs_dir3_free_max_bests(dp->i_mount)) == 0);
> ASSERT(hdr.firstdb <= db);
> ASSERT(db < hdr.firstdb + hdr.nvalid);
> }
> #else
> -#define xfs_dir2_free_hdr_check(mp, dp, db)
> +#define xfs_dir2_free_hdr_check(dp, dp, db)
> #endif /* DEBUG */
For non-debug XFS only, the above statement causes this to happen:
CC fs/xfs/xfs_dir2_data.o
CC fs/xfs/xfs_dir2_leaf.o
CC fs/xfs/xfs_dir2_node.o
fs/xfs/xfs_dir2_node.c:478:37: error: duplicate macro parameter "dp"
#define xfs_dir2_free_hdr_check(dp, dp, db)
^
fs/xfs/xfs_dir2_node.c: In function 'xfs_dir2_leafn_lookup_for_addname':
fs/xfs/xfs_dir2_node.c:613:5: error: implicit declaration of function 'xfs_dir2_free_hdr_check' [-Werror=implicit-function-declaration]
xfs_dir2_free_hdr_check(dp, curbp, curdb);
I get by with a patch like this...
diff --git a/fs/xfs/xfs_dir2_node.c b/fs/xfs/xfs_dir2_node.c
index 50958c3..30cbf10 100644
--- a/fs/xfs/xfs_dir2_node.c
+++ b/fs/xfs/xfs_dir2_node.c
@@ -475,7 +475,7 @@ xfs_dir2_free_hdr_check(
ASSERT(db < hdr.firstdb + hdr.nvalid);
}
#else
-#define xfs_dir2_free_hdr_check(dp, dp, db)
+#define xfs_dir2_free_hdr_check(dp, bp, db)
#endif /* DEBUG */
/*
--
1.8.3.2
...but really don't know what trouble this will cause. xfstests looks
OK on one PC, not so good on the other PC: underpowered hardware, bad
science, upgraded kernel and xfsprogs at the same time, etc., ...
Thanks!
Michael
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-10-02 14:08 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-30 3:06 [PATCH 00/16] xfs: patches for 3.13 Dave Chinner
2013-09-30 3:06 ` [PATCH 01/16] xfs: create a shared header file for format-related information Dave Chinner
2013-10-03 14:50 ` Christoph Hellwig
2013-09-30 3:06 ` [PATCH 02/16] xfs: unify directory/attribute format definitions Dave Chinner
2013-10-03 14:52 ` Christoph Hellwig
2013-10-04 0:47 ` Dave Chinner
2013-09-30 3:07 ` [PATCH 03/16] xfs: split dquot buffer operations out Dave Chinner
2013-10-03 14:52 ` Christoph Hellwig
2013-09-30 3:07 ` [PATCH 04/16] xfs: decouple log and transaction headers Dave Chinner
2013-10-03 14:56 ` Christoph Hellwig
2013-10-04 0:49 ` Dave Chinner
2013-09-30 3:07 ` [PATCH 05/16] xfs: decouple inode and bmap btree header files Dave Chinner
2013-10-03 14:58 ` Christoph Hellwig
2013-10-04 1:00 ` Dave Chinner
2013-10-15 19:06 ` Christoph Hellwig
2013-09-30 3:07 ` [PATCH 06/16] xfs: split xfs_rtalloc.c for userspace sanity Dave Chinner
2013-10-03 14:59 ` Christoph Hellwig
2013-09-30 3:07 ` [PATCH 07/16] xfs: abstract the differences in dir2/dir3 via an ops vector Dave Chinner
2013-10-03 15:00 ` Christoph Hellwig
2013-09-30 3:07 ` [PATCH 08/16] xfs: vectorise remaining shortform dir2 ops Dave Chinner
2013-10-03 15:00 ` Christoph Hellwig
2013-09-30 3:07 ` [PATCH 09/16] xfs: vectorise directory data operations Dave Chinner
2013-10-03 15:01 ` Christoph Hellwig
2013-09-30 3:07 ` [PATCH 10/16] xfs: vectorise directory data operations part 2 Dave Chinner
2013-10-03 15:01 ` Christoph Hellwig
2013-09-30 3:07 ` [PATCH 11/16] xfs: vectorise directory leaf operations Dave Chinner
2013-10-03 15:01 ` Christoph Hellwig
2013-09-30 3:07 ` [PATCH 12/16] xfs: vectorise DA btree operations Dave Chinner
2013-09-30 3:07 ` [PATCH 13/16] xfs: vectorise encoding/decoding directory headers Dave Chinner
2013-10-02 14:07 ` Michael L. Semon [this message]
2013-09-30 3:07 ` [PATCH 14/16] xfs: vectorise directory leaf operations Dave Chinner
2013-09-30 3:07 ` [PATCH 15/16] xfs: convert directory vector functions to constants Dave Chinner
2013-09-30 3:07 ` [PATCH 16/16] xfs: increase inode cluster size for v5 filesystems Dave Chinner
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=524C28B8.8080306@gmail.com \
--to=mlsemon35@gmail.com \
--cc=david@fromorbit.com \
--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