[Ocfs2-devel] [PATCH 1/1] ocfs2: Local alloc window size changeable via mount option

Joel Becker Joel.Becker at oracle.com
Thu Dec 20 17:15:07 PST 2007


On Thu, Dec 20, 2007 at 02:58:11PM -0800, Sunil Mushran wrote:
>  static inline int ocfs2_local_alloc_window_bits(struct ocfs2_super *osb)
>  {
> -	BUG_ON(osb->s_clustersize_bits < 12);
> +	BUG_ON(osb->s_clustersize_bits > 20);
>  
> -	return 2048 >> (osb->s_clustersize_bits - 12);
> +	return osb->local_alloc_size << (20 - osb->s_clustersize_bits);
>  }

	Can we document the magic bit numbers somehow?  I don't think we
need super-awesome defines or anything, just "20 is 1MB, we're
calculating local_alloc_size in MB" or something like that.
 
Joel

-- 

"I always thought the hardest questions were those I could not answer.
 Now I know they are the ones I can never ask."
			- Charlie Watkins

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



More information about the Ocfs2-devel mailing list