aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_aops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_aops.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_aops.c33
1 files changed, 15 insertions, 18 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index c0a904316854..c5ea26d73bea 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -76,7 +76,7 @@ xfs_page_trace(
76 int mask) 76 int mask)
77{ 77{
78 xfs_inode_t *ip; 78 xfs_inode_t *ip;
79 vnode_t *vp = vn_from_inode(inode); 79 bhv_vnode_t *vp = vn_from_inode(inode);
80 loff_t isize = i_size_read(inode); 80 loff_t isize = i_size_read(inode);
81 loff_t offset = page_offset(page); 81 loff_t offset = page_offset(page);
82 int delalloc = -1, unmapped = -1, unwritten = -1; 82 int delalloc = -1, unmapped = -1, unwritten = -1;
@@ -181,13 +181,12 @@ xfs_end_bio_unwritten(
181 void *data) 181 void *data)
182{ 182{
183 xfs_ioend_t *ioend = data; 183 xfs_ioend_t *ioend = data;
184 vnode_t *vp = ioend->io_vnode; 184 bhv_vnode_t *vp = ioend->io_vnode;
185 xfs_off_t offset = ioend->io_offset; 185 xfs_off_t offset = ioend->io_offset;
186 size_t size = ioend->io_size; 186 size_t size = ioend->io_size;
187 int error;
188 187
189 if (likely(!ioend->io_error)) 188 if (likely(!ioend->io_error))
190 VOP_BMAP(vp, offset, size, BMAPI_UNWRITTEN, NULL, NULL, error); 189 bhv_vop_bmap(vp, offset, size, BMAPI_UNWRITTEN, NULL, NULL);
191 xfs_destroy_ioend(ioend); 190 xfs_destroy_ioend(ioend);
192} 191}
193 192
@@ -240,10 +239,10 @@ xfs_map_blocks(
240 xfs_iomap_t *mapp, 239 xfs_iomap_t *mapp,
241 int flags) 240 int flags)
242{ 241{
243 vnode_t *vp = vn_from_inode(inode); 242 bhv_vnode_t *vp = vn_from_inode(inode);
244 int error, nmaps = 1; 243 int error, nmaps = 1;
245 244
246 VOP_BMAP(vp, offset, count, flags, mapp, &nmaps, error); 245 error = bhv_vop_bmap(vp, offset, count, flags, mapp, &nmaps);
247 if (!error && (flags & (BMAPI_WRITE|BMAPI_ALLOCATE))) 246 if (!error && (flags & (BMAPI_WRITE|BMAPI_ALLOCATE)))
248 VMODIFY(vp); 247 VMODIFY(vp);
249 return -error; 248 return -error;
@@ -1162,7 +1161,7 @@ xfs_vm_writepages(
1162 struct address_space *mapping, 1161 struct address_space *mapping,
1163 struct writeback_control *wbc) 1162 struct writeback_control *wbc)
1164{ 1163{
1165 struct vnode *vp = vn_from_inode(mapping->host); 1164 struct bhv_vnode *vp = vn_from_inode(mapping->host);
1166 1165
1167 if (VN_TRUNC(vp)) 1166 if (VN_TRUNC(vp))
1168 VUNTRUNCATE(vp); 1167 VUNTRUNCATE(vp);
@@ -1242,7 +1241,7 @@ __xfs_get_blocks(
1242 int direct, 1241 int direct,
1243 bmapi_flags_t flags) 1242 bmapi_flags_t flags)
1244{ 1243{
1245 vnode_t *vp = vn_from_inode(inode); 1244 bhv_vnode_t *vp = vn_from_inode(inode);
1246 xfs_iomap_t iomap; 1245 xfs_iomap_t iomap;
1247 xfs_off_t offset; 1246 xfs_off_t offset;
1248 ssize_t size; 1247 ssize_t size;
@@ -1252,8 +1251,8 @@ __xfs_get_blocks(
1252 offset = (xfs_off_t)iblock << inode->i_blkbits; 1251 offset = (xfs_off_t)iblock << inode->i_blkbits;
1253 ASSERT(bh_result->b_size >= (1 << inode->i_blkbits)); 1252 ASSERT(bh_result->b_size >= (1 << inode->i_blkbits));
1254 size = bh_result->b_size; 1253 size = bh_result->b_size;
1255 VOP_BMAP(vp, offset, size, 1254 error = bhv_vop_bmap(vp, offset, size,
1256 create ? flags : BMAPI_READ, &iomap, &niomap, error); 1255 create ? flags : BMAPI_READ, &iomap, &niomap);
1257 if (error) 1256 if (error)
1258 return -error; 1257 return -error;
1259 if (niomap == 0) 1258 if (niomap == 0)
@@ -1381,13 +1380,13 @@ xfs_vm_direct_IO(
1381{ 1380{
1382 struct file *file = iocb->ki_filp; 1381 struct file *file = iocb->ki_filp;
1383 struct inode *inode = file->f_mapping->host; 1382 struct inode *inode = file->f_mapping->host;
1384 vnode_t *vp = vn_from_inode(inode); 1383 bhv_vnode_t *vp = vn_from_inode(inode);
1385 xfs_iomap_t iomap; 1384 xfs_iomap_t iomap;
1386 int maps = 1; 1385 int maps = 1;
1387 int error; 1386 int error;
1388 ssize_t ret; 1387 ssize_t ret;
1389 1388
1390 VOP_BMAP(vp, offset, 0, BMAPI_DEVICE, &iomap, &maps, error); 1389 error = bhv_vop_bmap(vp, offset, 0, BMAPI_DEVICE, &iomap, &maps);
1391 if (error) 1390 if (error)
1392 return -error; 1391 return -error;
1393 1392
@@ -1420,14 +1419,12 @@ xfs_vm_bmap(
1420 sector_t block) 1419 sector_t block)
1421{ 1420{
1422 struct inode *inode = (struct inode *)mapping->host; 1421 struct inode *inode = (struct inode *)mapping->host;
1423 vnode_t *vp = vn_from_inode(inode); 1422 bhv_vnode_t *vp = vn_from_inode(inode);
1424 int error;
1425 1423
1426 vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); 1424 vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address);
1427 1425 bhv_vop_rwlock(vp, VRWLOCK_READ);
1428 VOP_RWLOCK(vp, VRWLOCK_READ); 1426 bhv_vop_flush_pages(vp, (xfs_off_t)0, -1, 0, FI_REMAPF);
1429 VOP_FLUSH_PAGES(vp, (xfs_off_t)0, -1, 0, FI_REMAPF, error); 1427 bhv_vop_rwunlock(vp, VRWLOCK_READ);
1430 VOP_RWUNLOCK(vp, VRWLOCK_READ);
1431 return generic_block_bmap(mapping, block, xfs_get_blocks); 1428 return generic_block_bmap(mapping, block, xfs_get_blocks);
1432} 1429}
1433 1430