From: Eric Sandeen <sandeen@redhat.com> Date: Wed, 25 Mar 2009 15:55:46 -0500 Subject: [fs] xfs: new aops interface Message-id: 49CA9A52.4070600@redhat.com O-Subject: [PATCH 8/10] update xfs for new aops interface Bugzilla: 470845 RH-Acked-by: Josef Bacik <josef@redhat.com> Hook up to Josef's new begin_/end_write infrastructure with all the KABI bells and whistles. diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index e79d83c..b2062f3 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c @@ -1573,17 +1573,17 @@ xfs_vm_invalidatepage( block_invalidatepage(page, offset); } -const struct address_space_operations xfs_address_space_operations = { - .readpage = xfs_vm_readpage, - .readpages = xfs_vm_readpages, - .writepage = xfs_vm_writepage, - .writepages = xfs_vm_writepages, - .sync_page = block_sync_page, - .releasepage = xfs_vm_releasepage, - .invalidatepage = xfs_vm_invalidatepage, - .write_begin = xfs_vm_write_begin, - .write_end = generic_write_end, - .bmap = xfs_vm_bmap, - .direct_IO = xfs_vm_direct_IO, - .migratepage = buffer_migrate_page, +const struct address_space_operations_ext xfs_address_space_operations = { + .orig_aops.readpage = xfs_vm_readpage, + .orig_aops.readpages = xfs_vm_readpages, + .orig_aops.writepage = xfs_vm_writepage, + .orig_aops.writepages = xfs_vm_writepages, + .orig_aops.sync_page = block_sync_page, + .orig_aops.releasepage = xfs_vm_releasepage, + .orig_aops.invalidatepage = xfs_vm_invalidatepage, + .write_begin = xfs_vm_write_begin, + .write_end = generic_write_end, + .orig_aops.bmap = xfs_vm_bmap, + .orig_aops.direct_IO = xfs_vm_direct_IO, + .orig_aops.migratepage = buffer_migrate_page, }; diff --git a/fs/xfs/linux-2.6/xfs_aops.h b/fs/xfs/linux-2.6/xfs_aops.h index 3ba0631..67d9810 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 { struct work_struct io_work; /* xfsdatad work queue */ } xfs_ioend_t; -extern const struct address_space_operations xfs_address_space_operations; +extern const struct address_space_operations_ext xfs_address_space_operations; extern int xfs_get_blocks(struct inode *, sector_t, struct buffer_head *, int); #endif /* __XFS_AOPS_H__ */ diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index c2233ec..63e59dd 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c @@ -813,7 +813,9 @@ xfs_setup_inode( case S_IFREG: inode->i_op = &xfs_inode_operations; inode->i_fop = &xfs_file_operations; - inode->i_mapping->a_ops = &xfs_address_space_operations; + inode->i_mapping->a_ops = + (struct address_space_operations *) + &xfs_address_space_operations; break; case S_IFDIR: if (xfs_sb_version_hasasciici(&XFS_M(inode->i_sb)->m_sb)) @@ -825,7 +827,9 @@ xfs_setup_inode( case S_IFLNK: inode->i_op = &xfs_symlink_inode_operations; if (!(ip->i_df.if_flags & XFS_IFINLINE)) - inode->i_mapping->a_ops = &xfs_address_space_operations; + inode->i_mapping->a_ops = + (struct address_space_operations *) + &xfs_address_space_operations; break; default: inode->i_op = &xfs_inode_operations; diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index ab10491..a7b60f2 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c @@ -1758,6 +1758,7 @@ xfs_fs_fill_super( sb->s_maxbytes = xfs_max_file_offset(sb->s_blocksize_bits); sb->s_time_gran = 1; set_posix_acl_flag(sb); + sb->s_flags |= MS_HAS_NEW_AOPS; root = igrab(VFS_I(mp->m_rootip)); if (!root) {