[Ocfs2-devel] [PATCH]2.6 fixes in super.c

Mark Fasheh mark.fasheh at oracle.com
Tue Feb 24 14:12:12 CST 2004


On Mon, Feb 23, 2004 at 08:25:01PM -0800, Rusty Lynch wrote:
> Here is a redone version of the patch that applies cleanly to the current 
> svn repository.
> 
>     --rusty
<snip>

> @@ -721,15 +733,27 @@
>          buf->f_type = OCFS_MAGIC;
>          buf->f_bsize = sb->s_blocksize;
>          buf->f_namelen = OCFS_MAX_FILENAME_LENGTH;
> +        buf->f_bavail = buf->f_bfree;
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
>          buf->f_blocks =
> -            (unsigned long) ((unsigned long) (numbits) *
> -                             (unsigned long) (osb->vol_layout.cluster_size >> 9) -
> -			     (8 * ONE_MEGA_BYTE / osb->vol_layout.cluster_size)); 
> +		(unsigned long) ((unsigned long) (numbits) *
> +				 (unsigned long) (osb->vol_layout.cluster_size >> 9) -
> +				 (8 * ONE_MEGA_BYTE / osb->vol_layout.cluster_size)); 
>          buf->f_bfree =
>              (unsigned long) (freebits * (osb->vol_layout.cluster_size >> 9));
>          buf->f_bavail = buf->f_bfree;
>          buf->f_files = (unsigned long) (numbits);
>          buf->f_ffree = (unsigned long) (numbits) - freebits;
> +#else
> +        buf->f_blocks =
> +		(sector_t) ((unsigned long) (numbits) *
> +			    (unsigned long) (osb->vol_layout.cluster_size >> 9) -
> +			    (8 * ONE_MEGA_BYTE / osb->vol_layout.cluster_size)); 
> +        buf->f_bfree =
> +            (sector_t) (freebits * (osb->vol_layout.cluster_size >> 9));
> +        buf->f_files = (sector_t) (numbits);
> +        buf->f_ffree = (sector_t) (numbits) - freebits;
> +#endif

In this preprocessor conditional, don't we mean: 
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)

instead of 
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)

If so, I'll just change it in my tree and commit that (you should prolly fix
it in yours too).
	--Mark

--
Mark Fasheh
Software Developer, Oracle Corp
mark.fasheh at oracle.com


More information about the Ocfs2-devel mailing list