summaryrefslogtreecommitdiffstats
path: root/fs/orangefs/file.c
diff options
context:
space:
mode:
authorMartin Brandenburg <martin@omnibond.com>2016-01-28 10:19:40 -0500
committerMike Marshall <hubcap@omnibond.com>2016-01-28 15:08:40 -0500
commit99109822f5cbe6d530eb55193b25aa5348f6134d (patch)
tree5545d59702d9c2c2a28af01849a35f380ce01980 /fs/orangefs/file.c
parent394f647e3ad073dab19ba081501e4a0ca05302c4 (diff)
downloadtalos-obmc-linux-99109822f5cbe6d530eb55193b25aa5348f6134d.tar.gz
talos-obmc-linux-99109822f5cbe6d530eb55193b25aa5348f6134d.zip
orangefs: Fix revalidate.
Previously, it would update a live inode. This was fixed, but it did not ever check that the inode attributes in the dcache are correct. This checks all inode attributes and rejects any that are not correct, which causes a lookup and thus a new getattr. Perhaps inode_operations->permission should replace or augment some of this. There is no actual caching, and this does a rather excessive amount of network operations back to the filesystem server. Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/file.c')
-rw-r--r--fs/orangefs/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c
index c585063d1100..7e6fe8d8ab2b 100644
--- a/fs/orangefs/file.c
+++ b/fs/orangefs/file.c
@@ -467,7 +467,7 @@ static ssize_t orangefs_file_write_iter(struct kiocb *iocb, struct iov_iter *ite
/* Make sure generic_write_checks sees an up to date inode size. */
if (file->f_flags & O_APPEND) {
rc = orangefs_inode_getattr(file->f_mapping->host,
- ORANGEFS_ATTR_SYS_SIZE);
+ ORANGEFS_ATTR_SYS_SIZE, 0);
if (rc) {
gossip_err("%s: orangefs_inode_getattr failed, rc:%zd:.\n",
__func__, rc);
@@ -681,7 +681,7 @@ static loff_t orangefs_file_llseek(struct file *file, loff_t offset, int origin)
* NOTE: We are only interested in file size here,
* so we set mask accordingly.
*/
- ret = orangefs_inode_getattr(inode, ORANGEFS_ATTR_SYS_SIZE);
+ ret = orangefs_inode_getattr(inode, ORANGEFS_ATTR_SYS_SIZE, 0);
if (ret) {
gossip_debug(GOSSIP_FILE_DEBUG,
"%s:%s:%d calling make bad inode\n",
OpenPOWER on IntegriCloud