diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_super.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 104 |
1 files changed, 3 insertions, 101 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 1bfb0e980193..09783cc444ac 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -15,6 +15,7 @@ | |||
15 | * along with this program; if not, write the Free Software Foundation, | 15 | * along with this program; if not, write the Free Software Foundation, |
16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
17 | */ | 17 | */ |
18 | |||
18 | #include "xfs.h" | 19 | #include "xfs.h" |
19 | #include "xfs_bit.h" | 20 | #include "xfs_bit.h" |
20 | #include "xfs_log.h" | 21 | #include "xfs_log.h" |
@@ -52,11 +53,11 @@ | |||
52 | #include "xfs_trans_priv.h" | 53 | #include "xfs_trans_priv.h" |
53 | #include "xfs_filestream.h" | 54 | #include "xfs_filestream.h" |
54 | #include "xfs_da_btree.h" | 55 | #include "xfs_da_btree.h" |
55 | #include "xfs_dir2_trace.h" | ||
56 | #include "xfs_extfree_item.h" | 56 | #include "xfs_extfree_item.h" |
57 | #include "xfs_mru_cache.h" | 57 | #include "xfs_mru_cache.h" |
58 | #include "xfs_inode_item.h" | 58 | #include "xfs_inode_item.h" |
59 | #include "xfs_sync.h" | 59 | #include "xfs_sync.h" |
60 | #include "xfs_trace.h" | ||
60 | 61 | ||
61 | #include <linux/namei.h> | 62 | #include <linux/namei.h> |
62 | #include <linux/init.h> | 63 | #include <linux/init.h> |
@@ -1525,8 +1526,6 @@ xfs_fs_fill_super( | |||
1525 | goto fail_vnrele; | 1526 | goto fail_vnrele; |
1526 | 1527 | ||
1527 | kfree(mtpt); | 1528 | kfree(mtpt); |
1528 | |||
1529 | xfs_itrace_exit(XFS_I(sb->s_root->d_inode)); | ||
1530 | return 0; | 1529 | return 0; |
1531 | 1530 | ||
1532 | out_filestream_unmount: | 1531 | out_filestream_unmount: |
@@ -1602,94 +1601,6 @@ static struct file_system_type xfs_fs_type = { | |||
1602 | }; | 1601 | }; |
1603 | 1602 | ||
1604 | STATIC int __init | 1603 | STATIC int __init |
1605 | xfs_alloc_trace_bufs(void) | ||
1606 | { | ||
1607 | #ifdef XFS_ALLOC_TRACE | ||
1608 | xfs_alloc_trace_buf = ktrace_alloc(XFS_ALLOC_TRACE_SIZE, KM_MAYFAIL); | ||
1609 | if (!xfs_alloc_trace_buf) | ||
1610 | goto out; | ||
1611 | #endif | ||
1612 | #ifdef XFS_BMAP_TRACE | ||
1613 | xfs_bmap_trace_buf = ktrace_alloc(XFS_BMAP_TRACE_SIZE, KM_MAYFAIL); | ||
1614 | if (!xfs_bmap_trace_buf) | ||
1615 | goto out_free_alloc_trace; | ||
1616 | #endif | ||
1617 | #ifdef XFS_BTREE_TRACE | ||
1618 | xfs_allocbt_trace_buf = ktrace_alloc(XFS_ALLOCBT_TRACE_SIZE, | ||
1619 | KM_MAYFAIL); | ||
1620 | if (!xfs_allocbt_trace_buf) | ||
1621 | goto out_free_bmap_trace; | ||
1622 | |||
1623 | xfs_inobt_trace_buf = ktrace_alloc(XFS_INOBT_TRACE_SIZE, KM_MAYFAIL); | ||
1624 | if (!xfs_inobt_trace_buf) | ||
1625 | goto out_free_allocbt_trace; | ||
1626 | |||
1627 | xfs_bmbt_trace_buf = ktrace_alloc(XFS_BMBT_TRACE_SIZE, KM_MAYFAIL); | ||
1628 | if (!xfs_bmbt_trace_buf) | ||
1629 | goto out_free_inobt_trace; | ||
1630 | #endif | ||
1631 | #ifdef XFS_ATTR_TRACE | ||
1632 | xfs_attr_trace_buf = ktrace_alloc(XFS_ATTR_TRACE_SIZE, KM_MAYFAIL); | ||
1633 | if (!xfs_attr_trace_buf) | ||
1634 | goto out_free_bmbt_trace; | ||
1635 | #endif | ||
1636 | #ifdef XFS_DIR2_TRACE | ||
1637 | xfs_dir2_trace_buf = ktrace_alloc(XFS_DIR2_GTRACE_SIZE, KM_MAYFAIL); | ||
1638 | if (!xfs_dir2_trace_buf) | ||
1639 | goto out_free_attr_trace; | ||
1640 | #endif | ||
1641 | |||
1642 | return 0; | ||
1643 | |||
1644 | #ifdef XFS_DIR2_TRACE | ||
1645 | out_free_attr_trace: | ||
1646 | #endif | ||
1647 | #ifdef XFS_ATTR_TRACE | ||
1648 | ktrace_free(xfs_attr_trace_buf); | ||
1649 | out_free_bmbt_trace: | ||
1650 | #endif | ||
1651 | #ifdef XFS_BTREE_TRACE | ||
1652 | ktrace_free(xfs_bmbt_trace_buf); | ||
1653 | out_free_inobt_trace: | ||
1654 | ktrace_free(xfs_inobt_trace_buf); | ||
1655 | out_free_allocbt_trace: | ||
1656 | ktrace_free(xfs_allocbt_trace_buf); | ||
1657 | out_free_bmap_trace: | ||
1658 | #endif | ||
1659 | #ifdef XFS_BMAP_TRACE | ||
1660 | ktrace_free(xfs_bmap_trace_buf); | ||
1661 | out_free_alloc_trace: | ||
1662 | #endif | ||
1663 | #ifdef XFS_ALLOC_TRACE | ||
1664 | ktrace_free(xfs_alloc_trace_buf); | ||
1665 | out: | ||
1666 | #endif | ||
1667 | return -ENOMEM; | ||
1668 | } | ||
1669 | |||
1670 | STATIC void | ||
1671 | xfs_free_trace_bufs(void) | ||
1672 | { | ||
1673 | #ifdef XFS_DIR2_TRACE | ||
1674 | ktrace_free(xfs_dir2_trace_buf); | ||
1675 | #endif | ||
1676 | #ifdef XFS_ATTR_TRACE | ||
1677 | ktrace_free(xfs_attr_trace_buf); | ||
1678 | #endif | ||
1679 | #ifdef XFS_BTREE_TRACE | ||
1680 | ktrace_free(xfs_bmbt_trace_buf); | ||
1681 | ktrace_free(xfs_inobt_trace_buf); | ||
1682 | ktrace_free(xfs_allocbt_trace_buf); | ||
1683 | #endif | ||
1684 | #ifdef XFS_BMAP_TRACE | ||
1685 | ktrace_free(xfs_bmap_trace_buf); | ||
1686 | #endif | ||
1687 | #ifdef XFS_ALLOC_TRACE | ||
1688 | ktrace_free(xfs_alloc_trace_buf); | ||
1689 | #endif | ||
1690 | } | ||
1691 | |||
1692 | STATIC int __init | ||
1693 | xfs_init_zones(void) | 1604 | xfs_init_zones(void) |
1694 | { | 1605 | { |
1695 | 1606 | ||
@@ -1830,7 +1741,6 @@ init_xfs_fs(void) | |||
1830 | printk(KERN_INFO XFS_VERSION_STRING " with " | 1741 | printk(KERN_INFO XFS_VERSION_STRING " with " |
1831 | XFS_BUILD_OPTIONS " enabled\n"); | 1742 | XFS_BUILD_OPTIONS " enabled\n"); |
1832 | 1743 | ||
1833 | ktrace_init(64); | ||
1834 | xfs_ioend_init(); | 1744 | xfs_ioend_init(); |
1835 | xfs_dir_startup(); | 1745 | xfs_dir_startup(); |
1836 | 1746 | ||
@@ -1838,13 +1748,9 @@ init_xfs_fs(void) | |||
1838 | if (error) | 1748 | if (error) |
1839 | goto out; | 1749 | goto out; |
1840 | 1750 | ||
1841 | error = xfs_alloc_trace_bufs(); | ||
1842 | if (error) | ||
1843 | goto out_destroy_zones; | ||
1844 | |||
1845 | error = xfs_mru_cache_init(); | 1751 | error = xfs_mru_cache_init(); |
1846 | if (error) | 1752 | if (error) |
1847 | goto out_free_trace_buffers; | 1753 | goto out_destroy_zones; |
1848 | 1754 | ||
1849 | error = xfs_filestream_init(); | 1755 | error = xfs_filestream_init(); |
1850 | if (error) | 1756 | if (error) |
@@ -1879,8 +1785,6 @@ init_xfs_fs(void) | |||
1879 | xfs_filestream_uninit(); | 1785 | xfs_filestream_uninit(); |
1880 | out_mru_cache_uninit: | 1786 | out_mru_cache_uninit: |
1881 | xfs_mru_cache_uninit(); | 1787 | xfs_mru_cache_uninit(); |
1882 | out_free_trace_buffers: | ||
1883 | xfs_free_trace_bufs(); | ||
1884 | out_destroy_zones: | 1788 | out_destroy_zones: |
1885 | xfs_destroy_zones(); | 1789 | xfs_destroy_zones(); |
1886 | out: | 1790 | out: |
@@ -1897,9 +1801,7 @@ exit_xfs_fs(void) | |||
1897 | xfs_buf_terminate(); | 1801 | xfs_buf_terminate(); |
1898 | xfs_filestream_uninit(); | 1802 | xfs_filestream_uninit(); |
1899 | xfs_mru_cache_uninit(); | 1803 | xfs_mru_cache_uninit(); |
1900 | xfs_free_trace_bufs(); | ||
1901 | xfs_destroy_zones(); | 1804 | xfs_destroy_zones(); |
1902 | ktrace_uninit(); | ||
1903 | } | 1805 | } |
1904 | 1806 | ||
1905 | module_init(init_xfs_fs); | 1807 | module_init(init_xfs_fs); |