struct address_space *mapping, loff_t from);
extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf);
+extern int ext4_map_inode_page(struct inode *inode, struct page *page,
-+ unsigned long *blocks, int create);
++ sector_t *blocks, int create);
extern qsize_t *ext4_get_reserved_space(struct inode *inode);
extern int flush_aio_dio_completed_IO(struct inode *inode);
extern void ext4_da_update_reserve_space(struct inode *inode,
}
+
+int ext4_map_inode_page(struct inode *inode, struct page *page,
-+ unsigned long *blocks, int create)
++ sector_t *blocks, int create)
+{
+ unsigned int blocksize, blocks_per_page;
+ unsigned long iblock;
extern void ext4_da_update_reserve_space(struct inode *inode,
int used, int quota_claim);
+extern int ext4_map_inode_page(struct inode *inode, struct page *page,
-+ unsigned long *blocks, int created);
++ sector_t *blocks, int created);
+
/* ioctl.c */
extern long ext4_ioctl(struct file *, unsigned int, unsigned long);
}
+
+int ext4_map_inode_page(struct inode *inode, struct page *page,
-+ unsigned long *blocks, int create)
++ sector_t *blocks, int create)
+{
+ unsigned int blocksize, blocks_per_page;
+ unsigned long iblock;
struct osd_iobuf *iobuf)
{
int blocks_per_page = PAGE_CACHE_SIZE >> inode->i_blkbits;
- struct page **pages = iobuf->dr_pages;
- int npages = iobuf->dr_npages;
- unsigned long *blocks = iobuf->dr_blocks;
- int total_blocks = npages * blocks_per_page;
- int sector_bits = inode->i_sb->s_blocksize_bits - 9;
- unsigned int blocksize = inode->i_sb->s_blocksize;
- struct bio *bio = NULL;
- struct page *page;
- unsigned int page_offset;
- sector_t sector;
- int nblocks;
- int block_idx;
- int page_idx;
- int i;
- int rc = 0;
- ENTRY;
+ struct page **pages = iobuf->dr_pages;
+ int npages = iobuf->dr_npages;
+ sector_t *blocks = iobuf->dr_blocks;
+ int total_blocks = npages * blocks_per_page;
+ int sector_bits = inode->i_sb->s_blocksize_bits - 9;
+ unsigned int blocksize = inode->i_sb->s_blocksize;
+ struct bio *bio = NULL;
+ struct page *page;
+ unsigned int page_offset;
+ sector_t sector;
+ int nblocks;
+ int block_idx;
+ int page_idx;
+ int i;
+ int rc = 0;
+ ENTRY;
LASSERT(iobuf->dr_npages == npages);
#endif
struct bpointers {
- unsigned long *blocks;
+ sector_t *blocks;
unsigned long start;
int num;
int init_num;
}
static int osd_ldiskfs_map_nblocks(struct inode *inode, unsigned long block,
- unsigned long num, unsigned long *blocks,
+ unsigned long num, sector_t *blocks,
int create)
{
struct bpointers bp;
static int osd_ldiskfs_map_bm_inode_pages(struct inode *inode,
struct page **page, int pages,
- unsigned long *blocks, int create)
+ sector_t *blocks, int create)
{
int blocks_per_page = PAGE_CACHE_SIZE >> inode->i_blkbits;
pgoff_t bitmap_max_page_index;
- unsigned long *b;
+ sector_t *b;
int rc = 0, i;
bitmap_max_page_index = LDISKFS_SB(inode->i_sb)->s_bitmap_maxbytes >>
}
rc = ldiskfs_map_inode_page(inode, *page, b, create);
if (rc) {
- CERROR("ino %lu, blk %lu create %d: rc %d\n",
- inode->i_ino, *b, create, rc);
+ CERROR("ino %lu, blk %llu create %d: rc %d\n",
+ inode->i_ino,
+ (unsigned long long)*b, create, rc);
break;
}
b += blocks_per_page;
static int osd_ldiskfs_map_ext_inode_pages(struct inode *inode,
struct page **page,
- int pages, unsigned long *blocks,
+ int pages, sector_t *blocks,
int create)
{
int blocks_per_page = PAGE_CACHE_SIZE >> inode->i_blkbits;
}
static int osd_ldiskfs_map_inode_pages(struct inode *inode, struct page **page,
- int pages, unsigned long *blocks,
+ int pages, sector_t *blocks,
int create)
{
int rc;
}
#else
static int osd_ldiskfs_map_inode_pages(struct inode *inode, struct page **page,
- int pages, unsigned long *blocks,
+ int pages, sector_t *blocks,
int create)
{
int blocks_per_page = PAGE_CACHE_SIZE >> inode->i_blkbits;