diff options
Diffstat (limited to 'fs/xfs')
| -rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.c | 14 | ||||
| -rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 1 | ||||
| -rw-r--r-- | fs/xfs/linux-2.6/xfs_super.h | 2 | ||||
| -rw-r--r-- | fs/xfs/quota/xfs_qm.c | 10 |
4 files changed, 16 insertions, 11 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 2df63622354e..b0f0e58866de 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
| @@ -35,10 +35,13 @@ | |||
| 35 | #include <linux/freezer.h> | 35 | #include <linux/freezer.h> |
| 36 | 36 | ||
| 37 | static kmem_zone_t *xfs_buf_zone; | 37 | static kmem_zone_t *xfs_buf_zone; |
| 38 | static struct shrinker *xfs_buf_shake; | ||
| 39 | STATIC int xfsbufd(void *); | 38 | STATIC int xfsbufd(void *); |
| 40 | STATIC int xfsbufd_wakeup(int, gfp_t); | 39 | STATIC int xfsbufd_wakeup(int, gfp_t); |
| 41 | STATIC void xfs_buf_delwri_queue(xfs_buf_t *, int); | 40 | STATIC void xfs_buf_delwri_queue(xfs_buf_t *, int); |
| 41 | static struct shrinker xfs_buf_shake = { | ||
| 42 | .shrink = xfsbufd_wakeup, | ||
| 43 | .seeks = DEFAULT_SEEKS, | ||
| 44 | }; | ||
| 42 | 45 | ||
| 43 | static struct workqueue_struct *xfslogd_workqueue; | 46 | static struct workqueue_struct *xfslogd_workqueue; |
| 44 | struct workqueue_struct *xfsdatad_workqueue; | 47 | struct workqueue_struct *xfsdatad_workqueue; |
| @@ -1832,14 +1835,9 @@ xfs_buf_init(void) | |||
| 1832 | if (!xfsdatad_workqueue) | 1835 | if (!xfsdatad_workqueue) |
| 1833 | goto out_destroy_xfslogd_workqueue; | 1836 | goto out_destroy_xfslogd_workqueue; |
| 1834 | 1837 | ||
| 1835 | xfs_buf_shake = set_shrinker(DEFAULT_SEEKS, xfsbufd_wakeup); | 1838 | register_shrinker(&xfs_buf_shake); |
| 1836 | if (!xfs_buf_shake) | ||
| 1837 | goto out_destroy_xfsdatad_workqueue; | ||
| 1838 | |||
| 1839 | return 0; | 1839 | return 0; |
| 1840 | 1840 | ||
| 1841 | out_destroy_xfsdatad_workqueue: | ||
| 1842 | destroy_workqueue(xfsdatad_workqueue); | ||
| 1843 | out_destroy_xfslogd_workqueue: | 1841 | out_destroy_xfslogd_workqueue: |
| 1844 | destroy_workqueue(xfslogd_workqueue); | 1842 | destroy_workqueue(xfslogd_workqueue); |
| 1845 | out_free_buf_zone: | 1843 | out_free_buf_zone: |
| @@ -1854,7 +1852,7 @@ xfs_buf_init(void) | |||
| 1854 | void | 1852 | void |
| 1855 | xfs_buf_terminate(void) | 1853 | xfs_buf_terminate(void) |
| 1856 | { | 1854 | { |
| 1857 | remove_shrinker(xfs_buf_shake); | 1855 | unregister_shrinker(&xfs_buf_shake); |
| 1858 | destroy_workqueue(xfsdatad_workqueue); | 1856 | destroy_workqueue(xfsdatad_workqueue); |
| 1859 | destroy_workqueue(xfslogd_workqueue); | 1857 | destroy_workqueue(xfslogd_workqueue); |
| 1860 | kmem_zone_destroy(xfs_buf_zone); | 1858 | kmem_zone_destroy(xfs_buf_zone); |
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 06894cf00b12..4528f9a3f304 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
| @@ -562,6 +562,7 @@ xfssyncd( | |||
| 562 | bhv_vfs_sync_work_t *work, *n; | 562 | bhv_vfs_sync_work_t *work, *n; |
| 563 | LIST_HEAD (tmp); | 563 | LIST_HEAD (tmp); |
| 564 | 564 | ||
| 565 | set_freezable(); | ||
| 565 | timeleft = xfs_syncd_centisecs * msecs_to_jiffies(10); | 566 | timeleft = xfs_syncd_centisecs * msecs_to_jiffies(10); |
| 566 | for (;;) { | 567 | for (;;) { |
| 567 | timeleft = schedule_timeout_interruptible(timeleft); | 568 | timeleft = schedule_timeout_interruptible(timeleft); |
diff --git a/fs/xfs/linux-2.6/xfs_super.h b/fs/xfs/linux-2.6/xfs_super.h index 33dd1ca13245..201cc3273c84 100644 --- a/fs/xfs/linux-2.6/xfs_super.h +++ b/fs/xfs/linux-2.6/xfs_super.h | |||
| @@ -18,6 +18,8 @@ | |||
| 18 | #ifndef __XFS_SUPER_H__ | 18 | #ifndef __XFS_SUPER_H__ |
| 19 | #define __XFS_SUPER_H__ | 19 | #define __XFS_SUPER_H__ |
| 20 | 20 | ||
| 21 | #include <linux/exportfs.h> | ||
| 22 | |||
| 21 | #ifdef CONFIG_XFS_DMAPI | 23 | #ifdef CONFIG_XFS_DMAPI |
| 22 | # define vfs_insertdmapi(vfs) vfs_insertops(vfsp, &xfs_dmops) | 24 | # define vfs_insertdmapi(vfs) vfs_insertops(vfsp, &xfs_dmops) |
| 23 | # define vfs_initdmapi() dmapi_init() | 25 | # define vfs_initdmapi() dmapi_init() |
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c index 7def4c699343..2d274b23ade5 100644 --- a/fs/xfs/quota/xfs_qm.c +++ b/fs/xfs/quota/xfs_qm.c | |||
| @@ -62,7 +62,6 @@ uint ndquot; | |||
| 62 | 62 | ||
| 63 | kmem_zone_t *qm_dqzone; | 63 | kmem_zone_t *qm_dqzone; |
| 64 | kmem_zone_t *qm_dqtrxzone; | 64 | kmem_zone_t *qm_dqtrxzone; |
| 65 | static struct shrinker *xfs_qm_shaker; | ||
| 66 | 65 | ||
| 67 | static cred_t xfs_zerocr; | 66 | static cred_t xfs_zerocr; |
| 68 | 67 | ||
| @@ -78,6 +77,11 @@ STATIC int xfs_qm_init_quotainos(xfs_mount_t *); | |||
| 78 | STATIC int xfs_qm_init_quotainfo(xfs_mount_t *); | 77 | STATIC int xfs_qm_init_quotainfo(xfs_mount_t *); |
| 79 | STATIC int xfs_qm_shake(int, gfp_t); | 78 | STATIC int xfs_qm_shake(int, gfp_t); |
| 80 | 79 | ||
| 80 | static struct shrinker xfs_qm_shaker = { | ||
| 81 | .shrink = xfs_qm_shake, | ||
| 82 | .seeks = DEFAULT_SEEKS, | ||
| 83 | }; | ||
| 84 | |||
| 81 | #ifdef DEBUG | 85 | #ifdef DEBUG |
| 82 | extern mutex_t qcheck_lock; | 86 | extern mutex_t qcheck_lock; |
| 83 | #endif | 87 | #endif |
| @@ -149,7 +153,7 @@ xfs_Gqm_init(void) | |||
| 149 | } else | 153 | } else |
| 150 | xqm->qm_dqzone = qm_dqzone; | 154 | xqm->qm_dqzone = qm_dqzone; |
| 151 | 155 | ||
| 152 | xfs_qm_shaker = set_shrinker(DEFAULT_SEEKS, xfs_qm_shake); | 156 | register_shrinker(&xfs_qm_shaker); |
| 153 | 157 | ||
| 154 | /* | 158 | /* |
| 155 | * The t_dqinfo portion of transactions. | 159 | * The t_dqinfo portion of transactions. |
| @@ -181,7 +185,7 @@ xfs_qm_destroy( | |||
| 181 | 185 | ||
| 182 | ASSERT(xqm != NULL); | 186 | ASSERT(xqm != NULL); |
| 183 | ASSERT(xqm->qm_nrefs == 0); | 187 | ASSERT(xqm->qm_nrefs == 0); |
| 184 | remove_shrinker(xfs_qm_shaker); | 188 | unregister_shrinker(&xfs_qm_shaker); |
| 185 | hsize = xqm->qm_dqhashmask + 1; | 189 | hsize = xqm->qm_dqhashmask + 1; |
| 186 | for (i = 0; i < hsize; i++) { | 190 | for (i = 0; i < hsize; i++) { |
| 187 | xfs_qm_list_destroy(&(xqm->qm_usr_dqhtable[i])); | 191 | xfs_qm_list_destroy(&(xqm->qm_usr_dqhtable[i])); |
