addr.c (3aabae7d9dfaed60effe93662f02c19bafc18537) addr.c (ae00d4f37f4df56821331deb1028748110dd6dc9)
1#include "ceph_debug.h"
2
3#include <linux/backing-dev.h>
4#include <linux/fs.h>
5#include <linux/mm.h>
6#include <linux/pagemap.h>
7#include <linux/writeback.h> /* generic_writepages */
8#include <linux/slab.h>

--- 397 unchanged lines hidden (view full) ---

406 /* is this a partial page at end of file? */
407 if (snap_size)
408 i_size = snap_size;
409 else
410 i_size = i_size_read(inode);
411 if (i_size < page_off + len)
412 len = i_size - page_off;
413
1#include "ceph_debug.h"
2
3#include <linux/backing-dev.h>
4#include <linux/fs.h>
5#include <linux/mm.h>
6#include <linux/pagemap.h>
7#include <linux/writeback.h> /* generic_writepages */
8#include <linux/slab.h>

--- 397 unchanged lines hidden (view full) ---

406 /* is this a partial page at end of file? */
407 if (snap_size)
408 i_size = snap_size;
409 else
410 i_size = i_size_read(inode);
411 if (i_size < page_off + len)
412 len = i_size - page_off;
413
414 dout("writepage %p page %p index %lu on %llu~%u\n",
415 inode, page, page->index, page_off, len);
414 dout("writepage %p page %p index %lu on %llu~%u snapc %p\n",
415 inode, page, page->index, page_off, len, snapc);
416
417 writeback_stat = atomic_long_inc_return(&client->writeback_count);
418 if (writeback_stat >
419 CONGESTION_ON_THRESH(client->mount_args->congestion_kb))
420 set_bdi_congested(&client->backing_dev_info, BLK_RW_ASYNC);
421
422 set_page_writeback(page);
423 err = ceph_osdc_writepages(osdc, ceph_vino(inode),

--- 337 unchanged lines hidden (view full) ---

761 dout("%p !clear_page_dirty_for_io\n", page);
762 unlock_page(page);
763 break;
764 }
765
766 /* ok */
767 if (locked_pages == 0) {
768 /* prepare async write request */
416
417 writeback_stat = atomic_long_inc_return(&client->writeback_count);
418 if (writeback_stat >
419 CONGESTION_ON_THRESH(client->mount_args->congestion_kb))
420 set_bdi_congested(&client->backing_dev_info, BLK_RW_ASYNC);
421
422 set_page_writeback(page);
423 err = ceph_osdc_writepages(osdc, ceph_vino(inode),

--- 337 unchanged lines hidden (view full) ---

761 dout("%p !clear_page_dirty_for_io\n", page);
762 unlock_page(page);
763 break;
764 }
765
766 /* ok */
767 if (locked_pages == 0) {
768 /* prepare async write request */
769 offset = page->index << PAGE_CACHE_SHIFT;
769 offset = (unsigned long long)page->index
770 << PAGE_CACHE_SHIFT;
770 len = wsize;
771 req = ceph_osdc_new_request(&client->osdc,
772 &ci->i_layout,
773 ceph_vino(inode),
774 offset, &len,
775 CEPH_OSD_OP_WRITE,
776 CEPH_OSD_FLAG_WRITE |
777 CEPH_OSD_FLAG_ONDISK,

--- 403 unchanged lines hidden ---
771 len = wsize;
772 req = ceph_osdc_new_request(&client->osdc,
773 &ci->i_layout,
774 ceph_vino(inode),
775 offset, &len,
776 CEPH_OSD_OP_WRITE,
777 CEPH_OSD_FLAG_WRITE |
778 CEPH_OSD_FLAG_ONDISK,

--- 403 unchanged lines hidden ---