Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: ceph: avoid picking MDS that is not active ceph: avoid immediate cap check after import ceph: fix flushing of caps vs cap import ceph: fix erroneous cap flush to non-auth mds ceph: fix cap_wanted_delay_{min,max} mount option initialization ceph: fix xattr rbtree search ceph: fix getattr on directory when using norbytes
This commit is contained in:
@ -710,10 +710,6 @@ static int fill_inode(struct inode *inode,
|
||||
ci->i_ceph_flags |= CEPH_I_COMPLETE;
|
||||
ci->i_max_offset = 2;
|
||||
}
|
||||
|
||||
/* it may be better to set st_size in getattr instead? */
|
||||
if (ceph_test_mount_opt(ceph_sb_to_client(inode->i_sb), RBYTES))
|
||||
inode->i_size = ci->i_rbytes;
|
||||
break;
|
||||
default:
|
||||
pr_err("fill_inode %llx.%llx BAD mode 0%o\n",
|
||||
@ -1819,7 +1815,11 @@ int ceph_getattr(struct vfsmount *mnt, struct dentry *dentry,
|
||||
else
|
||||
stat->dev = 0;
|
||||
if (S_ISDIR(inode->i_mode)) {
|
||||
stat->size = ci->i_rbytes;
|
||||
if (ceph_test_mount_opt(ceph_sb_to_client(inode->i_sb),
|
||||
RBYTES))
|
||||
stat->size = ci->i_rbytes;
|
||||
else
|
||||
stat->size = ci->i_files + ci->i_subdirs;
|
||||
stat->blocks = 0;
|
||||
stat->blksize = 65536;
|
||||
}
|
||||
|
Reference in New Issue
Block a user