Subject: [nfsv4] inconsistencies in CB_RECALL_ANY between base draft and blocks and objects drafts

From: "Mike Eisler" <[email-masked]>
Date: Fri, 2 May 2008 07:46:36 -0700 (PDT)

The 4.1 spec has:

   const RCA4_TYPE_MASK_BLK_LAYOUT_MIN     = 4;
   const RCA4_TYPE_MASK_BLK_LAYOUT_MAX     = 7;
   const RCA4_TYPE_MASK_OBJ_LAYOUT_MIN     = 8;
   const RCA4_TYPE_MASK_OBJ_LAYOUT_MAX     = 11;

The blocks spec has:

   ///const RCA4_BLK_LAYOUT_RECALL_ANY_LAYOUTS = 4;

   When the server sends a CB_RECALL_ANY request to a client specifying
   the RCA4_BLK_LAYOUT_RECALL_ANY_LAYOUTS bit in craa_type_mask, the
   client should immediately respond with NFS4_OK, and then
   asynchronously return complete file layouts until the number of files
   with layouts cached on the client is less the craa_object_to_keep.

   The block layout does not currently use bits 5, 6 or 7.  If any of
   these bits are set, the client should return NFS4ERR_INVAL.

If it doesn't currently use those bits, then how is it going to use them
later?

I propose renaming RCA4_TYPE_MASK_BLK_LAYOUT_MIN to
RCA4_TYPE_MASK_BLK_LAYOUT, deleting RCA4_TYPE_MASK_BLK_LAYOUT_MAX,
and change the blocks draft to remove:

   The block layout does not currently use bits 5, 6 or 7.  If any of
   these bits are set, the client should return NFS4ERR_INVAL.

and changing all occurences of RCA4_BLK_LAYOUT_RECALL_ANY_LAYOUTS to
RCA4_TYPE_MASK_BLK_LAYOUT.

Similarly, the objects draft has:

  const RCA4_TYPE_MASK_OBJ_LAYOUT_MIN     = 8;
   const RCA4_TYPE_MASK_OBJ_LAYOUT_MAX     = 11;

   struct  CB_RECALL_ANY4args      {
       uint32_t        craa_objects_to_keep;
       bitmap4         craa_type_mask;
   };

   Typically, CB_RECALL_ANY will be used to recall client state when the
   server needs to reclaim resources.  The craa_type_mask bitmap
   specifies the type of resources that are recalled and the
   craa_objects_to_keep value specifies how many of the recalled objects
   the client is allowed to keep.  The object-based layout type mask
   flags are defined as follows.  They represent the iomode of the
   recalled layouts.  In response, the client SHOULD return layouts of
   the recalled iomode that it needs the least, keeping at most
   craa_objects_to_keep object-based layouts.

///const PNFS_OSD_RCA4_TYPE_MASK_READ = RCA4_TYPE_MASK_OBJ_LAYOUT_MIN;
///const PNFS_OSD_RCA4_TYPE_MASK_RW   = RCA4_TYPE_MASK_OBJ_LAYOUT_MIN+1;

I propose changing
     const RCA4_TYPE_MASK_OBJ_LAYOUT_MAX     = 11;
to:
     const RCA4_TYPE_MASK_OBJ_LAYOUT_MAX     = 9;

-- 
Mike Eisler, Senior Technical Director, NetApp, 719 599 9026,
http://blogs.netapp.com/eislers_nfs_blog/

_______________________________________________
nfsv4 mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/nfsv4

---

From: [email-masked]
Date: Fri, 2 May 2008 10:52:35 -0400

I am okay with that change and will update the block spec accordingly.
-Jason

> -----Original Message-----
> From: [email-masked] [mailto:[email-masked]] On Behalf
Of
> Mike Eisler
> Sent: Friday, May 02, 2008 10:47 AM
> To: [email-masked]
> Subject: [nfsv4] inconsistencies in CB_RECALL_ANY between base draft
and
> blocks and objects drafts
> 
> The 4.1 spec has:
>

---

From: Benny Halevy <[email-masked]>
Date: Fri, 02 May 2008 18:09:13 +0300

>      const RCA4_TYPE_MASK_OBJ_LAYOUT_MAX     = 9;

That's OK with me.

[Ideally (for nfsv4.2? :) I think it would have been better if we had 
generic LAYOUT_READ and RW
mask bits and a separate layout_type field in CB_RECALL_ANY4args... 
especially if more layout
types will be specified in the future]

Benny