Commit e4c573bb authored by Nathan Scott's avatar Nathan Scott

[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: default avatarNathan Scott <nathans@sgi.com>
parent b8b0f546
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
#include <linux/pagevec.h> #include <linux/pagevec.h>
#include <linux/writeback.h> #include <linux/writeback.h>
STATIC void STATIC void
xfs_count_page_state( xfs_count_page_state(
struct page *page, struct page *page,
...@@ -68,8 +67,6 @@ xfs_count_page_state( ...@@ -68,8 +67,6 @@ xfs_count_page_state(
} while ((bh = bh->b_this_page) != head); } while ((bh = bh->b_this_page) != head);
} }
#if defined(XFS_RW_TRACE) #if defined(XFS_RW_TRACE)
void void
xfs_page_trace( xfs_page_trace(
...@@ -1095,7 +1092,7 @@ xfs_page_state_convert( ...@@ -1095,7 +1092,7 @@ xfs_page_state_convert(
*/ */
STATIC int STATIC int
linvfs_writepage( xfs_vm_writepage(
struct page *page, struct page *page,
struct writeback_control *wbc) struct writeback_control *wbc)
{ {
...@@ -1181,7 +1178,7 @@ linvfs_writepage( ...@@ -1181,7 +1178,7 @@ linvfs_writepage(
* free them and we should come back later via writepage. * free them and we should come back later via writepage.
*/ */
STATIC int STATIC int
linvfs_release_page( xfs_vm_release_page(
struct page *page, struct page *page,
gfp_t gfp_mask) gfp_t gfp_mask)
{ {
...@@ -1223,7 +1220,7 @@ linvfs_release_page( ...@@ -1223,7 +1220,7 @@ linvfs_release_page(
} }
STATIC int STATIC int
__linvfs_get_block( __xfs_get_block(
struct inode *inode, struct inode *inode,
sector_t iblock, sector_t iblock,
unsigned long blocks, unsigned long blocks,
...@@ -1304,30 +1301,30 @@ __linvfs_get_block( ...@@ -1304,30 +1301,30 @@ __linvfs_get_block(
} }
int int
linvfs_get_block( xfs_get_block(
struct inode *inode, struct inode *inode,
sector_t iblock, sector_t iblock,
struct buffer_head *bh_result, struct buffer_head *bh_result,
int create) int create)
{ {
return __linvfs_get_block(inode, iblock, 0, bh_result, return __xfs_get_block(inode, iblock, 0, bh_result,
create, 0, BMAPI_WRITE); create, 0, BMAPI_WRITE);
} }
STATIC int STATIC int
linvfs_get_blocks_direct( xfs_get_blocks_direct(
struct inode *inode, struct inode *inode,
sector_t iblock, sector_t iblock,
unsigned long max_blocks, unsigned long max_blocks,
struct buffer_head *bh_result, struct buffer_head *bh_result,
int create) int create)
{ {
return __linvfs_get_block(inode, iblock, max_blocks, bh_result, return __xfs_get_block(inode, iblock, max_blocks, bh_result,
create, 1, BMAPI_WRITE|BMAPI_DIRECT); create, 1, BMAPI_WRITE|BMAPI_DIRECT);
} }
STATIC void STATIC void
linvfs_end_io_direct( xfs_end_io_direct(
struct kiocb *iocb, struct kiocb *iocb,
loff_t offset, loff_t offset,
ssize_t size, ssize_t size,
...@@ -1365,7 +1362,7 @@ linvfs_end_io_direct( ...@@ -1365,7 +1362,7 @@ linvfs_end_io_direct(
} }
STATIC ssize_t STATIC ssize_t
linvfs_direct_IO( xfs_vm_direct_IO(
int rw, int rw,
struct kiocb *iocb, struct kiocb *iocb,
const struct iovec *iov, const struct iovec *iov,
...@@ -1389,8 +1386,8 @@ linvfs_direct_IO( ...@@ -1389,8 +1386,8 @@ linvfs_direct_IO(
ret = blockdev_direct_IO_own_locking(rw, iocb, inode, ret = blockdev_direct_IO_own_locking(rw, iocb, inode,
iomap.iomap_target->bt_bdev, iomap.iomap_target->bt_bdev,
iov, offset, nr_segs, iov, offset, nr_segs,
linvfs_get_blocks_direct, xfs_get_blocks_direct,
linvfs_end_io_direct); xfs_end_io_direct);
if (unlikely(ret <= 0 && iocb->private)) if (unlikely(ret <= 0 && iocb->private))
xfs_destroy_ioend(iocb->private); xfs_destroy_ioend(iocb->private);
...@@ -1398,17 +1395,17 @@ linvfs_direct_IO( ...@@ -1398,17 +1395,17 @@ linvfs_direct_IO(
} }
STATIC int STATIC int
linvfs_prepare_write( xfs_vm_prepare_write(
struct file *file, struct file *file,
struct page *page, struct page *page,
unsigned int from, unsigned int from,
unsigned int to) unsigned int to)
{ {
return block_prepare_write(page, from, to, linvfs_get_block); return block_prepare_write(page, from, to, xfs_get_block);
} }
STATIC sector_t STATIC sector_t
linvfs_bmap( xfs_vm_bmap(
struct address_space *mapping, struct address_space *mapping,
sector_t block) sector_t block)
{ {
...@@ -1416,34 +1413,34 @@ linvfs_bmap( ...@@ -1416,34 +1413,34 @@ linvfs_bmap(
vnode_t *vp = LINVFS_GET_VP(inode); vnode_t *vp = LINVFS_GET_VP(inode);
int error; int error;
vn_trace_entry(vp, "linvfs_bmap", (inst_t *)__return_address); vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address);
VOP_RWLOCK(vp, VRWLOCK_READ); VOP_RWLOCK(vp, VRWLOCK_READ);
VOP_FLUSH_PAGES(vp, (xfs_off_t)0, -1, 0, FI_REMAPF, error); VOP_FLUSH_PAGES(vp, (xfs_off_t)0, -1, 0, FI_REMAPF, error);
VOP_RWUNLOCK(vp, VRWLOCK_READ); VOP_RWUNLOCK(vp, VRWLOCK_READ);
return generic_block_bmap(mapping, block, linvfs_get_block); return generic_block_bmap(mapping, block, xfs_get_block);
} }
STATIC int STATIC int
linvfs_readpage( xfs_vm_readpage(
struct file *unused, struct file *unused,
struct page *page) struct page *page)
{ {
return mpage_readpage(page, linvfs_get_block); return mpage_readpage(page, xfs_get_block);
} }
STATIC int STATIC int
linvfs_readpages( xfs_vm_readpages(
struct file *unused, struct file *unused,
struct address_space *mapping, struct address_space *mapping,
struct list_head *pages, struct list_head *pages,
unsigned nr_pages) unsigned nr_pages)
{ {
return mpage_readpages(mapping, pages, nr_pages, linvfs_get_block); return mpage_readpages(mapping, pages, nr_pages, xfs_get_block);
} }
STATIC int STATIC int
linvfs_invalidate_page( xfs_vm_invalidate_page(
struct page *page, struct page *page,
unsigned long offset) unsigned long offset)
{ {
...@@ -1452,16 +1449,16 @@ linvfs_invalidate_page( ...@@ -1452,16 +1449,16 @@ linvfs_invalidate_page(
return block_invalidatepage(page, offset); return block_invalidatepage(page, offset);
} }
struct address_space_operations linvfs_aops = { struct address_space_operations xfs_address_space_operations = {
.readpage = linvfs_readpage, .readpage = xfs_vm_readpage,
.readpages = linvfs_readpages, .readpages = xfs_vm_readpages,
.writepage = linvfs_writepage, .writepage = xfs_vm_writepage,
.sync_page = block_sync_page, .sync_page = block_sync_page,
.releasepage = linvfs_release_page, .releasepage = xfs_vm_release_page,
.invalidatepage = linvfs_invalidate_page, .invalidatepage = xfs_vm_invalidate_page,
.prepare_write = linvfs_prepare_write, .prepare_write = xfs_vm_prepare_write,
.commit_write = generic_commit_write, .commit_write = generic_commit_write,
.bmap = linvfs_bmap, .bmap = xfs_vm_bmap,
.direct_IO = linvfs_direct_IO, .direct_IO = xfs_vm_direct_IO,
.migratepage = buffer_migrate_page, .migratepage = buffer_migrate_page,
}; };
...@@ -40,7 +40,7 @@ typedef struct xfs_ioend { ...@@ -40,7 +40,7 @@ typedef struct xfs_ioend {
struct work_struct io_work; /* xfsdatad work queue */ struct work_struct io_work; /* xfsdatad work queue */
} xfs_ioend_t; } xfs_ioend_t;
extern struct address_space_operations linvfs_aops; extern struct address_space_operations xfs_address_space_operations;
extern int linvfs_get_block(struct inode *, sector_t, struct buffer_head *, int); extern int xfs_get_block(struct inode *, sector_t, struct buffer_head *, int);
#endif /* __XFS_IOPS_H__ */ #endif /* __XFS_IOPS_H__ */
...@@ -739,7 +739,7 @@ STATIC void ...@@ -739,7 +739,7 @@ STATIC void
linvfs_truncate( linvfs_truncate(
struct inode *inode) struct inode *inode)
{ {
block_truncate_page(inode->i_mapping, inode->i_size, linvfs_get_block); block_truncate_page(inode->i_mapping, inode->i_size, xfs_get_block);
} }
STATIC int STATIC int
......
...@@ -129,7 +129,7 @@ xfs_set_inodeops( ...@@ -129,7 +129,7 @@ xfs_set_inodeops(
case S_IFREG: case S_IFREG:
inode->i_op = &linvfs_file_inode_operations; inode->i_op = &linvfs_file_inode_operations;
inode->i_fop = &linvfs_file_operations; inode->i_fop = &linvfs_file_operations;
inode->i_mapping->a_ops = &linvfs_aops; inode->i_mapping->a_ops = &xfs_address_space_operations;
break; break;
case S_IFDIR: case S_IFDIR:
inode->i_op = &linvfs_dir_inode_operations; inode->i_op = &linvfs_dir_inode_operations;
...@@ -138,7 +138,7 @@ xfs_set_inodeops( ...@@ -138,7 +138,7 @@ xfs_set_inodeops(
case S_IFLNK: case S_IFLNK:
inode->i_op = &linvfs_symlink_inode_operations; inode->i_op = &linvfs_symlink_inode_operations;
if (inode->i_blocks) if (inode->i_blocks)
inode->i_mapping->a_ops = &linvfs_aops; inode->i_mapping->a_ops = &xfs_address_space_operations;
break; break;
default: default:
inode->i_op = &linvfs_file_inode_operations; inode->i_op = &linvfs_file_inode_operations;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment