nfs4proc.c (c51f2ff0075b77f272da93b7155aa666a77c8fe7) | nfs4proc.c (5405fc44c3377358205ab4095fe9c44716aa0900) |
---|---|
1/* 2 * fs/nfs/nfs4proc.c 3 * 4 * Client-side procedure declarations for NFSv4. 5 * 6 * Copyright (c) 2002 The Regents of the University of Michigan. 7 * All rights reserved. 8 * --- 7449 unchanged lines hidden (view full) --- 7458 args->fc_attrs.max_rqst_sz, args->fc_attrs.max_resp_sz, 7459 args->fc_attrs.max_ops, args->fc_attrs.max_reqs); 7460 7461 /* Back channel attributes */ 7462 args->bc_attrs.max_rqst_sz = max_bc_payload; 7463 args->bc_attrs.max_resp_sz = max_bc_payload; 7464 args->bc_attrs.max_resp_sz_cached = 0; 7465 args->bc_attrs.max_ops = NFS4_MAX_BACK_CHANNEL_OPS; | 1/* 2 * fs/nfs/nfs4proc.c 3 * 4 * Client-side procedure declarations for NFSv4. 5 * 6 * Copyright (c) 2002 The Regents of the University of Michigan. 7 * All rights reserved. 8 * --- 7449 unchanged lines hidden (view full) --- 7458 args->fc_attrs.max_rqst_sz, args->fc_attrs.max_resp_sz, 7459 args->fc_attrs.max_ops, args->fc_attrs.max_reqs); 7460 7461 /* Back channel attributes */ 7462 args->bc_attrs.max_rqst_sz = max_bc_payload; 7463 args->bc_attrs.max_resp_sz = max_bc_payload; 7464 args->bc_attrs.max_resp_sz_cached = 0; 7465 args->bc_attrs.max_ops = NFS4_MAX_BACK_CHANNEL_OPS; |
7466 args->bc_attrs.max_reqs = NFS41_BC_MAX_CALLBACKS; | 7466 args->bc_attrs.max_reqs = min_t(unsigned short, max_session_cb_slots, 1); |
7467 7468 dprintk("%s: Back Channel : max_rqst_sz=%u max_resp_sz=%u " 7469 "max_resp_sz_cached=%u max_ops=%u max_reqs=%u\n", 7470 __func__, 7471 args->bc_attrs.max_rqst_sz, args->bc_attrs.max_resp_sz, 7472 args->bc_attrs.max_resp_sz_cached, args->bc_attrs.max_ops, 7473 args->bc_attrs.max_reqs); 7474} --- 30 unchanged lines hidden (view full) --- 7505 if (!(res->flags & SESSION4_BACK_CHAN)) 7506 goto out; 7507 if (rcvd->max_rqst_sz > sent->max_rqst_sz) 7508 return -EINVAL; 7509 if (rcvd->max_resp_sz < sent->max_resp_sz) 7510 return -EINVAL; 7511 if (rcvd->max_resp_sz_cached > sent->max_resp_sz_cached) 7512 return -EINVAL; | 7467 7468 dprintk("%s: Back Channel : max_rqst_sz=%u max_resp_sz=%u " 7469 "max_resp_sz_cached=%u max_ops=%u max_reqs=%u\n", 7470 __func__, 7471 args->bc_attrs.max_rqst_sz, args->bc_attrs.max_resp_sz, 7472 args->bc_attrs.max_resp_sz_cached, args->bc_attrs.max_ops, 7473 args->bc_attrs.max_reqs); 7474} --- 30 unchanged lines hidden (view full) --- 7505 if (!(res->flags & SESSION4_BACK_CHAN)) 7506 goto out; 7507 if (rcvd->max_rqst_sz > sent->max_rqst_sz) 7508 return -EINVAL; 7509 if (rcvd->max_resp_sz < sent->max_resp_sz) 7510 return -EINVAL; 7511 if (rcvd->max_resp_sz_cached > sent->max_resp_sz_cached) 7512 return -EINVAL; |
7513 /* These would render the backchannel useless: */ 7514 if (rcvd->max_ops != sent->max_ops) | 7513 if (rcvd->max_ops > sent->max_ops) |
7515 return -EINVAL; | 7514 return -EINVAL; |
7516 if (rcvd->max_reqs != sent->max_reqs) | 7515 if (rcvd->max_reqs > sent->max_reqs) |
7517 return -EINVAL; 7518out: 7519 return 0; 7520} 7521 7522static int nfs4_verify_channel_attrs(struct nfs41_create_session_args *args, 7523 struct nfs41_create_session_res *res) 7524{ --- 1509 unchanged lines hidden --- | 7516 return -EINVAL; 7517out: 7518 return 0; 7519} 7520 7521static int nfs4_verify_channel_attrs(struct nfs41_create_session_args *args, 7522 struct nfs41_create_session_res *res) 7523{ --- 1509 unchanged lines hidden --- |