xfs
[Top] [All Lists]

Re: [PATCH 3/5] xfs: prevent extsize alignment from exceeding maximum ex

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 3/5] xfs: prevent extsize alignment from exceeding maximum extent size
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 25 Jan 2011 10:32:18 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20110124090458.GD26744@xxxxxxxxxxxxx>
References: <1295411400-15614-1-git-send-email-david@xxxxxxxxxxxxx> <1295411400-15614-4-git-send-email-david@xxxxxxxxxxxxx> <20110124090458.GD26744@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Mon, Jan 24, 2011 at 04:04:59AM -0500, Christoph Hellwig wrote:
> > +                                   /*
> > +                                    * make sure we don't exceed a single
> > +                                    * extent length when we align the
> > +                                    * extent by reducing length we are
> > +                                    * going to allocate by the maximum
> > +                                    * amount extent size aligment may
> > +                                    * require.
> > +                                   alen = (xfs_extlen_t)XFS_FILBLKS_MIN(
> > +                                                   len,
> > +                                           MAXEXTLEN - (2 * extsz - 1));
> > +                                    */
> 
> This essentially just adds a comment, given that the new code is inside
> the bracing.  Also the xfs_extlen_t cast seems pointless.  The C type
> promotion rules do just fine for going down from a 64bit type to a 32bit
> one, as long as the results fit into the latter - which they always do
> here.

Argh, forgot to refresh the patch after doing some bug hunting.
I'll fix it and retest before I repost it.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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