orangefs: Do not retrieve size from servers unless it it necessary.
authorMartin Brandenburg <martin@omnibond.com>
Wed, 3 Feb 2016 21:56:24 +0000 (16:56 -0500)
committerMike Marshall <hubcap@omnibond.com>
Thu, 4 Feb 2016 19:12:43 +0000 (14:12 -0500)
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/inode.c

index e9688f0b99d765fb4839ce2cbfcbc5b14d191ed7..d2923dc9138862a83f84280f6dcf562380682a49 100644 (file)
@@ -411,7 +411,8 @@ struct inode *orangefs_iget(struct super_block *sb, struct orangefs_object_kref
        if (!inode || !(inode->i_state & I_NEW))
                return inode;
 
-       error = orangefs_inode_getattr(inode, ORANGEFS_ATTR_SYS_ALL_NOHINT, 0);
+       error = orangefs_inode_getattr(inode,
+           ORANGEFS_ATTR_SYS_ALL_NOHINT_NOSIZE, 0);
        if (error) {
                iget_failed(inode);
                return ERR_PTR(error);
@@ -456,7 +457,8 @@ struct inode *orangefs_new_inode(struct super_block *sb, struct inode *dir,
        orangefs_set_inode(inode, ref);
        inode->i_ino = hash;    /* needed for stat etc */
 
-       error = orangefs_inode_getattr(inode, ORANGEFS_ATTR_SYS_ALL_NOHINT, 0);
+       error = orangefs_inode_getattr(inode,
+           ORANGEFS_ATTR_SYS_ALL_NOHINT_NOSIZE, 0);
        if (error)
                goto out_iput;