Skip to content

Commit

Permalink
Completed NFS 4.1 defintion of open_claim4
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter-JanGootzen committed Dec 10, 2022
1 parent ba05c61 commit c7f5206
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
8 changes: 8 additions & 0 deletions nfs4/libnfs-raw-nfs4.c
Original file line number Diff line number Diff line change
Expand Up @@ -1925,6 +1925,14 @@ zdr_open_claim4 (ZDR *zdrs, open_claim4 *objp)
if (!zdr_component4 (zdrs, &objp->open_claim4_u.file_delegate_prev))
return FALSE;
break;
case CLAIM_FH:
break;
case CLAIM_DELEG_PREV_FH:
break;
case CLAIM_DELEG_CUR_FH:
if (!zdr_stateid4 (zdrs, &objp->open_claim4_u.oc_delegate_stateid))
return FALSE;
break;
default:
return FALSE;
}
Expand Down
1 change: 1 addition & 0 deletions nfs4/libnfs-raw-nfs4.h
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,7 @@ struct open_claim4 {
open_delegation_type4 delegate_type;
open_claim_delegate_cur4 delegate_cur_info;
component4 file_delegate_prev;
stateid4 oc_delegate_stateid;
} open_claim4_u;
};
typedef struct open_claim4 open_claim4;
Expand Down
30 changes: 29 additions & 1 deletion nfs4/nfs4.x
Original file line number Diff line number Diff line change
Expand Up @@ -990,8 +990,36 @@ union open_claim4 switch (open_claim_type4 claim) {
* instance of the client. File is specified by name.
*/
case CLAIM_DELEGATE_PREV:
/* CURRENT_FH: directory */
/* CURRENT_FH: directory */
component4 file_delegate_prev;

/*
* Like CLAIM_NULL. No special rights
* to file. Ordinary OPEN of the
* specified file by current filehandle.
*/
case CLAIM_FH: /* new to v4.1 */
/* CURRENT_FH: regular file to open */
void;

/*
* Like CLAIM_DELEGATE_PREV. Right to file based on a
* delegation granted to a previous boot
* instance of the client. File is identified by
* by filehandle.
*/
case CLAIM_DELEG_PREV_FH: /* new to v4.1 */
/* CURRENT_FH: file being opened */
void;

/*
* Like CLAIM_DELEGATE_CUR. Right to file based on
* a delegation granted by the server.
* File is identified by filehandle.
*/
case CLAIM_DELEG_CUR_FH: /* new to v4.1 */
/* CURRENT_FH: file being opened */
stateid4 oc_delegate_stateid;
};

/*
Expand Down

0 comments on commit c7f5206

Please sign in to comment.