[pnfs] [PATCH 07/10] pnfs: Move getdeviceinfo to draft-19 on client
Benny Halevy
bhalevy at panasas.com
Sun Feb 10 04:44:38 EST 2008
On Feb. 10, 2008, 11:28 +0200, Benny Halevy <bhalevy at panasas.com> wrote:
> On Feb. 09, 2008, 10:26 +0200, Marc Eshel <eshel at almaden.ibm.com> wrote:
>> From: Dean Hildebrand <dhildeb at us.ibm.com>
>> + /* Always 1 bitmap */
>
> Hmm, I believe it's legal to get a zero length bitmap on the result.
>
>> + READ_BUF(8);
>> + READ32(tlen);
>> + READ32(res->dev_notify_types);
>
> if (tlen)
> READ32(res->dev_notify_types);
> else
> res->dev_notify_types = 0;
Actually, READ_BUF(8) is wrong in the tlen == 0 case, so that should be:
+ /* At most one bitmap word */
+ READ_BUF(4);
+ READ32(tlen);
+ if (tlen) {
+ READ_BUF(4);
+ READ32(res->dev_notify_types);
+ } else
+ res->dev_notify_types = 0;
More information about the pNFS
mailing list