Re: [PATCH 2/2] NFSv4.1: Fix a race in nfs4_write_inode

2014-01-17 Thread Peng Tao
On Fri, Jan 17, 2014 at 1:11 AM, Trond Myklebust wrote: > > On Jan 16, 2014, at 10:49, Peng Tao wrote: >> On Tue, Jan 14, 2014 at 2:45 AM, Trond Myklebust >> wrote: >>> void pnfs_set_lo_fail(struct pnfs_layout_segment *lseg) >>> @@ -1881,43 +1887,37 @@ pnfs_layoutcommit_inode(struct inode

Re: [PATCH 2/2] NFSv4.1: Fix a race in nfs4_write_inode

2014-01-17 Thread Peng Tao
On Fri, Jan 17, 2014 at 1:11 AM, Trond Myklebust trond.mykleb...@primarydata.com wrote: On Jan 16, 2014, at 10:49, Peng Tao bergw...@gmail.com wrote: On Tue, Jan 14, 2014 at 2:45 AM, Trond Myklebust trond.mykleb...@primarydata.com wrote: void pnfs_set_lo_fail(struct pnfs_layout_segment *lseg)

Re: [PATCH 2/2] NFSv4.1: Fix a race in nfs4_write_inode

2014-01-16 Thread Trond Myklebust
On Jan 16, 2014, at 10:49, Peng Tao wrote: > On Tue, Jan 14, 2014 at 2:45 AM, Trond Myklebust > wrote: >> void pnfs_set_lo_fail(struct pnfs_layout_segment *lseg) >> @@ -1881,43 +1887,37 @@ pnfs_layoutcommit_inode(struct inode *inode, bool >> sync) >>struct nfs4_layoutcommit_data *data;

Re: [PATCH 2/2] NFSv4.1: Fix a race in nfs4_write_inode

2014-01-16 Thread Peng Tao
On Tue, Jan 14, 2014 at 2:45 AM, Trond Myklebust wrote: > nfs4_write_inode() must not be allowed to exit until the layoutcommit > is done. That means that both NFS_INO_LAYOUTCOMMIT and > NFS_INO_LAYOUTCOMMITTING have to be cleared. > > Signed-off-by: Trond Myklebust > --- > fs/nfs/nfs4super.c |

Re: [PATCH 2/2] NFSv4.1: Fix a race in nfs4_write_inode

2014-01-16 Thread Peng Tao
On Tue, Jan 14, 2014 at 2:45 AM, Trond Myklebust trond.mykleb...@primarydata.com wrote: nfs4_write_inode() must not be allowed to exit until the layoutcommit is done. That means that both NFS_INO_LAYOUTCOMMIT and NFS_INO_LAYOUTCOMMITTING have to be cleared. Signed-off-by: Trond Myklebust

Re: [PATCH 2/2] NFSv4.1: Fix a race in nfs4_write_inode

2014-01-16 Thread Trond Myklebust
On Jan 16, 2014, at 10:49, Peng Tao bergw...@gmail.com wrote: On Tue, Jan 14, 2014 at 2:45 AM, Trond Myklebust trond.mykleb...@primarydata.com wrote: void pnfs_set_lo_fail(struct pnfs_layout_segment *lseg) @@ -1881,43 +1887,37 @@ pnfs_layoutcommit_inode(struct inode *inode, bool sync)

[PATCH 2/2] NFSv4.1: Fix a race in nfs4_write_inode

2014-01-13 Thread Trond Myklebust
nfs4_write_inode() must not be allowed to exit until the layoutcommit is done. That means that both NFS_INO_LAYOUTCOMMIT and NFS_INO_LAYOUTCOMMITTING have to be cleared. Signed-off-by: Trond Myklebust --- fs/nfs/nfs4super.c | 14 +++- fs/nfs/pnfs.c | 67

[PATCH 2/2] NFSv4.1: Fix a race in nfs4_write_inode

2014-01-13 Thread Trond Myklebust
nfs4_write_inode() must not be allowed to exit until the layoutcommit is done. That means that both NFS_INO_LAYOUTCOMMIT and NFS_INO_LAYOUTCOMMITTING have to be cleared. Signed-off-by: Trond Myklebust trond.mykleb...@primarydata.com --- fs/nfs/nfs4super.c | 14 +++- fs/nfs/pnfs.c |