Re: [PATCH 09/48] xfs: add CRC checks to block format directory blocks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 24, 2013 at 03:53:58PM -0500, Ben Myers wrote:
> On Fri, Jun 07, 2013 at 10:25:32AM +1000, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@xxxxxxxxxx>
> > 
> > Now that directory buffers are made from a single struct xfs_buf, we
> > can add CRC calculation and checking callbacks. While there, add all
> > the fields to the on disk structures for future functionality such
> > as d_type support, uuids, block numbers, owner inode, etc.
> > 
> > To distinguish between the different on disk formats, change the
> > magic numbers for the new format directory blocks.
> > 
> > Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> corresponds to commit f5f3d9b016
> 
> > ---
> >  include/xfs_dir2_format.h |  155 +++++++++++++++++++++++++++++++++++++++++--
> >  libxfs/xfs_dir2_block.c   |  126 +++++++++++++++++++++++++----------
> >  libxfs/xfs_dir2_data.c    |  160 ++++++++++++++++++++++++++++-----------------
> >  libxfs/xfs_dir2_leaf.c    |    6 +-
> >  libxfs/xfs_dir2_node.c    |    2 +-
> >  libxfs/xfs_dir2_priv.h    |    4 +-
> >  libxfs/xfs_dir2_sf.c      |    2 +-
> >  7 files changed, 346 insertions(+), 109 deletions(-)
> > 
> > diff --git a/include/xfs_dir2_format.h b/include/xfs_dir2_format.h
> > index f5c264a..da928c7 100644
> > --- a/include/xfs_dir2_format.h
> > +++ b/include/xfs_dir2_format.h
> 
> ...
> 
> > @@ -215,11 +247,43 @@ typedef struct xfs_dir2_data_free {
> >   */
> >  typedef struct xfs_dir2_data_hdr {
> >  	__be32			magic;		/* XFS_DIR2_DATA_MAGIC or */
> > -						/* XFS_DIR2_BLOCK_MAGIC */
> > +	/* XFS_DIR2_BLOCK_MAGIC */
> 
> This change to remove some tabs does not match the kernel code.  Suggest you
> remove it.  Maybe you have done that in one of the syncs later.

All this has been done in later syncs. I'd suggest that you need to
check the current code, as what was committed to  the crc-dev branch
didn't *exactly* match what was in the kernel code.

Why do you think I spent so much time trying to unify them after
this?


> > +	bf = xfs_dir3_data_bestfree_p(hdr);
> > +	p = (char *)xfs_dir3_data_entry_p(hdr);
> >  
> >  	switch (be32_to_cpu(hdr->magic)) {
> >  	case XFS_DIR2_BLOCK_MAGIC:
> > +	case XFS_DIR3_BLOCK_MAGIC:
> 	    ^^^^^
> 
> In the kernel the endian flip is done here, not in the switch parens.

See later patches. It's done that way here because the kernel method
causes compilation failure. i.e. this patch:

[PATCH 06/49] libxfs: fix byte swapping on constants

modifies the xfsprogs infrastructure to allow the kernel method to
be used in userspace, and it swaps all the libxfs code around.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux