xfs
[Top] [All Lists]

Re: buffer_head->b_size & ia64

To: Dann Frazier <dannf@xxxxxxxxxxxxxxxxxxxx>
Subject: Re: buffer_head->b_size & ia64
From: Steve Lord <lord@xxxxxxx>
Date: 01 Nov 2002 17:32:48 -0600
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <20021101231258.GA28163@dsl2.external.hp.com>
References: <20021101231258.GA28163@dsl2.external.hp.com>
Sender: linux-xfs-bounce@xxxxxxxxxxx
On Fri, 2002-11-01 at 17:12, Dann Frazier wrote:
> hey,
>   I was trying to test latest cvs to see if it resolves another issue, but
> i began getting a panic on mount.  The problem is that the latest bjorn
> patch for ia64 (0821) defines buffer_head->b_size as an int instead of a 
> short.
> (see include/linux/fs.h).
> 
> The following ASSERT is in page_buf.c:
> 
>         /* The b_size field of struct buffer_head is an unsigned short
>          * ... we may need to split this request up.  [64K is too big]
>          */
>         ASSERT(sizeof(bh->b_size) == 2);
>         while (sector > 0xffff) {
>                 sector >>= 1;
>                 blk_length++;
>         }
> 
> Which causes the kernel to Oops on mount.  Which ia64 patch is currently 
> merged
> into the XFS tree?  Is there currently a hard dependency on this size
> somewhere?
> 

Hmm, looks like code to deal with 64K and larger pages doesn't it. This
tree has no ia64 patch merged into it at all. The code probably needs to
mutate into something like (and drop the assert):

        while (sector > ((1 << NBBY * sizeof(bh->b_size)) - 1)) {
                sector >>= 1;
                blk_length++;
        }

I think that should all turn into a compile time constant.

The dependency on bh_size being 2 is the 0xffff on the following line,
I am not aware of any others.

Steve


-- 

Steve Lord                                      voice: +1-651-683-3511
Principal Engineer, Filesystem Software         email: lord@xxxxxxx


<Prev in Thread] Current Thread [Next in Thread>