diff options
author | Yan, Zheng <zyan@redhat.com> | 2015-04-27 10:33:28 +0300 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2015-06-25 11:49:28 +0300 |
commit | 10183a69551f76702ac68bc74a437b25419c6de0 (patch) | |
tree | 06e48d196c31f31eef6f039bce518ff3973b2760 /fs/ceph/inode.c | |
parent | 144cba1493fdd6e3e1980e439a31df877831ebcd (diff) | |
download | linux-10183a69551f76702ac68bc74a437b25419c6de0.tar.xz |
ceph: check OSD caps before read/write
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/inode.c')
-rw-r--r-- | fs/ceph/inode.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index e876e1944519..1a68c0e38a52 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -753,7 +753,10 @@ static int fill_inode(struct inode *inode, struct page *locked_page, if (new_version || (new_issued & (CEPH_CAP_ANY_FILE_RD | CEPH_CAP_ANY_FILE_WR))) { + if (ci->i_layout.fl_pg_pool != info->layout.fl_pg_pool) + ci->i_ceph_flags &= ~CEPH_I_POOL_PERM; ci->i_layout = info->layout; + queue_trunc = ceph_fill_file_size(inode, issued, le32_to_cpu(info->truncate_seq), le64_to_cpu(info->truncate_size), |