public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Evgeniy Dushistov <dushistov@mail.ru>
Cc: linux-kernel@vger.kernel.org, Alex Viskovatoff <viskovatoff@imap.cc>
Subject: Re: [PATCH] ufs: make solaris fsck happy
Date: Mon, 1 Mar 2010 16:37:54 -0800	[thread overview]
Message-ID: <20100301163754.889bd7a7.akpm@linux-foundation.org> (raw)
In-Reply-To: <20100225184743.GA13772@rain>

On Thu, 25 Feb 2010 21:47:43 +0300
Evgeniy Dushistov <dushistov@mail.ru> wrote:

> --- 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.


      reply	other threads:[~2010-03-02  0:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-25 18:47 [PATCH] ufs: make solaris fsck happy Evgeniy Dushistov
2010-03-02  0:37 ` Andrew Morton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100301163754.889bd7a7.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dushistov@mail.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viskovatoff@imap.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox