public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Barry Naujok <bnaujok@sgi.com>
Cc: "xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: Re: [REVIEW] Fix unaligned accesses in IA64 in xfsprogs
Date: Mon, 1 Dec 2008 08:42:05 -0500	[thread overview]
Message-ID: <20081201134205.GA7528@infradead.org> (raw)
In-Reply-To: <op.ulg0j1bf3jf8g2@pc-bnaujok.melbourne.sgi.com>

On Mon, Dec 01, 2008 at 05:34:39PM +1100, Barry Naujok wrote:
> xfs_repair is the main culprit when getting disk extents which aren't
> properly aligned in memory. This patch does not call
> xfs_bmbt_disk_get_all directly anymore but does an unaligned get on
> the disk extent record and calls xfs_bmbt_get_all which is host-based
> like the rest of the kernel routines do.

What about just doin the get_unaligned in xfs_bmbt_disk_get_all?  That
way we could just use it everywhere.  The only users that don't need
the get_unaligned are in the tracing code, and I don't think we should
be worried about that little bit of overhead.

> @@ -277,21 +277,17 @@ convert_extent(
>   	xfs_dfilblks_t		*cp,
>   	int			*fp)
>   {

And then we could replace this helper with a direct call to
xfs_bmbt_disk_get_all as the caller would be much cleaner with a
xfs_bmbt_irec_t on the stack anyway..

> --- a/xfsprogs/repair/dino_chunks.c	2008-12-01 17:10:37.000000000 +1100
> +++ b/xfsprogs/repair/dino_chunks.c	2008-12-01 16:11:11.549834281 +1100
> @@ -609,7 +609,8 @@ process_inode_chunk(
>   	if (blks_per_cluster == 0)
>   		blks_per_cluster = 1;
>   	cluster_count = XFS_INODES_PER_CHUNK / inodes_per_cluster;
> -	ASSERT(cluster_count > 0);
> +	if (cluster_count == 0)
> +		cluster_count = 1;

I can't see how this is related.

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

  reply	other threads:[~2008-12-01 13:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-01  6:34 [REVIEW] Fix unaligned accesses in IA64 in xfsprogs Barry Naujok
2008-12-01 13:42 ` Christoph Hellwig [this message]
2008-12-01 23:31   ` Barry Naujok
2008-12-02  0:37   ` Barry Naujok
2008-12-02  6:46     ` Christoph Hellwig

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=20081201134205.GA7528@infradead.org \
    --to=hch@infradead.org \
    --cc=bnaujok@sgi.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