diff options
author | Peng Tao <bergwolf@gmail.com> | 2011-07-30 20:52:31 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-04 21:58:37 -0700 |
commit | a14f191cda33a02a74edbf59820150e415d68616 (patch) | |
tree | 0b5fc1cc18d7110070f8fec5cf9716a6647d849f /fs/nfs/pnfs.c | |
parent | cb1d0a1e91079d22cedc6d66d9c94d53ce0b0199 (diff) | |
download | kernel_samsung_smdk4412-a14f191cda33a02a74edbf59820150e415d68616.zip kernel_samsung_smdk4412-a14f191cda33a02a74edbf59820150e415d68616.tar.gz kernel_samsung_smdk4412-a14f191cda33a02a74edbf59820150e415d68616.tar.bz2 |
pnfs: save layoutcommit lwb at layout header
commit acff5880539fe33897d016c0f3dcf062e67c61b6 upstream.
No need to save it for every lseg.
[Needed in v3.0]
Signed-off-by: Peng Tao <peng_tao@emc.com>
Signed-off-by: Jim Rees <rees@umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r-- | fs/nfs/pnfs.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 29c0ca7..fb1bcf1 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -1224,9 +1224,11 @@ pnfs_set_layoutcommit(struct nfs_write_data *wdata) dprintk("%s: Set layoutcommit for inode %lu ", __func__, wdata->inode->i_ino); } - if (end_pos > wdata->lseg->pls_end_pos) - wdata->lseg->pls_end_pos = end_pos; + if (end_pos > nfsi->layout->plh_lwb) + nfsi->layout->plh_lwb = end_pos; spin_unlock(&nfsi->vfs_inode.i_lock); + dprintk("%s: lseg %p end_pos %llu\n", + __func__, wdata->lseg, nfsi->layout->plh_lwb); /* if pnfs_layoutcommit_inode() runs between inode locks, the next one * will be a noop because NFS_INO_LAYOUTCOMMIT will not be set */ @@ -1278,9 +1280,9 @@ pnfs_layoutcommit_inode(struct inode *inode, bool sync) */ lseg = pnfs_list_write_lseg(inode); - end_pos = lseg->pls_end_pos; + end_pos = nfsi->layout->plh_lwb; cred = lseg->pls_lc_cred; - lseg->pls_end_pos = 0; + nfsi->layout->plh_lwb = 0; lseg->pls_lc_cred = NULL; memcpy(&data->args.stateid.data, nfsi->layout->plh_stateid.data, |