Merge tag 'nfs-for-5.9-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates from Trond Myklebust: "Stable fixes: - pNFS: Don't return layout segments that are being used for I/O - pNFS: Don't move layout segments off the active list when being used for I/O Features: - NFS: Add support for user xattrs through the NFSv4.2 protocol - NFS: Allow applications to speed up readdir+statx() using AT_STATX_DONT_SYNC - NFSv4.0 allow nconnect for v4.0 Bugfixes and cleanups: - nfs: ensure correct writeback errors are returned on close() - nfs: nfs_file_write() should check for writeback errors - nfs: Fix getxattr kernel panic and memory overflow - NFS: Fix the pNFS/flexfiles mirrored read failover code - SUNRPC: dont update timeout value on connection reset - freezer: Add unsafe versions of freezable_schedule_timeout_interruptible for NFS - sunrpc: destroy rpc_inode_cachep after unregister_filesystem" * tag 'nfs-for-5.9-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (32 commits) NFS: Fix flexfiles read failover fs: nfs: delete repeated words in comments rpc_pipefs: convert comma to semicolon nfs: Fix getxattr kernel panic and memory overflow NFS: Don't return layout segments that are in use NFS: Don't move layouts to plh_return_segs list while in use NFS: Add layout segment info to pnfs read/write/commit tracepoints NFS: Add tracepoints for layouterror and layoutstats. NFS: Report the stateid + status in trace_nfs4_layoutreturn_on_close() SUNRPC dont update timeout value on connection reset nfs: nfs_file_write() should check for writeback errors nfs: ensure correct writeback errors are returned on close() NFSv4.2: xattr cache: get rid of cache discard work queue NFS: remove redundant initialization of variable result NFSv4.0 allow nconnect for v4.0 freezer: Add unsafe versions of freezable_schedule_timeout_interruptible for NFS sunrpc: destroy rpc_inode_cachep after unregister_filesystem NFSv4.2: add client side xattr caching. NFSv4.2: hook in the user extended attribute handlers NFSv4.2: add the extended attribute proc functions. ...
This commit is contained in:
@@ -1510,6 +1510,6 @@ err_notifier:
|
||||
void unregister_rpc_pipefs(void)
|
||||
{
|
||||
rpc_clients_notifier_unregister();
|
||||
kmem_cache_destroy(rpc_inode_cachep);
|
||||
unregister_filesystem(&rpc_pipe_fs_type);
|
||||
kmem_cache_destroy(rpc_inode_cachep);
|
||||
}
|
||||
|
@@ -607,6 +607,11 @@ static void xprt_reset_majortimeo(struct rpc_rqst *req)
|
||||
req->rq_majortimeo += xprt_calc_majortimeo(req);
|
||||
}
|
||||
|
||||
static void xprt_reset_minortimeo(struct rpc_rqst *req)
|
||||
{
|
||||
req->rq_minortimeo += req->rq_timeout;
|
||||
}
|
||||
|
||||
static void xprt_init_majortimeo(struct rpc_task *task, struct rpc_rqst *req)
|
||||
{
|
||||
unsigned long time_init;
|
||||
@@ -618,6 +623,7 @@ static void xprt_init_majortimeo(struct rpc_task *task, struct rpc_rqst *req)
|
||||
time_init = xprt_abs_ktime_to_jiffies(task->tk_start);
|
||||
req->rq_timeout = task->tk_client->cl_timeout->to_initval;
|
||||
req->rq_majortimeo = time_init + xprt_calc_majortimeo(req);
|
||||
req->rq_minortimeo = time_init + req->rq_timeout;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -631,6 +637,8 @@ int xprt_adjust_timeout(struct rpc_rqst *req)
|
||||
const struct rpc_timeout *to = req->rq_task->tk_client->cl_timeout;
|
||||
int status = 0;
|
||||
|
||||
if (time_before(jiffies, req->rq_minortimeo))
|
||||
return status;
|
||||
if (time_before(jiffies, req->rq_majortimeo)) {
|
||||
if (to->to_exponential)
|
||||
req->rq_timeout <<= 1;
|
||||
@@ -649,6 +657,7 @@ int xprt_adjust_timeout(struct rpc_rqst *req)
|
||||
spin_unlock(&xprt->transport_lock);
|
||||
status = -ETIMEDOUT;
|
||||
}
|
||||
xprt_reset_minortimeo(req);
|
||||
|
||||
if (req->rq_timeout == 0) {
|
||||
printk(KERN_WARNING "xprt_adjust_timeout: rq_timeout = 0!\n");
|
||||
|
Reference in New Issue
Block a user