diff options
Diffstat (limited to 'fs/ceph/addr.c')
| -rw-r--r-- | fs/ceph/addr.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index d9c60b84949a..5598a0d02295 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c | |||
| @@ -309,7 +309,8 @@ static int ceph_readpages(struct file *file, struct address_space *mapping, | |||
| 309 | zero_user_segment(page, s, PAGE_CACHE_SIZE); | 309 | zero_user_segment(page, s, PAGE_CACHE_SIZE); |
| 310 | } | 310 | } |
| 311 | 311 | ||
| 312 | if (add_to_page_cache_lru(page, mapping, page->index, GFP_NOFS)) { | 312 | if (add_to_page_cache_lru(page, mapping, page->index, |
| 313 | GFP_NOFS)) { | ||
| 313 | page_cache_release(page); | 314 | page_cache_release(page); |
| 314 | dout("readpages %p add_to_page_cache failed %p\n", | 315 | dout("readpages %p add_to_page_cache failed %p\n", |
| 315 | inode, page); | 316 | inode, page); |
| @@ -552,7 +553,7 @@ static void writepages_finish(struct ceph_osd_request *req, | |||
| 552 | * page truncation thread, possibly losing some data that | 553 | * page truncation thread, possibly losing some data that |
| 553 | * raced its way in | 554 | * raced its way in |
| 554 | */ | 555 | */ |
| 555 | if ((issued & CEPH_CAP_FILE_CACHE) == 0) | 556 | if ((issued & (CEPH_CAP_FILE_CACHE|CEPH_CAP_FILE_LAZYIO)) == 0) |
| 556 | generic_error_remove_page(inode->i_mapping, page); | 557 | generic_error_remove_page(inode->i_mapping, page); |
| 557 | 558 | ||
| 558 | unlock_page(page); | 559 | unlock_page(page); |
| @@ -797,9 +798,12 @@ get_more_pages: | |||
| 797 | dout("%p will write page %p idx %lu\n", | 798 | dout("%p will write page %p idx %lu\n", |
| 798 | inode, page, page->index); | 799 | inode, page, page->index); |
| 799 | 800 | ||
| 800 | writeback_stat = atomic_long_inc_return(&client->writeback_count); | 801 | writeback_stat = |
| 801 | if (writeback_stat > CONGESTION_ON_THRESH(client->mount_args->congestion_kb)) { | 802 | atomic_long_inc_return(&client->writeback_count); |
| 802 | set_bdi_congested(&client->backing_dev_info, BLK_RW_ASYNC); | 803 | if (writeback_stat > CONGESTION_ON_THRESH( |
| 804 | client->mount_args->congestion_kb)) { | ||
| 805 | set_bdi_congested(&client->backing_dev_info, | ||
| 806 | BLK_RW_ASYNC); | ||
| 803 | } | 807 | } |
| 804 | 808 | ||
| 805 | set_page_writeback(page); | 809 | set_page_writeback(page); |
| @@ -1036,7 +1040,7 @@ static int ceph_write_begin(struct file *file, struct address_space *mapping, | |||
| 1036 | *pagep = page; | 1040 | *pagep = page; |
| 1037 | 1041 | ||
| 1038 | dout("write_begin file %p inode %p page %p %d~%d\n", file, | 1042 | dout("write_begin file %p inode %p page %p %d~%d\n", file, |
| 1039 | inode, page, (int)pos, (int)len); | 1043 | inode, page, (int)pos, (int)len); |
| 1040 | 1044 | ||
| 1041 | r = ceph_update_writeable_page(file, pos, len, page); | 1045 | r = ceph_update_writeable_page(file, pos, len, page); |
| 1042 | } while (r == -EAGAIN); | 1046 | } while (r == -EAGAIN); |
