public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Myers <bpm@sgi.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 12/15] xfs: make dir2 ftype offset pointers explicit
Date: Wed, 30 Oct 2013 13:51:18 -0500	[thread overview]
Message-ID: <20131030185118.GJ1935@sgi.com> (raw)
In-Reply-To: <20131029221545.GD6188@dastard>

On Wed, Oct 30, 2013 at 09:15:45AM +1100, Dave Chinner wrote:
> On Tue, Oct 29, 2013 at 03:00:08PM -0500, Ben Myers wrote:
> > On Tue, Oct 29, 2013 at 10:11:55PM +1100, Dave Chinner wrote:
> > > From: Dave Chinner <dchinner@redhat.com>
> > > 
> > > Rather than hiding the ftype field size accounting inside the dirent
> > > padding for the ".." and first entry offset functions for v2
> > > directory formats, add explicit functions that calculate it
> > > correctly.
> > > 
> > > Signed-off-by: Dave Chinner <dchinner@redhat.com>
> > > ---
> > >  fs/xfs/xfs_da_format.c | 23 +++++++++++++++++++++--
> > >  1 file changed, 21 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/fs/xfs/xfs_da_format.c b/fs/xfs/xfs_da_format.c
> > > index 5991b26..5a5767c 100644
> > > --- a/fs/xfs/xfs_da_format.c
> > > +++ b/fs/xfs/xfs_da_format.c
> > > @@ -334,6 +334,25 @@ xfs_dir2_data_first_entry_p(
> > >  }
> > >  
> > >  static struct xfs_dir2_data_entry *
> > > +xfs_dir2_ftype_data_dotdot_entry_p(
> > > +	struct xfs_dir2_data_hdr *hdr)
> > > +{
> > > +	return (struct xfs_dir2_data_entry *)
> > > +		((char *)hdr + sizeof(struct xfs_dir2_data_hdr) +
> > > +				XFS_DIR3_DATA_ENTSIZE(1));
> > > +}
> > > +
> > > +static struct xfs_dir2_data_entry *
> > > +xfs_dir2_ftype_data_first_entry_p(
> > > +	struct xfs_dir2_data_hdr *hdr)
> > > +{
> > > +	return (struct xfs_dir2_data_entry *)
> > > +		((char *)hdr + sizeof(struct xfs_dir2_data_hdr) +
> > > +				XFS_DIR3_DATA_ENTSIZE(1) +
> > > +				XFS_DIR3_DATA_ENTSIZE(2));
> > > +}
> > 
> > 363 static struct xfs_dir2_data_entry *
> > 364 xfs_dir3_data_dotdot_entry_p(
> > 365         struct xfs_dir2_data_hdr *hdr)
> > 366 {
> > 367         return (struct xfs_dir2_data_entry *)
> > 368                 ((char *)hdr + sizeof(struct xfs_dir3_data_hdr) +
> > 369                                 XFS_DIR2_DATA_ENTSIZE(1));
> > 370 }
> > 371 
> > 372 static struct xfs_dir2_data_entry *
> > 373 xfs_dir3_data_first_entry_p(
> > 374         struct xfs_dir2_data_hdr *hdr)
> > 375 {
> > 376         return (struct xfs_dir2_data_entry *)
> > 377                 ((char *)hdr + sizeof(struct xfs_dir3_data_hdr) +
> > 378                                 XFS_DIR2_DATA_ENTSIZE(1) +
> > 379                                 XFS_DIR2_DATA_ENTSIZE(2));
> > 380 }
> > 					   3
> > 
> > We want dir3 entry size there, I think?
> 
> Fixed in V2 of the patch that introduced the problem.

Fine.

Reviewed-by: Ben Myers <bpm@sgi.com>

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

  reply	other threads:[~2013-10-30 18:51 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-29 11:11 [PATCH 00/15] xfs: patches for 3.13 Dave Chinner
2013-10-29 11:11 ` [PATCH 01/15] xfs: xfs_remove deadlocks due to inverted AGF vs AGI lock ordering Dave Chinner
2013-10-30 22:39   ` Ben Myers
2013-10-30 23:15     ` Dave Chinner
2013-11-04 23:10       ` Ben Myers
2013-10-29 11:11 ` [PATCH 02/15] xfs: open code inc_inode_iversion when logging an inode Dave Chinner
2013-10-29 11:11 ` [PATCH 03/15] xfs: abstract the differences in dir2/dir3 via an ops vector Dave Chinner
2013-10-29 11:11 ` [PATCH 04/15] xfs: vectorise remaining shortform dir2 ops Dave Chinner
2013-10-29 11:11 ` [PATCH 05/15] xfs: vectorise directory data operations Dave Chinner
2013-10-29 11:11 ` [PATCH 06/15] xfs: vectorise directory data operations part 2 Dave Chinner
2013-10-29 11:11 ` [PATCH 07/15] xfs: vectorise directory leaf operations Dave Chinner
2013-10-29 11:11 ` [PATCH 08/15] xfs: vectorise DA btree operations Dave Chinner
2013-10-29 11:11 ` [PATCH 09/15] xfs: vectorise encoding/decoding directory headers Dave Chinner
2013-10-29 19:06   ` Ben Myers
2013-10-29 11:11 ` [PATCH 10/15] xfs: vectorise directory leaf operations Dave Chinner
2013-10-29 19:13   ` Ben Myers
2013-10-29 11:11 ` [PATCH 11/15] xfs: convert directory vector functions to constants Dave Chinner
2013-10-29 19:22   ` Ben Myers
2013-10-29 22:15   ` [PATCH 11/15 V2] " Dave Chinner
2013-10-30 18:09     ` Ben Myers
2013-10-29 11:11 ` [PATCH 12/15] xfs: make dir2 ftype offset pointers explicit Dave Chinner
2013-10-29 20:00   ` Ben Myers
2013-10-29 22:15     ` Dave Chinner
2013-10-30 18:51       ` Ben Myers [this message]
2013-10-29 11:11 ` [PATCH 13/15] xfs: validity check the directory block leaf entry count Dave Chinner
2013-10-29 20:43   ` Ben Myers
2013-10-29 11:11 ` [PATCH 14/15] xfs: prevent stack overflows from page cache allocation Dave Chinner
2013-10-30 10:23   ` Christoph Hellwig
2013-10-30 21:40   ` Ben Myers
2013-10-29 11:11 ` [PATCH 15/15] xfs: fix static and extern sparse warnings Dave Chinner
2013-10-29 21:12   ` Ben Myers
2013-10-30 19:22 ` [PATCH 00/15] xfs: patches for 3.13 Ben Myers

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=20131030185118.GJ1935@sgi.com \
    --to=bpm@sgi.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