[PATCH v3] NFSv4.1: new layout stateid can not be overwrite by one out of date

2014-02-16 Thread shaobingqing
if the retrying cb_layout request arrived at the client after the layoutget reply, new layout stateid would be overwrite by one out of date. Signed-off-by: shaobingqing --- fs/nfs/callback_proc.c |9 +++-- fs/nfs/pnfs.c |3 ++- fs/nfs/pnfs.h |1 + 3 files chan

[PATCH v2] NFSv4.1: new layout stateid can not be overwrite by one out of date

2014-02-12 Thread shaobingqing
arrived at the client after the layoutget reply, new layout stateid would be overwrite by one out of date. Signed-off-by: shaobingqing --- fs/nfs/callback.h |5 + fs/nfs/callback_proc.c | 24 fs/nfs/inode.c |1 + include/linux/nfs_fs.h |1 + 4

[PATCH v2] SUNRPC: Allow one callback request to be received from two sk_buff

2014-02-07 Thread shaobingqing
bit of transport->tcp_flags will not be cleared. The second time xprt_alloc_bc_request could not alloc struct rpc_rqst any more and NULL pointer will be returned, then xprt_force_disconnect occur. I think one callback request can be allowed to be received from two sk_buff. Signed-off-by: shaobi

Re: [PATCH] SUNRPC: Allow one callback request to be received from two sk_buff

2014-01-22 Thread shaobingqing
2014/1/21 Trond Myklebust : > > On Jan 21, 2014, at 3:08, shaobingqing wrote: > >> 2014/1/21 Trond Myklebust : >>> On Mon, 2014-01-20 at 14:59 +0800, shaobingqing wrote: >>>> In current code, there only one struct rpc_rqst is prealloced. If one >>>&g

Re: [PATCH] SUNRPC: Allow one callback request to be received from two sk_buff

2014-01-22 Thread shaobingqing
2014/1/23 J. Bruce Fields : > On Tue, Jan 21, 2014 at 08:35:36AM -0700, Trond Myklebust wrote: >> >> On Jan 21, 2014, at 3:08, shaobingqing wrote: >> >> > 2014/1/21 Trond Myklebust : >> >> On Mon, 2014-01-20 at 14:59 +0800, shaobingqing wrote: >

Re: [PATCH] SUNRPC: Allow one callback request to be received from two sk_buff

2014-01-21 Thread shaobingqing
2014/1/21 Trond Myklebust : > On Mon, 2014-01-20 at 14:59 +0800, shaobingqing wrote: >> In current code, there only one struct rpc_rqst is prealloced. If one >> callback request is received from two sk_buff, the xprt_alloc_bc_request >> would be execute two times with the sam

[PATCH] NFSv4.1: PNFS_BLOCK_NONE_DATA should be handle properly in bl_add_merge_extent?

2014-01-20 Thread shaobingqing
n the function bl_add_merge_extent will return -EIO. Furthermore, the READ op which request the layout will be execute in band. This perhaps not only degrade performance, but also result in data unconsistency. Signed-off-by: shaobingqing --- fs/nfs/blocklayout/extents.c |

[PATCH] NFSv4.1: new layout stateid can not be overwrite by one out of date

2014-01-20 Thread shaobingqing
arrived at the client after the layoutget reply, new layout stateid would be overwrite by one out of date. Signed-off-by: shaobingqing --- fs/nfs/callback_proc.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index ae2e87b

[PATCH] SUNRPC: Allow one callback request to be received from two sk_buff

2014-01-19 Thread shaobingqing
off-by: shaobingqing --- net/sunrpc/xprtsock.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index ee03d35..606950d 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -1271,8 +1271,13 @@ static inli

[PATCH] nfs: don't update isize when NFS_INO_LAYOUTCOMMITTING in nfs_update_inode

2014-01-13 Thread shaobingqing
When a file is in NFS_INO_LAYOUTCOMMITING status, its isize perhaps has not been transferred to the metadate server. So the isize getting from the metadata server perhaps is out of date and cannot be used to update the isize of the client. Signed-off-by: shaobingqing --- fs/nfs/inode.c