Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NFSv4.1 restrict GETATTR fs_location query to the main transport

In the presence of trunking transports, it's helpful to make sure
that during the migration event, the GETATTR for fs_location attribute
happens on the main transport.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>

authored by

Olga Kornievskaia and committed by
Trond Myklebust
b4be2c59 cb8fac6d

+13 -2
+13 -2
fs/nfs/nfs4proc.c
··· 8008 8008 .rpc_resp = &res, 8009 8009 .rpc_cred = cred, 8010 8010 }; 8011 + struct nfs4_call_sync_data data = { 8012 + .seq_server = server, 8013 + .seq_args = &args.seq_args, 8014 + .seq_res = &res.seq_res, 8015 + }; 8016 + struct rpc_task_setup task_setup_data = { 8017 + .rpc_client = clnt, 8018 + .rpc_message = &msg, 8019 + .callback_ops = server->nfs_client->cl_mvops->call_sync_ops, 8020 + .callback_data = &data, 8021 + .flags = RPC_TASK_NO_ROUND_ROBIN, 8022 + }; 8011 8023 int status; 8012 8024 8013 8025 nfs_fattr_init(&locations->fattr); ··· 8027 8015 locations->nlocations = 0; 8028 8016 8029 8017 nfs4_init_sequence(&args.seq_args, &res.seq_res, 0, 1); 8030 - status = nfs4_call_sync_sequence(clnt, server, &msg, 8031 - &args.seq_args, &res.seq_res); 8018 + status = nfs4_call_sync_custom(&task_setup_data); 8032 8019 if (status == NFS4_OK && 8033 8020 res.seq_res.sr_status_flags & SEQ4_STATUS_LEASE_MOVED) 8034 8021 status = -NFS4ERR_LEASE_MOVED;