Re: [PATCH NFS 3/3] Replace nfs_block_bits() with roundup_pow_of_two()

2005-07-26 Thread Rene Scharfe
On Tue, Jul 26, 2005 at 01:48:46PM -0400, Trond Myklebust wrote: > I really don't like the choice of name. If you feel you must change the > name, then make it something like nfs_blocksize_align(). That describes > its function, instead of the implementation details. Yes, rounddown_pow_of_two() be

Re: [PATCH NFS 3/3] Replace nfs_block_bits() with roundup_pow_of_two()

2005-07-26 Thread Peter Staubach
Trond Myklebust wrote: må den 25.07.2005 Klokka 17:56 (+0200) skreiv Rene Scharfe: What's your opinion of the following patch, which explicitly states the intent of nfs_block_bits()? It still needs patch 1 and 2. I really don't like the choice of name. If you feel you must change th

Re: [PATCH NFS 3/3] Replace nfs_block_bits() with roundup_pow_of_two()

2005-07-26 Thread Trond Myklebust
må den 25.07.2005 Klokka 17:56 (+0200) skreiv Rene Scharfe: > What's your opinion of the following patch, which explicitly states the > intent of nfs_block_bits()? It still needs patch 1 and 2. I really don't like the choice of name. If you feel you must change the name, then make it something l

Re: [PATCH NFS 3/3] Replace nfs_block_bits() with roundup_pow_of_two()

2005-07-25 Thread Rene Scharfe
On Sun, Jul 24, 2005 at 07:24:23PM -0400, Trond Myklebust wrote: > su den 24.07.2005 Klokka 19:09 (-0400) skreiv Trond Myklebust: > > What non-power-of-two target? Anything _not_ aligned to a power of two > > boundary is a BUG! So we could simply replace the loop in nfs_block_bits() with call to B

Re: [PATCH NFS 3/3] Replace nfs_block_bits() with roundup_pow_of_two()

2005-07-24 Thread Trond Myklebust
su den 24.07.2005 Klokka 19:09 (-0400) skreiv Trond Myklebust: > su den 24.07.2005 Klokka 16:36 (+0200) skreiv Rene Scharfe: > > [PATCH NFS 3/3] Replace nfs_block_bits() with roundup_pow_of_two() > > > > Function nfs_block_bits() an open-coded version

Re: [PATCH NFS 3/3] Replace nfs_block_bits() with roundup_pow_of_two()

2005-07-24 Thread Trond Myklebust
su den 24.07.2005 Klokka 16:36 (+0200) skreiv Rene Scharfe: > [PATCH NFS 3/3] Replace nfs_block_bits() with roundup_pow_of_two() > > Function nfs_block_bits() an open-coded version of (the non-existing) > rounddown_pow_of_two(). That means that for non-power-of-two target > sizes

[PATCH NFS 3/3] Replace nfs_block_bits() with roundup_pow_of_two()

2005-07-24 Thread Rene Scharfe
[PATCH NFS 3/3] Replace nfs_block_bits() with roundup_pow_of_two() Function nfs_block_bits() an open-coded version of (the non-existing) rounddown_pow_of_two(). That means that for non-power-of-two target sizes it returns half the size needed for a block to fully contain the target. I guess