[lkml]   [2005]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH NFS 3/3] Replace nfs_block_bits() with roundup_pow_of_two()
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 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 this is wrong. :-) The patch uses the built-in
> > roundup_pow_of_two() instead.
> What non-power-of-two target? Anything _not_ aligned to a power of two
> boundary is a BUG!

Furthermore, rounding UP in order to "correct" this non-alignment would
definitely be a bug.

If users choose to override the default rsize/wsize, that is almost
always in order to limit the UDP fragmentation per read/write request on
lossy networks. By rounding up, you are doubling the number of fragments
that the user requested instead of respecting the limit.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-07-25 01:28    [W:0.037 / U:2.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site