Thread (50 messages) 50 messages, 6 authors, 2009-11-12

RE: [PATCH 01/14] repair: merge scanfunc_bno and scanfunc_cnt

From: Alex Elder <hidden>
Date: 2009-10-13 23:35:22

On , Christoph Hellwig wrote:
On Mon, Oct 12, 2009 at 11:53:00AM -0500, Eric Sandeen wrote:
quoted
Should we explicitly test that this is either XFS_ABTC_MAGIC or
XFS_ABTB_MAGIC here to avoid any programming-error
type problems?
We really only have two freespace btrees.  But I'll add an assert
just to be sure.
quoted
quoted
-				else  {
+					break;
+				case XR_E_FREE1:
+					/*
+					 * no warning messages -- we'll catch
+					 * FREE1 blocks later
+					 */
+					if (magic != XFS_ABTB_MAGIC) {
Why not make this explicitly "if (magic == XFS_ABTC_MAGIC)" - I guess it seems potentially
more future-proof to me though I don't suppose we'll ever get a new type here.  :)
The positive test seems clearer to me but *shrug*.
Ok, changed.
With changes as described, looks good.

Reviewed-by: Alex Elder <redacted>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help