From: Al Viro <viro@ftp.linux.org.uk>
To: Daniel Aragon?s <danarag@gmail.com>
Cc: Andrew Morton <akpm@osdl.org>,
Pekka Enberg <penberg@cs.helsinki.fi>,
Arjan van de Ven <arjan@infradead.org>,
linux-kernel@vger.kernel.org, Jiri Slaby <jirislaby@gmail.com>
Subject: Re: [PATCH/RFC] minix filesystem update to V3 diffed to 2.6.17-rc3
Date: Sat, 6 May 2006 17:37:37 +0100 [thread overview]
Message-ID: <20060506163737.GP27946@ftp.linux.org.uk> (raw)
In-Reply-To: <20060506162956.GO27946@ftp.linux.org.uk>
On Sat, May 06, 2006 at 05:29:56PM +0100, Al Viro wrote:
> Ouch... So you want
> 1024 => 0
> 2048 => 1
> 4096 => 2
> 8192 => 3
> 16384 => 4
> anything else => junk?
>
> IOW, you are creating cascade of ifs and shifts instead of
> ffs(sb->s_blocksize) - 11
> (ffs(1<<n) == n + 1). ffs() is far more efficient and readable...
Or, better yet, sb->s_blocksize_bits - 10. End of story.
next prev parent reply other threads:[~2006-05-06 16:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-01 13:05 [PATCH/RFC] minix filesystem update to V3 diffed to 2.6.17-rc3 Daniel Aragonés
2006-05-01 13:41 ` Jiri Slaby
2006-05-01 17:03 ` Andrew Morton
2006-05-01 17:19 ` Daniel Aragonés
2006-05-01 17:54 ` Jiri Slaby
2006-05-01 18:50 ` Daniel Aragonés
2006-05-01 20:30 ` Joshua Hudson
2006-05-06 16:29 ` Al Viro
2006-05-06 16:37 ` Al Viro [this message]
2006-05-06 22:04 ` minixfs bitmaps and associated lossage Al Viro
2006-05-06 22:25 ` Matthew Wilcox
2006-05-06 22:26 ` Linus Torvalds
2006-05-06 23:10 ` Al Viro
2006-05-06 23:42 ` Linus Torvalds
2006-05-07 7:37 ` Al Viro
2006-05-07 7:35 ` Pavel Machek
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=20060506163737.GP27946@ftp.linux.org.uk \
--to=viro@ftp.linux.org.uk \
--cc=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=danarag@gmail.com \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
/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