xfs
[Top] [All Lists]

Re: [PATCH 5/7] xfs: encapsulate bbcount validity checking

To: Alex Elder <aelder@xxxxxxx>
Subject: Re: [PATCH 5/7] xfs: encapsulate bbcount validity checking
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 5 Apr 2010 07:32:12 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <201003182254.o2IMs6g0001880@xxxxxxxxxxxxxxxxxxxxxx>
References: <201003182254.o2IMs6g0001880@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.19 (2009-01-05)
On Thu, Mar 18, 2010 at 05:54:06PM -0500, Alex Elder wrote:
> This replaces is a duplicated block of essentially identical code
> in three spots with a call to a common helper routine.

I don't think I really like this.  It's adding a lot of indirections
for some simple error reporting.

> +     if (bbcount > 0 && bbcount <= log->l_logBBsize)
> +             return 1;

Adding a tiny helper just for this might be worthwhile, though.

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH 5/7] xfs: encapsulate bbcount validity checking, Christoph Hellwig <=