[pnfs] [PATCH 18/28] pnfsblock: ask for layout_blksize on mount
Benny Halevy
bhalevy at panasas.com
Thu Mar 13 14:40:10 EDT 2008
On Mar. 13, 2008, 20:24 +0200, Fredric Isaman <iisaman at citi.umich.edu> wrote:
<snip>
>>> @@ -3752,8 +3776,9 @@ static int decode_attr_supported(struct xdr_stream *xdr, uint32_t *bitmap, uint3
>>> decode_attr_bitmap(xdr, bitmask);
>>> bitmap[0] &= ~FATTR4_WORD0_SUPPORTED_ATTRS;
>>> } else
>>> - bitmask[0] = bitmask[1] = 0;
>>> - dprintk("%s: bitmask=0x%x%x\n", __FUNCTION__, bitmask[0], bitmask[1]);
>>> + bitmask[0] = bitmask[1] = bitmask[2] = 0;
>>> + dprintk("%s: bitmask=0x%x%x%x\n", __FUNCTION__,
>> that format string is problematic since it's too long, and
>> the %x's aren't zero padded. Let's use %08x:%08x:%08x instead.
>>
>
> I agree about the padding (note that that is a problem in the upstream
> code too). I'm not sure what you meant about "too long". Were you
> mistaking the first x for a format code?
>
%x%x%x,
even if done right as %x%08x%08x turns into a very long string (up to 24 characters).
Also, it's a bit confusing with respect to endianess on little endian machines
since if you looked at it as a real 96 bit-array the first word should actually
be printed last. Since it's actually an array of 3 words, each printed in a canonical
(cpu order) form, they better be delimited.
Benny
More information about the pNFS
mailing list