From: Christoph Hellwig <hch@infradead.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] fix filestreams on 32-bit boxes
Date: Fri, 24 Aug 2007 02:36:35 +0100 [thread overview]
Message-ID: <20070824013635.GA1500@infradead.org> (raw)
In-Reply-To: <46CE2A07.7080305@sandeen.net>
On Thu, Aug 23, 2007 at 07:44:55PM -0500, Eric Sandeen wrote:
> xfs_filestream_mount() sets up an mru cache with:
>
> err = xfs_mru_cache_create(&mp->m_filestream, lifetime, grp_count,
> (xfs_mru_cache_free_func_t)xfs_fstrm_free_func);
>
> but that cast is causing problems...
>
> typedef void (*xfs_mru_cache_free_func_t)(unsigned long, void*);
>
> but:
>
> void xfs_fstrm_free_func(
> xfs_ino_t ino,
> fstrm_item_t *item)
>
> so on a 32-bit box, it's casting (32, 32) args into (64, 32) and I assume
> it's getting garbage for *item, which subsequently causes an explosion.
>
> With this change the filestreams xfsqa tests don't oops on my 32-bit box.
Please also kill that blody cast. Function pointer casts are wonderful
for hiding bugs like the one you just fixed from compilers, but that's it.
next prev parent reply other threads:[~2007-08-24 1:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-24 0:44 [PATCH] fix filestreams on 32-bit boxes Eric Sandeen
2007-08-24 1:36 ` Christoph Hellwig [this message]
2007-08-24 1:48 ` David Chinner
2007-08-24 2:03 ` Eric Sandeen
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=20070824013635.GA1500@infradead.org \
--to=hch@infradead.org \
--cc=sandeen@sandeen.net \
--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