PERFORCE change 133000 for review

Steve Wise swise at FreeBSD.org
Thu Jan 10 15:55:57 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=133000

Change 133000 by swise at swise:vic10:iwarp on 2008/01/10 23:55:35

	Fixed genpoll allocator.
	
	It wasn't correctly computing the address to return.

Affected files ...

.. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cxio_hal.h#7 edit

Differences ...

==== //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cxio_hal.h#7 (text+ko) ====

@@ -255,7 +255,7 @@
 	if (blkno == SWAPBLK_NONE)
 		return (0);
 
-	return (gp->gen_base + blkno);
+	return (gp->gen_base + ((1 << gp->gen_chunk_shift) * blkno));
 }
 
 #define cxio_wait(ctx, lockp, cond) \
@@ -281,7 +281,7 @@
 	daddr_t blkno;
 	
 	chunks = size >> gp->gen_chunk_shift;
-	blkno = address - gp->gen_base;
+	blkno = (address - gp->gen_base) / (1 << gp->gen_chunk_shift);
 	blist_free(gp->gen_list, blkno, chunks);
 }
 


More information about the p4-projects mailing list