[Ocfs2-tools-devel] a patch for bitmap_clear_range_generic.

Joel Becker Joel.Becker at oracle.com
Fri Aug 25 14:28:45 PDT 2006


Signed-off-by: jlbec

On Fri, Aug 25, 2006 at 03:32:14PM +0800, tao.ma wrote:
> ocfs2-tools: Change the wrong bitmap number when releasing a blt
> 
> When a function call ocfs2_bitmap_clear_range_generic to release
> a bit in a bitmap region, it will give it a bit number in global
> offset. So in this function, it will first get the right bitmap
> region, and then call clear_generic_shared to release it. Since 
> "first_bit" is already a global offset, not a offset in this bitmap
> region, we don't need to add the start bit of the region.
> 
> Index: libocfs2/bitmap.c
> ===================================================================
> --- libocfs2/bitmap.c	(revision 1227)
> +++ libocfs2/bitmap.c	(working copy)
> @@ -747,7 +747,7 @@ errcode_t ocfs2_bitmap_clear_range_gener
>  		return OCFS2_ET_INVALID_BIT;
>  
>  	for (end = first_bit + len; first_bit < end; first_bit++)
> -		clear_generic_shared(bitmap, br, first_bit + br->br_start_bit);
> +		clear_generic_shared(bitmap, br, first_bit);
>  
>  	return 0;
>  }

> _______________________________________________
> Ocfs2-tools-devel mailing list
> Ocfs2-tools-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel


-- 

"Friends may come and go, but enemies accumulate." 
        - Thomas Jones

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-tools-devel mailing list