Skip to content

Commit fb9bf40

Browse files
committed
Merge tag 'nfs-for-5.5-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates from Trond Myklebust: "Highlights include: Features: - NFSv4.2 now supports cross device offloaded copy (i.e. offloaded copy of a file from one source server to a different target server). - New RDMA tracepoints for debugging congestion control and Local Invalidate WRs. Bugfixes and cleanups - Drop the NFSv4.1 session slot if nfs4_delegreturn_prepare waits for layoutreturn - Handle bad/dead sessions correctly in nfs41_sequence_process() - Various bugfixes to the delegation return operation. - Various bugfixes pertaining to delegations that have been revoked. - Cleanups to the NFS timespec code to avoid unnecessary conversions between timespec and timespec64. - Fix unstable RDMA connections after a reconnect - Close race between waking an RDMA sender and posting a receive - Wake pending RDMA tasks if connection fails - Fix MR list corruption, and clean up MR usage - Fix another RPCSEC_GSS issue with MIC buffer space" * tag 'nfs-for-5.5-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (79 commits) SUNRPC: Capture completion of all RPC tasks SUNRPC: Fix another issue with MIC buffer space NFS4: Trace lock reclaims NFS4: Trace state recovery operation NFSv4.2 fix memory leak in nfs42_ssc_open NFSv4.2 fix kfree in __nfs42_copy_file_range NFS: remove duplicated include from nfs4file.c NFSv4: Make _nfs42_proc_copy_notify() static NFS: Fallocate should use the nfs4_fattr_bitmap NFS: Return -ETXTBSY when attempting to write to a swapfile fs: nfs: sysfs: Remove NULL check before kfree NFS: remove unneeded semicolon NFSv4: add declaration of current_stateid NFSv4.x: Drop the slot if nfs4_delegreturn_prepare waits for layoutreturn NFSv4.x: Handle bad/dead sessions correctly in nfs41_sequence_process() nfsv4: Move NFSPROC4_CLNT_COPY_NOTIFY to end of list SUNRPC: Avoid RPC delays when exiting suspend NFS: Add a tracepoint in nfs_fh_to_dentry() NFSv4: Don't retry the GETATTR on old stateid in nfs4_delegreturn_done() NFSv4: Handle NFS4ERR_OLD_STATEID in delegreturn ...
2 parents 94e89b4 + a264aba commit fb9bf40

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1756
-622
lines changed

fs/lockd/host.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,8 @@ nlm_bind_host(struct nlm_host *host)
464464
.version = host->h_version,
465465
.authflavor = RPC_AUTH_UNIX,
466466
.flags = (RPC_CLNT_CREATE_NOPING |
467-
RPC_CLNT_CREATE_AUTOBIND),
467+
RPC_CLNT_CREATE_AUTOBIND |
468+
RPC_CLNT_CREATE_REUSEPORT),
468469
.cred = host->h_cred,
469470
};
470471

fs/nfs/callback.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ struct cb_getattrres {
7272
uint32_t bitmap[2];
7373
uint64_t size;
7474
uint64_t change_attr;
75-
struct timespec ctime;
76-
struct timespec mtime;
75+
struct timespec64 ctime;
76+
struct timespec64 mtime;
7777
};
7878

7979
struct cb_recallargs {

fs/nfs/callback_proc.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ __be32 nfs4_callback_getattr(void *argp, void *resp,
2626
struct cb_getattrargs *args = argp;
2727
struct cb_getattrres *res = resp;
2828
struct nfs_delegation *delegation;
29-
struct nfs_inode *nfsi;
3029
struct inode *inode;
3130

3231
res->status = htonl(NFS4ERR_OP_NOT_IN_SESSION);
@@ -47,17 +46,16 @@ __be32 nfs4_callback_getattr(void *argp, void *resp,
4746
-ntohl(res->status));
4847
goto out;
4948
}
50-
nfsi = NFS_I(inode);
5149
rcu_read_lock();
52-
delegation = rcu_dereference(nfsi->delegation);
50+
delegation = nfs4_get_valid_delegation(inode);
5351
if (delegation == NULL || (delegation->type & FMODE_WRITE) == 0)
5452
goto out_iput;
5553
res->size = i_size_read(inode);
5654
res->change_attr = delegation->change_attr;
5755
if (nfs_have_writebacks(inode))
5856
res->change_attr++;
59-
res->ctime = timespec64_to_timespec(inode->i_ctime);
60-
res->mtime = timespec64_to_timespec(inode->i_mtime);
57+
res->ctime = inode->i_ctime;
58+
res->mtime = inode->i_mtime;
6159
res->bitmap[0] = (FATTR4_WORD0_CHANGE|FATTR4_WORD0_SIZE) &
6260
args->bitmap[0];
6361
res->bitmap[1] = (FATTR4_WORD1_TIME_METADATA|FATTR4_WORD1_TIME_MODIFY) &

fs/nfs/callback_xdr.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ static __be32 encode_attr_size(struct xdr_stream *xdr, const uint32_t *bitmap, u
627627
return 0;
628628
}
629629

630-
static __be32 encode_attr_time(struct xdr_stream *xdr, const struct timespec *time)
630+
static __be32 encode_attr_time(struct xdr_stream *xdr, const struct timespec64 *time)
631631
{
632632
__be32 *p;
633633

@@ -639,14 +639,14 @@ static __be32 encode_attr_time(struct xdr_stream *xdr, const struct timespec *ti
639639
return 0;
640640
}
641641

642-
static __be32 encode_attr_ctime(struct xdr_stream *xdr, const uint32_t *bitmap, const struct timespec *time)
642+
static __be32 encode_attr_ctime(struct xdr_stream *xdr, const uint32_t *bitmap, const struct timespec64 *time)
643643
{
644644
if (!(bitmap[1] & FATTR4_WORD1_TIME_METADATA))
645645
return 0;
646646
return encode_attr_time(xdr,time);
647647
}
648648

649-
static __be32 encode_attr_mtime(struct xdr_stream *xdr, const uint32_t *bitmap, const struct timespec *time)
649+
static __be32 encode_attr_mtime(struct xdr_stream *xdr, const uint32_t *bitmap, const struct timespec64 *time)
650650
{
651651
if (!(bitmap[1] & FATTR4_WORD1_TIME_MODIFY))
652652
return 0;

fs/nfs/client.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,12 @@ static struct nfs_client *nfs_match_client(const struct nfs_client_initdata *dat
312312
/* Match nfsv4 minorversion */
313313
if (clp->cl_minorversion != data->minorversion)
314314
continue;
315+
316+
/* Match request for a dedicated DS */
317+
if (test_bit(NFS_CS_DS, &data->init_flags) !=
318+
test_bit(NFS_CS_DS, &clp->cl_flags))
319+
continue;
320+
315321
/* Match the full socket address */
316322
if (!rpc_cmp_addr_port(sap, clap))
317323
/* Match all xprt_switch full socket addresses */
@@ -515,6 +521,10 @@ int nfs_create_rpc_client(struct nfs_client *clp,
515521
args.flags |= RPC_CLNT_CREATE_NONPRIVPORT;
516522
if (test_bit(NFS_CS_INFINITE_SLOTS, &clp->cl_flags))
517523
args.flags |= RPC_CLNT_CREATE_INFINITE_SLOTS;
524+
if (test_bit(NFS_CS_NOPING, &clp->cl_flags))
525+
args.flags |= RPC_CLNT_CREATE_NOPING;
526+
if (test_bit(NFS_CS_REUSEPORT, &clp->cl_flags))
527+
args.flags |= RPC_CLNT_CREATE_REUSEPORT;
518528

519529
if (!IS_ERR(clp->cl_rpcclient))
520530
return 0;
@@ -662,6 +672,7 @@ static int nfs_init_server(struct nfs_server *server,
662672
.timeparms = &timeparms,
663673
.cred = server->cred,
664674
.nconnect = data->nfs_server.nconnect,
675+
.init_flags = (1UL << NFS_CS_REUSEPORT),
665676
};
666677
struct nfs_client *clp;
667678
int error;

0 commit comments

Comments
 (0)