All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Christoph Hellwig <hch@lst.de>, xfs@oss.sgi.com
Subject: Re: [PATCH 3/3] kill xfs_dinode_core_t
Date: Wed, 8 Oct 2008 15:22:12 +0200	[thread overview]
Message-ID: <20081008132212.GF25392@lst.de> (raw)
In-Reply-To: <20081007213610.GV30001@disturbed>

On Wed, Oct 08, 2008 at 08:36:10AM +1100, Dave Chinner wrote:
> >  	switch (dic->di_format) {
> >  	case XFS_DINODE_FMT_DEV:
> > -		buf->dt_rdev = be32_to_cpu(dip->di_u.di_dev);
> > +		buf->dt_rdev = be32_to_cpu(*(__be32 *)XFS_DFORK_DPTR(mp, dic));
> 
> That's not particularly obvious where the rdev value is stored.
> Perhaps a comment indicating that it's a direct dereference out
> of the start of the data area in the inode?

Yeah.  Or maybe I should add a nice accessor that does the casting
and endianess conversion.

> > +#define XFS_DINODE_CORE_SIZE(mp)	(96)
> > +#define XFS_DINODE_SIZE(mp)		(96 + sizeof(__be32))
> 
> probably shouldn't hard-code the second "96" there. Perhaps
> the XFS_DINODE_SIZE() macro should be a sizeof(xfs_dinode_t)?

Well, that will change once xfs_dinode grows.  But we could do it for
now and then use offsetoff of the first new member for the old one.

I'll see if I can find a way to make this a little more clear.

      reply	other threads:[~2008-10-08 13:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-07 20:22 [PATCH 3/3] kill xfs_dinode_core_t Christoph Hellwig
2008-10-07 21:36 ` Dave Chinner
2008-10-08 13:22   ` Christoph Hellwig [this message]

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=20081008132212.GF25392@lst.de \
    --to=hch@lst.de \
    --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 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.