On Thu, 25 Feb 2010 21:47:43 +0300
Evgeniy Dushistov <dushistov@mail.ru> wrote:
quoted text > --- a/fs/ufs/ufs_fs.h
> +++ b/fs/ufs/ufs_fs.h
> @@ -227,11 +227,16 @@ typedef __u16 __bitwise __fs16;
> */
> #define ufs_cbtocylno(bno) \
> ((bno) * uspi->s_nspf / uspi->s_spc)
> -#define ufs_cbtorpos(bno) \
> +#define ufs_cbtorpos(bno) \
> + ((UFS_SB(sb)->s_flags & UFS_CG_SUN) ? \
> + (((((bno) * uspi->s_nspf % uspi->s_spc) % \
> + uspi->s_nsect) * \
> + uspi->s_nrpos) / uspi->s_nsect) \
> + : \
> ((((bno) * uspi->s_nspf % uspi->s_spc / uspi->s_nsect \
> * uspi->s_trackskew + (bno) * uspi->s_nspf % uspi->s_spc \
> % uspi->s_nsect * uspi->s_interleave) % uspi->s_nsect \
> - * uspi->s_nrpos) / uspi->s_npsect)
> + * uspi->s_nrpos) / uspi->s_npsect))
yikes, that macro should be killed with a stick before it becomes
self-aware and starts breeding.
Or converted into a C function which humans have a chance of
understanding and maintaining.
--
unsubscribe notice To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Messages in current thread:
Re: [PATCH] ufs: make solaris fsck happy , Andrew Morton , (Mon Mar 1, 5:37 pm)