diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-27 21:12:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-27 21:12:58 -0500 |
commit | b12ece7d852efbc8db45371c068900fcc62002d4 (patch) | |
tree | 6344b69d72415224f784ac3c0d855ae334a612d2 /fs/ceph/inode.c | |
parent | 363aab29eb89b46d14d44e4a44a5fff57e30bcfc (diff) | |
parent | d66bbd441c08fe00ed2add1cf70cb243ebc2b27e (diff) |
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
Diffstat (limited to 'fs/ceph/inode.c')
-rw-r--r-- | fs/ceph/inode.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index e835eff551e3..5625463aa479 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c | |||
@@ -710,10 +710,6 @@ static int fill_inode(struct inode *inode, | |||
710 | ci->i_ceph_flags |= CEPH_I_COMPLETE; | 710 | ci->i_ceph_flags |= CEPH_I_COMPLETE; |
711 | ci->i_max_offset = 2; | 711 | ci->i_max_offset = 2; |
712 | } | 712 | } |
713 | |||
714 | /* it may be better to set st_size in getattr instead? */ | ||
715 | if (ceph_test_mount_opt(ceph_sb_to_client(inode->i_sb), RBYTES)) | ||
716 | inode->i_size = ci->i_rbytes; | ||
717 | break; | 713 | break; |
718 | default: | 714 | default: |
719 | pr_err("fill_inode %llx.%llx BAD mode 0%o\n", | 715 | pr_err("fill_inode %llx.%llx BAD mode 0%o\n", |
@@ -1819,7 +1815,11 @@ int ceph_getattr(struct vfsmount *mnt, struct dentry *dentry, | |||
1819 | else | 1815 | else |
1820 | stat->dev = 0; | 1816 | stat->dev = 0; |
1821 | if (S_ISDIR(inode->i_mode)) { | 1817 | if (S_ISDIR(inode->i_mode)) { |
1822 | stat->size = ci->i_rbytes; | 1818 | if (ceph_test_mount_opt(ceph_sb_to_client(inode->i_sb), |
1819 | RBYTES)) | ||
1820 | stat->size = ci->i_rbytes; | ||
1821 | else | ||
1822 | stat->size = ci->i_files + ci->i_subdirs; | ||
1823 | stat->blocks = 0; | 1823 | stat->blocks = 0; |
1824 | stat->blksize = 65536; | 1824 | stat->blksize = 65536; |
1825 | } | 1825 | } |