aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-10 18:02:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-10 18:02:42 -0400
commitd1e1cda862c16252087374ac75949b0e89a5717e (patch)
tree544ce467bed23638949a1991b4f7b00e7472baa4 /fs/nfs/inode.c
parent07888238f55056605cd23aa4ea3ca97d5e15938f (diff)
parenta914722f333b3359d2f4f12919380a334176bb89 (diff)
Merge tag 'nfs-for-3.16-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates from Trond Myklebust: "Highlights include: - massive cleanup of the NFS read/write code by Anna and Dros - support multiple NFS read/write requests per page in order to deal with non-page aligned pNFS striping. Also cleans up the r/wsize < page size code nicely. - stable fix for ensuring inode is declared uptodate only after all the attributes have been checked. - stable fix for a kernel Oops when remounting - NFS over RDMA client fixes - move the pNFS files layout driver into its own subdirectory" * tag 'nfs-for-3.16-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (79 commits) NFS: populate ->net in mount data when remounting pnfs: fix lockup caused by pnfs_generic_pg_test NFSv4.1: Fix typo in dprintk NFSv4.1: Comment is now wrong and redundant to code NFS: Use raw_write_seqcount_begin/end int nfs4_reclaim_open_state xprtrdma: Disconnect on registration failure xprtrdma: Remove BUG_ON() call sites xprtrdma: Avoid deadlock when credit window is reset SUNRPC: Move congestion window constants to header file xprtrdma: Reset connection timeout after successful reconnect xprtrdma: Use macros for reconnection timeout constants xprtrdma: Allocate missing pagelist xprtrdma: Remove Tavor MTU setting xprtrdma: Ensure ia->ri_id->qp is not NULL when reconnecting xprtrdma: Reduce the number of hardway buffer allocations xprtrdma: Limit work done by completion handler xprtrmda: Reduce calls to ib_poll_cq() in completion handlers xprtrmda: Reduce lock contention in completion handlers xprtrdma: Split the completion queue xprtrdma: Make rpcrdma_ep_destroy() return void ...
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index e6f7398d2b3c..c496f8a74639 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1575,18 +1575,20 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
1575 inode->i_version = fattr->change_attr; 1575 inode->i_version = fattr->change_attr;
1576 } 1576 }
1577 } else if (server->caps & NFS_CAP_CHANGE_ATTR) 1577 } else if (server->caps & NFS_CAP_CHANGE_ATTR)
1578 invalid |= save_cache_validity; 1578 nfsi->cache_validity |= save_cache_validity;
1579 1579
1580 if (fattr->valid & NFS_ATTR_FATTR_MTIME) { 1580 if (fattr->valid & NFS_ATTR_FATTR_MTIME) {
1581 memcpy(&inode->i_mtime, &fattr->mtime, sizeof(inode->i_mtime)); 1581 memcpy(&inode->i_mtime, &fattr->mtime, sizeof(inode->i_mtime));
1582 } else if (server->caps & NFS_CAP_MTIME) 1582 } else if (server->caps & NFS_CAP_MTIME)
1583 invalid |= save_cache_validity & (NFS_INO_INVALID_ATTR 1583 nfsi->cache_validity |= save_cache_validity &
1584 (NFS_INO_INVALID_ATTR
1584 | NFS_INO_REVAL_FORCED); 1585 | NFS_INO_REVAL_FORCED);
1585 1586
1586 if (fattr->valid & NFS_ATTR_FATTR_CTIME) { 1587 if (fattr->valid & NFS_ATTR_FATTR_CTIME) {
1587 memcpy(&inode->i_ctime, &fattr->ctime, sizeof(inode->i_ctime)); 1588 memcpy(&inode->i_ctime, &fattr->ctime, sizeof(inode->i_ctime));
1588 } else if (server->caps & NFS_CAP_CTIME) 1589 } else if (server->caps & NFS_CAP_CTIME)
1589 invalid |= save_cache_validity & (NFS_INO_INVALID_ATTR 1590 nfsi->cache_validity |= save_cache_validity &
1591 (NFS_INO_INVALID_ATTR
1590 | NFS_INO_REVAL_FORCED); 1592 | NFS_INO_REVAL_FORCED);
1591 1593
1592 /* Check if our cached file size is stale */ 1594 /* Check if our cached file size is stale */
@@ -1608,7 +1610,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
1608 (long long)new_isize); 1610 (long long)new_isize);
1609 } 1611 }
1610 } else 1612 } else
1611 invalid |= save_cache_validity & (NFS_INO_INVALID_ATTR 1613 nfsi->cache_validity |= save_cache_validity &
1614 (NFS_INO_INVALID_ATTR
1612 | NFS_INO_REVAL_PAGECACHE 1615 | NFS_INO_REVAL_PAGECACHE
1613 | NFS_INO_REVAL_FORCED); 1616 | NFS_INO_REVAL_FORCED);
1614 1617
@@ -1616,7 +1619,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
1616 if (fattr->valid & NFS_ATTR_FATTR_ATIME) 1619 if (fattr->valid & NFS_ATTR_FATTR_ATIME)
1617 memcpy(&inode->i_atime, &fattr->atime, sizeof(inode->i_atime)); 1620 memcpy(&inode->i_atime, &fattr->atime, sizeof(inode->i_atime));
1618 else if (server->caps & NFS_CAP_ATIME) 1621 else if (server->caps & NFS_CAP_ATIME)
1619 invalid |= save_cache_validity & (NFS_INO_INVALID_ATIME 1622 nfsi->cache_validity |= save_cache_validity &
1623 (NFS_INO_INVALID_ATIME
1620 | NFS_INO_REVAL_FORCED); 1624 | NFS_INO_REVAL_FORCED);
1621 1625
1622 if (fattr->valid & NFS_ATTR_FATTR_MODE) { 1626 if (fattr->valid & NFS_ATTR_FATTR_MODE) {
@@ -1627,7 +1631,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
1627 invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL; 1631 invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL;
1628 } 1632 }
1629 } else if (server->caps & NFS_CAP_MODE) 1633 } else if (server->caps & NFS_CAP_MODE)
1630 invalid |= save_cache_validity & (NFS_INO_INVALID_ATTR 1634 nfsi->cache_validity |= save_cache_validity &
1635 (NFS_INO_INVALID_ATTR
1631 | NFS_INO_INVALID_ACCESS 1636 | NFS_INO_INVALID_ACCESS
1632 | NFS_INO_INVALID_ACL 1637 | NFS_INO_INVALID_ACL
1633 | NFS_INO_REVAL_FORCED); 1638 | NFS_INO_REVAL_FORCED);
@@ -1638,7 +1643,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
1638 inode->i_uid = fattr->uid; 1643 inode->i_uid = fattr->uid;
1639 } 1644 }
1640 } else if (server->caps & NFS_CAP_OWNER) 1645 } else if (server->caps & NFS_CAP_OWNER)
1641 invalid |= save_cache_validity & (NFS_INO_INVALID_ATTR 1646 nfsi->cache_validity |= save_cache_validity &
1647 (NFS_INO_INVALID_ATTR
1642 | NFS_INO_INVALID_ACCESS 1648 | NFS_INO_INVALID_ACCESS
1643 | NFS_INO_INVALID_ACL 1649 | NFS_INO_INVALID_ACL
1644 | NFS_INO_REVAL_FORCED); 1650 | NFS_INO_REVAL_FORCED);
@@ -1649,7 +1655,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
1649 inode->i_gid = fattr->gid; 1655 inode->i_gid = fattr->gid;
1650 } 1656 }
1651 } else if (server->caps & NFS_CAP_OWNER_GROUP) 1657 } else if (server->caps & NFS_CAP_OWNER_GROUP)
1652 invalid |= save_cache_validity & (NFS_INO_INVALID_ATTR 1658 nfsi->cache_validity |= save_cache_validity &
1659 (NFS_INO_INVALID_ATTR
1653 | NFS_INO_INVALID_ACCESS 1660 | NFS_INO_INVALID_ACCESS
1654 | NFS_INO_INVALID_ACL 1661 | NFS_INO_INVALID_ACL
1655 | NFS_INO_REVAL_FORCED); 1662 | NFS_INO_REVAL_FORCED);
@@ -1662,7 +1669,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
1662 set_nlink(inode, fattr->nlink); 1669 set_nlink(inode, fattr->nlink);
1663 } 1670 }
1664 } else if (server->caps & NFS_CAP_NLINK) 1671 } else if (server->caps & NFS_CAP_NLINK)
1665 invalid |= save_cache_validity & (NFS_INO_INVALID_ATTR 1672 nfsi->cache_validity |= save_cache_validity &
1673 (NFS_INO_INVALID_ATTR
1666 | NFS_INO_REVAL_FORCED); 1674 | NFS_INO_REVAL_FORCED);
1667 1675
1668 if (fattr->valid & NFS_ATTR_FATTR_SPACE_USED) { 1676 if (fattr->valid & NFS_ATTR_FATTR_SPACE_USED) {