xfs
[Top] [All Lists]

Re: [PATCH 1/2] [XFS] Validate log feature fields correctly

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 1/2] [XFS] Validate log feature fields correctly
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 16 Mar 2009 21:49:04 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20090315151546.GB7145@xxxxxxxxxxxxx>
Mail-followup-to: Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
References: <1237116342-25701-1-git-send-email-david@xxxxxxxxxxxxx> <1237116342-25701-2-git-send-email-david@xxxxxxxxxxxxx> <20090315151546.GB7145@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Sun, Mar 15, 2009 at 11:15:51AM -0400, Christoph Hellwig wrote:
> On Sun, Mar 15, 2009 at 10:25:41PM +1100, Dave Chinner wrote:
> > If the large log sector size feature bit is set in the
> > superblock by accident (say disk corruption), the then
> > fields that are now considered valid are not checked on
> > production kernels. The checks are present as ASSERT
> > statements so cause a panic on a debug kernel.
> > 
> > Change this so that the fields are validity checked if
> > the feature bit is set and abort the log mount if the
> > fields do not contain valid values.
> > 
> > Reported-by: Eric Sesterhenn <snakebyte@xxxxxx>
> > Signed-off-by: Dave Chinner <david@xxxxxxxxxxxxx>
> 
> Looks good to me, but wouldn't be easier to rad if the various sizes
> in the error messages were reported decimal instead of in hex?

I just find large numbers easier to parse in hex, especially as
we are expecting power-of-2 type numbers to come out of this.
I'll change it....

> Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> 
> >  }  /* xlog_alloc_log */
> 
> any maybe remove this comment while you're at it?

Ok.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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