aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2006-03-13 21:54:26 -0500
committerNathan Scott <nathans@sgi.com>2006-03-13 21:54:26 -0500
commite4c573bb6a8477a26b3d5471fd116d258760a13a (patch)
tree6a3466f40c2102ff8f161fc70861040791474ed8
parentb8b0f546569871b365a5e3b3cc3f667af658dd49 (diff)
[XFS] Switch over from linvfs names for address space ops for consistent
naming. SGI-PV: 950556 SGI-Modid: xfs-linux-melb:xfs-kern:25378a Signed-off-by: Nathan Scott <nathans@sgi.com>
-rw-r--r--fs/xfs/linux-2.6/xfs_aops.c63
-rw-r--r--fs/xfs/linux-2.6/xfs_aops.h4
-rw-r--r--fs/xfs/linux-2.6/xfs_iops.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c4
4 files changed, 35 insertions, 38 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index 4b6bfdb8251c..2b610c7ba322 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -43,7 +43,6 @@
43#include <linux/pagevec.h> 43#include <linux/pagevec.h>
44#include <linux/writeback.h> 44#include <linux/writeback.h>
45 45
46
47STATIC void 46STATIC void
48xfs_count_page_state( 47xfs_count_page_state(
49 struct page *page, 48 struct page *page,
@@ -68,8 +67,6 @@ xfs_count_page_state(
68 } while ((bh = bh->b_this_page) != head); 67 } while ((bh = bh->b_this_page) != head);
69} 68}
70 69
71
72
73#if defined(XFS_RW_TRACE) 70#if defined(XFS_RW_TRACE)
74void 71void
75xfs_page_trace( 72xfs_page_trace(
@@ -1095,7 +1092,7 @@ error:
1095 */ 1092 */
1096 1093
1097STATIC int 1094STATIC int
1098linvfs_writepage( 1095xfs_vm_writepage(
1099 struct page *page, 1096 struct page *page,
1100 struct writeback_control *wbc) 1097 struct writeback_control *wbc)
1101{ 1098{
@@ -1181,7 +1178,7 @@ out_unlock:
1181 * free them and we should come back later via writepage. 1178 * free them and we should come back later via writepage.
1182 */ 1179 */
1183STATIC int 1180STATIC int
1184linvfs_release_page( 1181xfs_vm_release_page(
1185 struct page *page, 1182 struct page *page,
1186 gfp_t gfp_mask) 1183 gfp_t gfp_mask)
1187{ 1184{
@@ -1223,7 +1220,7 @@ free_buffers:
1223} 1220}
1224 1221
1225STATIC int 1222STATIC int
1226__linvfs_get_block( 1223__xfs_get_block(
1227 struct inode *inode, 1224 struct inode *inode,
1228 sector_t iblock, 1225 sector_t iblock,
1229 unsigned long blocks, 1226 unsigned long blocks,
@@ -1304,30 +1301,30 @@ __linvfs_get_block(
1304} 1301}
1305 1302
1306int 1303int
1307linvfs_get_block( 1304xfs_get_block(
1308 struct inode *inode, 1305 struct inode *inode,
1309 sector_t iblock, 1306 sector_t iblock,
1310 struct buffer_head *bh_result, 1307 struct buffer_head *bh_result,
1311 int create) 1308 int create)
1312{ 1309{
1313 return __linvfs_get_block(inode, iblock, 0, bh_result, 1310 return __xfs_get_block(inode, iblock, 0, bh_result,
1314 create, 0, BMAPI_WRITE); 1311 create, 0, BMAPI_WRITE);
1315} 1312}
1316 1313
1317STATIC int 1314STATIC int
1318linvfs_get_blocks_direct( 1315xfs_get_blocks_direct(
1319 struct inode *inode, 1316 struct inode *inode,
1320 sector_t iblock, 1317 sector_t iblock,
1321 unsigned long max_blocks, 1318 unsigned long max_blocks,
1322 struct buffer_head *bh_result, 1319 struct buffer_head *bh_result,
1323 int create) 1320 int create)
1324{ 1321{
1325 return __linvfs_get_block(inode, iblock, max_blocks, bh_result, 1322 return __xfs_get_block(inode, iblock, max_blocks, bh_result,
1326 create, 1, BMAPI_WRITE|BMAPI_DIRECT); 1323 create, 1, BMAPI_WRITE|BMAPI_DIRECT);
1327} 1324}
1328 1325
1329STATIC void 1326STATIC void
1330linvfs_end_io_direct( 1327xfs_end_io_direct(
1331 struct kiocb *iocb, 1328 struct kiocb *iocb,
1332 loff_t offset, 1329 loff_t offset,
1333 ssize_t size, 1330 ssize_t size,
@@ -1365,7 +1362,7 @@ linvfs_end_io_direct(
1365} 1362}
1366 1363
1367STATIC ssize_t 1364STATIC ssize_t
1368linvfs_direct_IO( 1365xfs_vm_direct_IO(
1369 int rw, 1366 int rw,
1370 struct kiocb *iocb, 1367 struct kiocb *iocb,
1371 const struct iovec *iov, 1368 const struct iovec *iov,
@@ -1389,8 +1386,8 @@ linvfs_direct_IO(
1389 ret = blockdev_direct_IO_own_locking(rw, iocb, inode, 1386 ret = blockdev_direct_IO_own_locking(rw, iocb, inode,
1390 iomap.iomap_target->bt_bdev, 1387 iomap.iomap_target->bt_bdev,
1391 iov, offset, nr_segs, 1388 iov, offset, nr_segs,
1392 linvfs_get_blocks_direct, 1389 xfs_get_blocks_direct,
1393 linvfs_end_io_direct); 1390 xfs_end_io_direct);
1394 1391
1395 if (unlikely(ret <= 0 && iocb->private)) 1392 if (unlikely(ret <= 0 && iocb->private))
1396 xfs_destroy_ioend(iocb->private); 1393 xfs_destroy_ioend(iocb->private);
@@ -1398,17 +1395,17 @@ linvfs_direct_IO(
1398} 1395}
1399 1396
1400STATIC int 1397STATIC int
1401linvfs_prepare_write( 1398xfs_vm_prepare_write(
1402 struct file *file, 1399 struct file *file,
1403 struct page *page, 1400 struct page *page,
1404 unsigned int from, 1401 unsigned int from,
1405 unsigned int to) 1402 unsigned int to)
1406{ 1403{
1407 return block_prepare_write(page, from, to, linvfs_get_block); 1404 return block_prepare_write(page, from, to, xfs_get_block);
1408} 1405}
1409 1406
1410STATIC sector_t 1407STATIC sector_t
1411linvfs_bmap( 1408xfs_vm_bmap(
1412 struct address_space *mapping, 1409 struct address_space *mapping,
1413 sector_t block) 1410 sector_t block)
1414{ 1411{
@@ -1416,34 +1413,34 @@ linvfs_bmap(
1416 vnode_t *vp = LINVFS_GET_VP(inode); 1413 vnode_t *vp = LINVFS_GET_VP(inode);
1417 int error; 1414 int error;
1418 1415
1419 vn_trace_entry(vp, "linvfs_bmap", (inst_t *)__return_address); 1416 vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address);
1420 1417
1421 VOP_RWLOCK(vp, VRWLOCK_READ); 1418 VOP_RWLOCK(vp, VRWLOCK_READ);
1422 VOP_FLUSH_PAGES(vp, (xfs_off_t)0, -1, 0, FI_REMAPF, error); 1419 VOP_FLUSH_PAGES(vp, (xfs_off_t)0, -1, 0, FI_REMAPF, error);
1423 VOP_RWUNLOCK(vp, VRWLOCK_READ); 1420 VOP_RWUNLOCK(vp, VRWLOCK_READ);
1424 return generic_block_bmap(mapping, block, linvfs_get_block); 1421 return generic_block_bmap(mapping, block, xfs_get_block);
1425} 1422}
1426 1423
1427STATIC int 1424STATIC int
1428linvfs_readpage( 1425xfs_vm_readpage(
1429 struct file *unused, 1426 struct file *unused,
1430 struct page *page) 1427 struct page *page)
1431{ 1428{
1432 return mpage_readpage(page, linvfs_get_block); 1429 return mpage_readpage(page, xfs_get_block);
1433} 1430}
1434 1431
1435STATIC int 1432STATIC int
1436linvfs_readpages( 1433xfs_vm_readpages(
1437 struct file *unused, 1434 struct file *unused,
1438 struct address_space *mapping, 1435 struct address_space *mapping,
1439 struct list_head *pages, 1436 struct list_head *pages,
1440 unsigned nr_pages) 1437 unsigned nr_pages)
1441{ 1438{
1442 return mpage_readpages(mapping, pages, nr_pages, linvfs_get_block); 1439 return mpage_readpages(mapping, pages, nr_pages, xfs_get_block);
1443} 1440}
1444 1441
1445STATIC int 1442STATIC int
1446linvfs_invalidate_page( 1443xfs_vm_invalidate_page(
1447 struct page *page, 1444 struct page *page,
1448 unsigned long offset) 1445 unsigned long offset)
1449{ 1446{
@@ -1452,16 +1449,16 @@ linvfs_invalidate_page(
1452 return block_invalidatepage(page, offset); 1449 return block_invalidatepage(page, offset);
1453} 1450}
1454 1451
1455struct address_space_operations linvfs_aops = { 1452struct address_space_operations xfs_address_space_operations = {
1456 .readpage = linvfs_readpage, 1453 .readpage = xfs_vm_readpage,
1457 .readpages = linvfs_readpages, 1454 .readpages = xfs_vm_readpages,
1458 .writepage = linvfs_writepage, 1455 .writepage = xfs_vm_writepage,
1459 .sync_page = block_sync_page, 1456 .sync_page = block_sync_page,
1460 .releasepage = linvfs_release_page, 1457 .releasepage = xfs_vm_release_page,
1461 .invalidatepage = linvfs_invalidate_page, 1458 .invalidatepage = xfs_vm_invalidate_page,
1462 .prepare_write = linvfs_prepare_write, 1459 .prepare_write = xfs_vm_prepare_write,
1463 .commit_write = generic_commit_write, 1460 .commit_write = generic_commit_write,
1464 .bmap = linvfs_bmap, 1461 .bmap = xfs_vm_bmap,
1465 .direct_IO = linvfs_direct_IO, 1462 .direct_IO = xfs_vm_direct_IO,
1466 .migratepage = buffer_migrate_page, 1463 .migratepage = buffer_migrate_page,
1467}; 1464};
diff --git a/fs/xfs/linux-2.6/xfs_aops.h b/fs/xfs/linux-2.6/xfs_aops.h
index 55339dd5a30d..795699f121d2 100644
--- a/fs/xfs/linux-2.6/xfs_aops.h
+++ b/fs/xfs/linux-2.6/xfs_aops.h
@@ -40,7 +40,7 @@ typedef struct xfs_ioend {
40 struct work_struct io_work; /* xfsdatad work queue */ 40 struct work_struct io_work; /* xfsdatad work queue */
41} xfs_ioend_t; 41} xfs_ioend_t;
42 42
43extern struct address_space_operations linvfs_aops; 43extern struct address_space_operations xfs_address_space_operations;
44extern int linvfs_get_block(struct inode *, sector_t, struct buffer_head *, int); 44extern int xfs_get_block(struct inode *, sector_t, struct buffer_head *, int);
45 45
46#endif /* __XFS_IOPS_H__ */ 46#endif /* __XFS_IOPS_H__ */
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c
index b1219195c6e2..52b02bd5c283 100644
--- a/fs/xfs/linux-2.6/xfs_iops.c
+++ b/fs/xfs/linux-2.6/xfs_iops.c
@@ -739,7 +739,7 @@ STATIC void
739linvfs_truncate( 739linvfs_truncate(
740 struct inode *inode) 740 struct inode *inode)
741{ 741{
742 block_truncate_page(inode->i_mapping, inode->i_size, linvfs_get_block); 742 block_truncate_page(inode->i_mapping, inode->i_size, xfs_get_block);
743} 743}
744 744
745STATIC int 745STATIC int
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index 4d8613f65c2c..fb76c53f9c43 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -129,7 +129,7 @@ xfs_set_inodeops(
129 case S_IFREG: 129 case S_IFREG:
130 inode->i_op = &linvfs_file_inode_operations; 130 inode->i_op = &linvfs_file_inode_operations;
131 inode->i_fop = &linvfs_file_operations; 131 inode->i_fop = &linvfs_file_operations;
132 inode->i_mapping->a_ops = &linvfs_aops; 132 inode->i_mapping->a_ops = &xfs_address_space_operations;
133 break; 133 break;
134 case S_IFDIR: 134 case S_IFDIR:
135 inode->i_op = &linvfs_dir_inode_operations; 135 inode->i_op = &linvfs_dir_inode_operations;
@@ -138,7 +138,7 @@ xfs_set_inodeops(
138 case S_IFLNK: 138 case S_IFLNK:
139 inode->i_op = &linvfs_symlink_inode_operations; 139 inode->i_op = &linvfs_symlink_inode_operations;
140 if (inode->i_blocks) 140 if (inode->i_blocks)
141 inode->i_mapping->a_ops = &linvfs_aops; 141 inode->i_mapping->a_ops = &xfs_address_space_operations;
142 break; 142 break;
143 default: 143 default:
144 inode->i_op = &linvfs_file_inode_operations; 144 inode->i_op = &linvfs_file_inode_operations;