iobuf->dr_rw = rw;
iobuf->dr_init_at = line;
- blocks = pages * (PAGE_CACHE_SIZE >> osd_sb(d)->s_blocksize_bits);
+ blocks = pages * (PAGE_SIZE >> osd_sb(d)->s_blocksize_bits);
if (iobuf->dr_bl_buf.lb_len >= blocks * sizeof(iobuf->dr_blocks[0])) {
LASSERT(iobuf->dr_pg_buf.lb_len >=
pages * sizeof(iobuf->dr_pages[0]));
CDEBUG(D_OTHER, "realloc %u for %u (%u) pages\n",
(unsigned)(pages * sizeof(iobuf->dr_pages[0])), i, pages);
pages = i;
- blocks = pages * (PAGE_CACHE_SIZE >> osd_sb(d)->s_blocksize_bits);
+ blocks = pages * (PAGE_SIZE >> osd_sb(d)->s_blocksize_bits);
iobuf->dr_max_pages = 0;
CDEBUG(D_OTHER, "realloc %u for %u blocks\n",
(unsigned)(blocks * sizeof(iobuf->dr_blocks[0])), blocks);
static int osd_do_bio(struct osd_device *osd, struct inode *inode,
struct osd_iobuf *iobuf)
{
- int blocks_per_page = PAGE_CACHE_SIZE >> inode->i_blkbits;
+ int blocks_per_page = PAGE_SIZE >> inode->i_blkbits;
struct page **pages = iobuf->dr_pages;
int npages = iobuf->dr_npages;
sector_t *blocks = iobuf->dr_blocks;
*nrpages = 0;
while (len > 0) {
- int poff = offset & (PAGE_CACHE_SIZE - 1);
- int plen = PAGE_CACHE_SIZE - poff;
+ int poff = offset & (PAGE_SIZE - 1);
+ int plen = PAGE_SIZE - poff;
if (plen > len)
plen = len;
LASSERT(inode);
- page = find_or_create_page(inode->i_mapping, offset >> PAGE_CACHE_SHIFT,
+ page = find_or_create_page(inode->i_mapping, offset >> PAGE_SHIFT,
GFP_NOFS | __GFP_HIGHMEM);
if (unlikely(page == NULL))
lprocfs_counter_add(d->od_stats, LPROC_OSD_NO_PAGE, 1);
static int osd_ldiskfs_map_nblocks(struct inode *inode, unsigned long index,
int clen, sector_t *blocks, int create)
{
- int blocks_per_page = PAGE_CACHE_SIZE >> inode->i_blkbits;
+ int blocks_per_page = PAGE_SIZE >> inode->i_blkbits;
struct bpointers bp;
int err;
struct page **page, int pages,
sector_t *blocks, int create)
{
- int blocks_per_page = PAGE_CACHE_SIZE >> inode->i_blkbits;
+ int blocks_per_page = PAGE_SIZE >> inode->i_blkbits;
pgoff_t bitmap_max_page_index;
sector_t *b;
int rc = 0, i;
/* look for next extent */
fp = NULL;
- blocks += clen * (PAGE_CACHE_SIZE >> inode->i_blkbits);
+ blocks += clen * (PAGE_SIZE >> inode->i_blkbits);
}
if (fp)
int pages, sector_t *blocks,
int create)
{
- int blocks_per_page = PAGE_CACHE_SIZE >> inode->i_blkbits;
+ int blocks_per_page = PAGE_SIZE >> inode->i_blkbits;
int rc = 0, i = 0;
struct page *fp = NULL;
int clen = 0;
RETURN(rc);
isize = i_size_read(inode);
- maxidx = ((isize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT) - 1;
+ maxidx = ((isize + PAGE_SIZE - 1) >> PAGE_SHIFT) - 1;
if (osd->od_writethrough_cache)
cache = 1;
*/
ClearPageUptodate(lnb[i].lnb_page);
- if (lnb[i].lnb_len == PAGE_CACHE_SIZE)
+ if (lnb[i].lnb_len == PAGE_SIZE)
continue;
if (maxidx >= lnb[i].lnb_page->index) {
off = (lnb[i].lnb_page_offset + lnb[i].lnb_len) &
~PAGE_MASK;
if (off)
- memset(p + off, 0, PAGE_CACHE_SIZE - off);
+ memset(p + off, 0, PAGE_SIZE - off);
kunmap(lnb[i].lnb_page);
}
}
extents++;
if (!osd_is_mapped(dt, lnb[i].lnb_file_offset, &extent))
- quota_space += PAGE_CACHE_SIZE;
+ quota_space += PAGE_SIZE;
/* ignore quota for the whole request if any page is from
* client cache or written by root.