diff options
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/aops.c | 4 | ||||
-rw-r--r-- | fs/gfs2/bmap.c | 2 | ||||
-rw-r--r-- | fs/gfs2/glock.c | 79 | ||||
-rw-r--r-- | fs/gfs2/glock.h | 9 | ||||
-rw-r--r-- | fs/gfs2/glops.c | 16 | ||||
-rw-r--r-- | fs/gfs2/incore.h | 7 | ||||
-rw-r--r-- | fs/gfs2/inode.c | 6 | ||||
-rw-r--r-- | fs/gfs2/lock_dlm.c | 16 | ||||
-rw-r--r-- | fs/gfs2/lops.c | 4 | ||||
-rw-r--r-- | fs/gfs2/main.c | 28 | ||||
-rw-r--r-- | fs/gfs2/meta_io.c | 46 | ||||
-rw-r--r-- | fs/gfs2/meta_io.h | 12 | ||||
-rw-r--r-- | fs/gfs2/ops_fstype.c | 18 | ||||
-rw-r--r-- | fs/gfs2/ops_inode.c | 113 | ||||
-rw-r--r-- | fs/gfs2/quota.c | 9 | ||||
-rw-r--r-- | fs/gfs2/quota.h | 2 | ||||
-rw-r--r-- | fs/gfs2/super.c | 35 | ||||
-rw-r--r-- | fs/gfs2/sys.c | 4 | ||||
-rw-r--r-- | fs/gfs2/util.c | 1 | ||||
-rw-r--r-- | fs/gfs2/util.h | 1 |
20 files changed, 177 insertions, 235 deletions
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index 7b8da9415267..0c1d0b82dcf1 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2/aops.c | |||
@@ -1061,8 +1061,8 @@ out: | |||
1061 | 1061 | ||
1062 | int gfs2_releasepage(struct page *page, gfp_t gfp_mask) | 1062 | int gfs2_releasepage(struct page *page, gfp_t gfp_mask) |
1063 | { | 1063 | { |
1064 | struct inode *aspace = page->mapping->host; | 1064 | struct address_space *mapping = page->mapping; |
1065 | struct gfs2_sbd *sdp = aspace->i_sb->s_fs_info; | 1065 | struct gfs2_sbd *sdp = gfs2_mapping2sbd(mapping); |
1066 | struct buffer_head *bh, *head; | 1066 | struct buffer_head *bh, *head; |
1067 | struct gfs2_bufdata *bd; | 1067 | struct gfs2_bufdata *bd; |
1068 | 1068 | ||
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 6d47379e794b..583e823307ae 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c | |||
@@ -541,7 +541,7 @@ static int gfs2_bmap_alloc(struct inode *inode, const sector_t lblock, | |||
541 | *ptr++ = cpu_to_be64(bn++); | 541 | *ptr++ = cpu_to_be64(bn++); |
542 | break; | 542 | break; |
543 | } | 543 | } |
544 | } while (state != ALLOC_DATA); | 544 | } while ((state != ALLOC_DATA) || !dblock); |
545 | 545 | ||
546 | ip->i_height = height; | 546 | ip->i_height = height; |
547 | gfs2_add_inode_blocks(&ip->i_inode, alloced); | 547 | gfs2_add_inode_blocks(&ip->i_inode, alloced); |
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index f455a03a09e2..454d4b4eb36b 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/list.h> | 19 | #include <linux/list.h> |
20 | #include <linux/wait.h> | 20 | #include <linux/wait.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/rwsem.h> | ||
23 | #include <asm/uaccess.h> | 22 | #include <asm/uaccess.h> |
24 | #include <linux/seq_file.h> | 23 | #include <linux/seq_file.h> |
25 | #include <linux/debugfs.h> | 24 | #include <linux/debugfs.h> |
@@ -60,7 +59,6 @@ static int __dump_glock(struct seq_file *seq, const struct gfs2_glock *gl); | |||
60 | #define GLOCK_BUG_ON(gl,x) do { if (unlikely(x)) { __dump_glock(NULL, gl); BUG(); } } while(0) | 59 | #define GLOCK_BUG_ON(gl,x) do { if (unlikely(x)) { __dump_glock(NULL, gl); BUG(); } } while(0) |
61 | static void do_xmote(struct gfs2_glock *gl, struct gfs2_holder *gh, unsigned int target); | 60 | static void do_xmote(struct gfs2_glock *gl, struct gfs2_holder *gh, unsigned int target); |
62 | 61 | ||
63 | static DECLARE_RWSEM(gfs2_umount_flush_sem); | ||
64 | static struct dentry *gfs2_root; | 62 | static struct dentry *gfs2_root; |
65 | static struct workqueue_struct *glock_workqueue; | 63 | static struct workqueue_struct *glock_workqueue; |
66 | struct workqueue_struct *gfs2_delete_workqueue; | 64 | struct workqueue_struct *gfs2_delete_workqueue; |
@@ -154,12 +152,14 @@ static unsigned int gl_hash(const struct gfs2_sbd *sdp, | |||
154 | static void glock_free(struct gfs2_glock *gl) | 152 | static void glock_free(struct gfs2_glock *gl) |
155 | { | 153 | { |
156 | struct gfs2_sbd *sdp = gl->gl_sbd; | 154 | struct gfs2_sbd *sdp = gl->gl_sbd; |
157 | struct inode *aspace = gl->gl_aspace; | 155 | struct address_space *mapping = gfs2_glock2aspace(gl); |
156 | struct kmem_cache *cachep = gfs2_glock_cachep; | ||
158 | 157 | ||
159 | if (aspace) | 158 | GLOCK_BUG_ON(gl, mapping && mapping->nrpages); |
160 | gfs2_aspace_put(aspace); | ||
161 | trace_gfs2_glock_put(gl); | 159 | trace_gfs2_glock_put(gl); |
162 | sdp->sd_lockstruct.ls_ops->lm_put_lock(gfs2_glock_cachep, gl); | 160 | if (mapping) |
161 | cachep = gfs2_glock_aspace_cachep; | ||
162 | sdp->sd_lockstruct.ls_ops->lm_put_lock(cachep, gl); | ||
163 | } | 163 | } |
164 | 164 | ||
165 | /** | 165 | /** |
@@ -712,7 +712,6 @@ static void glock_work_func(struct work_struct *work) | |||
712 | finish_xmote(gl, gl->gl_reply); | 712 | finish_xmote(gl, gl->gl_reply); |
713 | drop_ref = 1; | 713 | drop_ref = 1; |
714 | } | 714 | } |
715 | down_read(&gfs2_umount_flush_sem); | ||
716 | spin_lock(&gl->gl_spin); | 715 | spin_lock(&gl->gl_spin); |
717 | if (test_and_clear_bit(GLF_PENDING_DEMOTE, &gl->gl_flags) && | 716 | if (test_and_clear_bit(GLF_PENDING_DEMOTE, &gl->gl_flags) && |
718 | gl->gl_state != LM_ST_UNLOCKED && | 717 | gl->gl_state != LM_ST_UNLOCKED && |
@@ -725,7 +724,6 @@ static void glock_work_func(struct work_struct *work) | |||
725 | } | 724 | } |
726 | run_queue(gl, 0); | 725 | run_queue(gl, 0); |
727 | spin_unlock(&gl->gl_spin); | 726 | spin_unlock(&gl->gl_spin); |
728 | up_read(&gfs2_umount_flush_sem); | ||
729 | if (!delay || | 727 | if (!delay || |
730 | queue_delayed_work(glock_workqueue, &gl->gl_work, delay) == 0) | 728 | queue_delayed_work(glock_workqueue, &gl->gl_work, delay) == 0) |
731 | gfs2_glock_put(gl); | 729 | gfs2_glock_put(gl); |
@@ -750,10 +748,11 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number, | |||
750 | const struct gfs2_glock_operations *glops, int create, | 748 | const struct gfs2_glock_operations *glops, int create, |
751 | struct gfs2_glock **glp) | 749 | struct gfs2_glock **glp) |
752 | { | 750 | { |
751 | struct super_block *s = sdp->sd_vfs; | ||
753 | struct lm_lockname name = { .ln_number = number, .ln_type = glops->go_type }; | 752 | struct lm_lockname name = { .ln_number = number, .ln_type = glops->go_type }; |
754 | struct gfs2_glock *gl, *tmp; | 753 | struct gfs2_glock *gl, *tmp; |
755 | unsigned int hash = gl_hash(sdp, &name); | 754 | unsigned int hash = gl_hash(sdp, &name); |
756 | int error; | 755 | struct address_space *mapping; |
757 | 756 | ||
758 | read_lock(gl_lock_addr(hash)); | 757 | read_lock(gl_lock_addr(hash)); |
759 | gl = search_bucket(hash, sdp, &name); | 758 | gl = search_bucket(hash, sdp, &name); |
@@ -765,10 +764,14 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number, | |||
765 | if (!create) | 764 | if (!create) |
766 | return -ENOENT; | 765 | return -ENOENT; |
767 | 766 | ||
768 | gl = kmem_cache_alloc(gfs2_glock_cachep, GFP_KERNEL); | 767 | if (glops->go_flags & GLOF_ASPACE) |
768 | gl = kmem_cache_alloc(gfs2_glock_aspace_cachep, GFP_KERNEL); | ||
769 | else | ||
770 | gl = kmem_cache_alloc(gfs2_glock_cachep, GFP_KERNEL); | ||
769 | if (!gl) | 771 | if (!gl) |
770 | return -ENOMEM; | 772 | return -ENOMEM; |
771 | 773 | ||
774 | atomic_inc(&sdp->sd_glock_disposal); | ||
772 | gl->gl_flags = 0; | 775 | gl->gl_flags = 0; |
773 | gl->gl_name = name; | 776 | gl->gl_name = name; |
774 | atomic_set(&gl->gl_ref, 1); | 777 | atomic_set(&gl->gl_ref, 1); |
@@ -783,18 +786,18 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number, | |||
783 | gl->gl_tchange = jiffies; | 786 | gl->gl_tchange = jiffies; |
784 | gl->gl_object = NULL; | 787 | gl->gl_object = NULL; |
785 | gl->gl_sbd = sdp; | 788 | gl->gl_sbd = sdp; |
786 | gl->gl_aspace = NULL; | ||
787 | INIT_DELAYED_WORK(&gl->gl_work, glock_work_func); | 789 | INIT_DELAYED_WORK(&gl->gl_work, glock_work_func); |
788 | INIT_WORK(&gl->gl_delete, delete_work_func); | 790 | INIT_WORK(&gl->gl_delete, delete_work_func); |
789 | 791 | ||
790 | /* If this glock protects actual on-disk data or metadata blocks, | 792 | mapping = gfs2_glock2aspace(gl); |
791 | create a VFS inode to manage the pages/buffers holding them. */ | 793 | if (mapping) { |
792 | if (glops == &gfs2_inode_glops || glops == &gfs2_rgrp_glops) { | 794 | mapping->a_ops = &gfs2_meta_aops; |
793 | gl->gl_aspace = gfs2_aspace_get(sdp); | 795 | mapping->host = s->s_bdev->bd_inode; |
794 | if (!gl->gl_aspace) { | 796 | mapping->flags = 0; |
795 | error = -ENOMEM; | 797 | mapping_set_gfp_mask(mapping, GFP_NOFS); |
796 | goto fail; | 798 | mapping->assoc_mapping = NULL; |
797 | } | 799 | mapping->backing_dev_info = s->s_bdi; |
800 | mapping->writeback_index = 0; | ||
798 | } | 801 | } |
799 | 802 | ||
800 | write_lock(gl_lock_addr(hash)); | 803 | write_lock(gl_lock_addr(hash)); |
@@ -811,10 +814,6 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number, | |||
811 | *glp = gl; | 814 | *glp = gl; |
812 | 815 | ||
813 | return 0; | 816 | return 0; |
814 | |||
815 | fail: | ||
816 | kmem_cache_free(gfs2_glock_cachep, gl); | ||
817 | return error; | ||
818 | } | 817 | } |
819 | 818 | ||
820 | /** | 819 | /** |
@@ -1509,35 +1508,13 @@ void gfs2_glock_thaw(struct gfs2_sbd *sdp) | |||
1509 | 1508 | ||
1510 | void gfs2_gl_hash_clear(struct gfs2_sbd *sdp) | 1509 | void gfs2_gl_hash_clear(struct gfs2_sbd *sdp) |
1511 | { | 1510 | { |
1512 | unsigned long t; | ||
1513 | unsigned int x; | 1511 | unsigned int x; |
1514 | int cont; | ||
1515 | 1512 | ||
1516 | t = jiffies; | 1513 | for (x = 0; x < GFS2_GL_HASH_SIZE; x++) |
1517 | 1514 | examine_bucket(clear_glock, sdp, x); | |
1518 | for (;;) { | 1515 | flush_workqueue(glock_workqueue); |
1519 | cont = 0; | 1516 | wait_event(sdp->sd_glock_wait, atomic_read(&sdp->sd_glock_disposal) == 0); |
1520 | for (x = 0; x < GFS2_GL_HASH_SIZE; x++) { | 1517 | gfs2_dump_lockstate(sdp); |
1521 | if (examine_bucket(clear_glock, sdp, x)) | ||
1522 | cont = 1; | ||
1523 | } | ||
1524 | |||
1525 | if (!cont) | ||
1526 | break; | ||
1527 | |||
1528 | if (time_after_eq(jiffies, | ||
1529 | t + gfs2_tune_get(sdp, gt_stall_secs) * HZ)) { | ||
1530 | fs_warn(sdp, "Unmount seems to be stalled. " | ||
1531 | "Dumping lock state...\n"); | ||
1532 | gfs2_dump_lockstate(sdp); | ||
1533 | t = jiffies; | ||
1534 | } | ||
1535 | |||
1536 | down_write(&gfs2_umount_flush_sem); | ||
1537 | invalidate_inodes(sdp->sd_vfs); | ||
1538 | up_write(&gfs2_umount_flush_sem); | ||
1539 | msleep(10); | ||
1540 | } | ||
1541 | } | 1518 | } |
1542 | 1519 | ||
1543 | void gfs2_glock_finish_truncate(struct gfs2_inode *ip) | 1520 | void gfs2_glock_finish_truncate(struct gfs2_inode *ip) |
@@ -1681,7 +1658,7 @@ static int __dump_glock(struct seq_file *seq, const struct gfs2_glock *gl) | |||
1681 | dtime *= 1000000/HZ; /* demote time in uSec */ | 1658 | dtime *= 1000000/HZ; /* demote time in uSec */ |
1682 | if (!test_bit(GLF_DEMOTE, &gl->gl_flags)) | 1659 | if (!test_bit(GLF_DEMOTE, &gl->gl_flags)) |
1683 | dtime = 0; | 1660 | dtime = 0; |
1684 | gfs2_print_dbg(seq, "G: s:%s n:%u/%llu f:%s t:%s d:%s/%llu a:%d r:%d\n", | 1661 | gfs2_print_dbg(seq, "G: s:%s n:%u/%llx f:%s t:%s d:%s/%llu a:%d r:%d\n", |
1685 | state2str(gl->gl_state), | 1662 | state2str(gl->gl_state), |
1686 | gl->gl_name.ln_type, | 1663 | gl->gl_name.ln_type, |
1687 | (unsigned long long)gl->gl_name.ln_number, | 1664 | (unsigned long long)gl->gl_name.ln_number, |
diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h index 13f0bd228132..2bda1911b156 100644 --- a/fs/gfs2/glock.h +++ b/fs/gfs2/glock.h | |||
@@ -123,7 +123,7 @@ struct lm_lockops { | |||
123 | int (*lm_mount) (struct gfs2_sbd *sdp, const char *fsname); | 123 | int (*lm_mount) (struct gfs2_sbd *sdp, const char *fsname); |
124 | void (*lm_unmount) (struct gfs2_sbd *sdp); | 124 | void (*lm_unmount) (struct gfs2_sbd *sdp); |
125 | void (*lm_withdraw) (struct gfs2_sbd *sdp); | 125 | void (*lm_withdraw) (struct gfs2_sbd *sdp); |
126 | void (*lm_put_lock) (struct kmem_cache *cachep, void *gl); | 126 | void (*lm_put_lock) (struct kmem_cache *cachep, struct gfs2_glock *gl); |
127 | unsigned int (*lm_lock) (struct gfs2_glock *gl, | 127 | unsigned int (*lm_lock) (struct gfs2_glock *gl, |
128 | unsigned int req_state, unsigned int flags); | 128 | unsigned int req_state, unsigned int flags); |
129 | void (*lm_cancel) (struct gfs2_glock *gl); | 129 | void (*lm_cancel) (struct gfs2_glock *gl); |
@@ -180,6 +180,13 @@ static inline int gfs2_glock_is_held_shrd(struct gfs2_glock *gl) | |||
180 | return gl->gl_state == LM_ST_SHARED; | 180 | return gl->gl_state == LM_ST_SHARED; |
181 | } | 181 | } |
182 | 182 | ||
183 | static inline struct address_space *gfs2_glock2aspace(struct gfs2_glock *gl) | ||
184 | { | ||
185 | if (gl->gl_ops->go_flags & GLOF_ASPACE) | ||
186 | return (struct address_space *)(gl + 1); | ||
187 | return NULL; | ||
188 | } | ||
189 | |||
183 | int gfs2_glock_get(struct gfs2_sbd *sdp, | 190 | int gfs2_glock_get(struct gfs2_sbd *sdp, |
184 | u64 number, const struct gfs2_glock_operations *glops, | 191 | u64 number, const struct gfs2_glock_operations *glops, |
185 | int create, struct gfs2_glock **glp); | 192 | int create, struct gfs2_glock **glp); |
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 78554acc0605..38e3749d476c 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c | |||
@@ -87,7 +87,7 @@ static void gfs2_ail_empty_gl(struct gfs2_glock *gl) | |||
87 | 87 | ||
88 | static void rgrp_go_sync(struct gfs2_glock *gl) | 88 | static void rgrp_go_sync(struct gfs2_glock *gl) |
89 | { | 89 | { |
90 | struct address_space *metamapping = gl->gl_aspace->i_mapping; | 90 | struct address_space *metamapping = gfs2_glock2aspace(gl); |
91 | int error; | 91 | int error; |
92 | 92 | ||
93 | if (!test_and_clear_bit(GLF_DIRTY, &gl->gl_flags)) | 93 | if (!test_and_clear_bit(GLF_DIRTY, &gl->gl_flags)) |
@@ -113,7 +113,7 @@ static void rgrp_go_sync(struct gfs2_glock *gl) | |||
113 | 113 | ||
114 | static void rgrp_go_inval(struct gfs2_glock *gl, int flags) | 114 | static void rgrp_go_inval(struct gfs2_glock *gl, int flags) |
115 | { | 115 | { |
116 | struct address_space *mapping = gl->gl_aspace->i_mapping; | 116 | struct address_space *mapping = gfs2_glock2aspace(gl); |
117 | 117 | ||
118 | BUG_ON(!(flags & DIO_METADATA)); | 118 | BUG_ON(!(flags & DIO_METADATA)); |
119 | gfs2_assert_withdraw(gl->gl_sbd, !atomic_read(&gl->gl_ail_count)); | 119 | gfs2_assert_withdraw(gl->gl_sbd, !atomic_read(&gl->gl_ail_count)); |
@@ -134,7 +134,7 @@ static void rgrp_go_inval(struct gfs2_glock *gl, int flags) | |||
134 | static void inode_go_sync(struct gfs2_glock *gl) | 134 | static void inode_go_sync(struct gfs2_glock *gl) |
135 | { | 135 | { |
136 | struct gfs2_inode *ip = gl->gl_object; | 136 | struct gfs2_inode *ip = gl->gl_object; |
137 | struct address_space *metamapping = gl->gl_aspace->i_mapping; | 137 | struct address_space *metamapping = gfs2_glock2aspace(gl); |
138 | int error; | 138 | int error; |
139 | 139 | ||
140 | if (ip && !S_ISREG(ip->i_inode.i_mode)) | 140 | if (ip && !S_ISREG(ip->i_inode.i_mode)) |
@@ -183,7 +183,7 @@ static void inode_go_inval(struct gfs2_glock *gl, int flags) | |||
183 | gfs2_assert_withdraw(gl->gl_sbd, !atomic_read(&gl->gl_ail_count)); | 183 | gfs2_assert_withdraw(gl->gl_sbd, !atomic_read(&gl->gl_ail_count)); |
184 | 184 | ||
185 | if (flags & DIO_METADATA) { | 185 | if (flags & DIO_METADATA) { |
186 | struct address_space *mapping = gl->gl_aspace->i_mapping; | 186 | struct address_space *mapping = gfs2_glock2aspace(gl); |
187 | truncate_inode_pages(mapping, 0); | 187 | truncate_inode_pages(mapping, 0); |
188 | if (ip) { | 188 | if (ip) { |
189 | set_bit(GIF_INVALID, &ip->i_flags); | 189 | set_bit(GIF_INVALID, &ip->i_flags); |
@@ -282,7 +282,8 @@ static int inode_go_dump(struct seq_file *seq, const struct gfs2_glock *gl) | |||
282 | 282 | ||
283 | static int rgrp_go_demote_ok(const struct gfs2_glock *gl) | 283 | static int rgrp_go_demote_ok(const struct gfs2_glock *gl) |
284 | { | 284 | { |
285 | return !gl->gl_aspace->i_mapping->nrpages; | 285 | const struct address_space *mapping = (const struct address_space *)(gl + 1); |
286 | return !mapping->nrpages; | ||
286 | } | 287 | } |
287 | 288 | ||
288 | /** | 289 | /** |
@@ -387,8 +388,7 @@ static void iopen_go_callback(struct gfs2_glock *gl) | |||
387 | struct gfs2_inode *ip = (struct gfs2_inode *)gl->gl_object; | 388 | struct gfs2_inode *ip = (struct gfs2_inode *)gl->gl_object; |
388 | 389 | ||
389 | if (gl->gl_demote_state == LM_ST_UNLOCKED && | 390 | if (gl->gl_demote_state == LM_ST_UNLOCKED && |
390 | gl->gl_state == LM_ST_SHARED && | 391 | gl->gl_state == LM_ST_SHARED && ip) { |
391 | ip && test_bit(GIF_USER, &ip->i_flags)) { | ||
392 | gfs2_glock_hold(gl); | 392 | gfs2_glock_hold(gl); |
393 | if (queue_work(gfs2_delete_workqueue, &gl->gl_delete) == 0) | 393 | if (queue_work(gfs2_delete_workqueue, &gl->gl_delete) == 0) |
394 | gfs2_glock_put_nolock(gl); | 394 | gfs2_glock_put_nolock(gl); |
@@ -407,6 +407,7 @@ const struct gfs2_glock_operations gfs2_inode_glops = { | |||
407 | .go_dump = inode_go_dump, | 407 | .go_dump = inode_go_dump, |
408 | .go_type = LM_TYPE_INODE, | 408 | .go_type = LM_TYPE_INODE, |
409 | .go_min_hold_time = HZ / 5, | 409 | .go_min_hold_time = HZ / 5, |
410 | .go_flags = GLOF_ASPACE, | ||
410 | }; | 411 | }; |
411 | 412 | ||
412 | const struct gfs2_glock_operations gfs2_rgrp_glops = { | 413 | const struct gfs2_glock_operations gfs2_rgrp_glops = { |
@@ -418,6 +419,7 @@ const struct gfs2_glock_operations gfs2_rgrp_glops = { | |||
418 | .go_dump = gfs2_rgrp_dump, | 419 | .go_dump = gfs2_rgrp_dump, |
419 | .go_type = LM_TYPE_RGRP, | 420 | .go_type = LM_TYPE_RGRP, |
420 | .go_min_hold_time = HZ / 5, | 421 | .go_min_hold_time = HZ / 5, |
422 | .go_flags = GLOF_ASPACE, | ||
421 | }; | 423 | }; |
422 | 424 | ||
423 | const struct gfs2_glock_operations gfs2_trans_glops = { | 425 | const struct gfs2_glock_operations gfs2_trans_glops = { |
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 4792200978c8..b8025e51cabf 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h | |||
@@ -162,6 +162,8 @@ struct gfs2_glock_operations { | |||
162 | void (*go_callback) (struct gfs2_glock *gl); | 162 | void (*go_callback) (struct gfs2_glock *gl); |
163 | const int go_type; | 163 | const int go_type; |
164 | const unsigned long go_min_hold_time; | 164 | const unsigned long go_min_hold_time; |
165 | const unsigned long go_flags; | ||
166 | #define GLOF_ASPACE 1 | ||
165 | }; | 167 | }; |
166 | 168 | ||
167 | enum { | 169 | enum { |
@@ -225,7 +227,6 @@ struct gfs2_glock { | |||
225 | 227 | ||
226 | struct gfs2_sbd *gl_sbd; | 228 | struct gfs2_sbd *gl_sbd; |
227 | 229 | ||
228 | struct inode *gl_aspace; | ||
229 | struct list_head gl_ail_list; | 230 | struct list_head gl_ail_list; |
230 | atomic_t gl_ail_count; | 231 | atomic_t gl_ail_count; |
231 | struct delayed_work gl_work; | 232 | struct delayed_work gl_work; |
@@ -258,7 +259,6 @@ enum { | |||
258 | GIF_INVALID = 0, | 259 | GIF_INVALID = 0, |
259 | GIF_QD_LOCKED = 1, | 260 | GIF_QD_LOCKED = 1, |
260 | GIF_SW_PAGED = 3, | 261 | GIF_SW_PAGED = 3, |
261 | GIF_USER = 4, /* user inode, not metadata addr space */ | ||
262 | }; | 262 | }; |
263 | 263 | ||
264 | 264 | ||
@@ -451,7 +451,6 @@ struct gfs2_tune { | |||
451 | unsigned int gt_quota_quantum; /* Secs between syncs to quota file */ | 451 | unsigned int gt_quota_quantum; /* Secs between syncs to quota file */ |
452 | unsigned int gt_new_files_jdata; | 452 | unsigned int gt_new_files_jdata; |
453 | unsigned int gt_max_readahead; /* Max bytes to read-ahead from disk */ | 453 | unsigned int gt_max_readahead; /* Max bytes to read-ahead from disk */ |
454 | unsigned int gt_stall_secs; /* Detects trouble! */ | ||
455 | unsigned int gt_complain_secs; | 454 | unsigned int gt_complain_secs; |
456 | unsigned int gt_statfs_quantum; | 455 | unsigned int gt_statfs_quantum; |
457 | unsigned int gt_statfs_slow; | 456 | unsigned int gt_statfs_slow; |
@@ -544,6 +543,8 @@ struct gfs2_sbd { | |||
544 | struct gfs2_holder sd_live_gh; | 543 | struct gfs2_holder sd_live_gh; |
545 | struct gfs2_glock *sd_rename_gl; | 544 | struct gfs2_glock *sd_rename_gl; |
546 | struct gfs2_glock *sd_trans_gl; | 545 | struct gfs2_glock *sd_trans_gl; |
546 | wait_queue_head_t sd_glock_wait; | ||
547 | atomic_t sd_glock_disposal; | ||
547 | 548 | ||
548 | /* Inode Stuff */ | 549 | /* Inode Stuff */ |
549 | 550 | ||
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 6e220f4eee7d..b1bf2694fb2b 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -45,7 +45,7 @@ static int iget_test(struct inode *inode, void *opaque) | |||
45 | struct gfs2_inode *ip = GFS2_I(inode); | 45 | struct gfs2_inode *ip = GFS2_I(inode); |
46 | u64 *no_addr = opaque; | 46 | u64 *no_addr = opaque; |
47 | 47 | ||
48 | if (ip->i_no_addr == *no_addr && test_bit(GIF_USER, &ip->i_flags)) | 48 | if (ip->i_no_addr == *no_addr) |
49 | return 1; | 49 | return 1; |
50 | 50 | ||
51 | return 0; | 51 | return 0; |
@@ -58,7 +58,6 @@ static int iget_set(struct inode *inode, void *opaque) | |||
58 | 58 | ||
59 | inode->i_ino = (unsigned long)*no_addr; | 59 | inode->i_ino = (unsigned long)*no_addr; |
60 | ip->i_no_addr = *no_addr; | 60 | ip->i_no_addr = *no_addr; |
61 | set_bit(GIF_USER, &ip->i_flags); | ||
62 | return 0; | 61 | return 0; |
63 | } | 62 | } |
64 | 63 | ||
@@ -84,7 +83,7 @@ static int iget_skip_test(struct inode *inode, void *opaque) | |||
84 | struct gfs2_inode *ip = GFS2_I(inode); | 83 | struct gfs2_inode *ip = GFS2_I(inode); |
85 | struct gfs2_skip_data *data = opaque; | 84 | struct gfs2_skip_data *data = opaque; |
86 | 85 | ||
87 | if (ip->i_no_addr == data->no_addr && test_bit(GIF_USER, &ip->i_flags)){ | 86 | if (ip->i_no_addr == data->no_addr) { |
88 | if (inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE)){ | 87 | if (inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE)){ |
89 | data->skipped = 1; | 88 | data->skipped = 1; |
90 | return 0; | 89 | return 0; |
@@ -103,7 +102,6 @@ static int iget_skip_set(struct inode *inode, void *opaque) | |||
103 | return 1; | 102 | return 1; |
104 | inode->i_ino = (unsigned long)(data->no_addr); | 103 | inode->i_ino = (unsigned long)(data->no_addr); |
105 | ip->i_no_addr = data->no_addr; | 104 | ip->i_no_addr = data->no_addr; |
106 | set_bit(GIF_USER, &ip->i_flags); | ||
107 | return 0; | 105 | return 0; |
108 | } | 106 | } |
109 | 107 | ||
diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c index 46df988323bc..569b46240f61 100644 --- a/fs/gfs2/lock_dlm.c +++ b/fs/gfs2/lock_dlm.c | |||
@@ -21,6 +21,7 @@ static void gdlm_ast(void *arg) | |||
21 | { | 21 | { |
22 | struct gfs2_glock *gl = arg; | 22 | struct gfs2_glock *gl = arg; |
23 | unsigned ret = gl->gl_state; | 23 | unsigned ret = gl->gl_state; |
24 | struct gfs2_sbd *sdp = gl->gl_sbd; | ||
24 | 25 | ||
25 | BUG_ON(gl->gl_lksb.sb_flags & DLM_SBF_DEMOTED); | 26 | BUG_ON(gl->gl_lksb.sb_flags & DLM_SBF_DEMOTED); |
26 | 27 | ||
@@ -29,7 +30,12 @@ static void gdlm_ast(void *arg) | |||
29 | 30 | ||
30 | switch (gl->gl_lksb.sb_status) { | 31 | switch (gl->gl_lksb.sb_status) { |
31 | case -DLM_EUNLOCK: /* Unlocked, so glock can be freed */ | 32 | case -DLM_EUNLOCK: /* Unlocked, so glock can be freed */ |
32 | kmem_cache_free(gfs2_glock_cachep, gl); | 33 | if (gl->gl_ops->go_flags & GLOF_ASPACE) |
34 | kmem_cache_free(gfs2_glock_aspace_cachep, gl); | ||
35 | else | ||
36 | kmem_cache_free(gfs2_glock_cachep, gl); | ||
37 | if (atomic_dec_and_test(&sdp->sd_glock_disposal)) | ||
38 | wake_up(&sdp->sd_glock_wait); | ||
33 | return; | 39 | return; |
34 | case -DLM_ECANCEL: /* Cancel while getting lock */ | 40 | case -DLM_ECANCEL: /* Cancel while getting lock */ |
35 | ret |= LM_OUT_CANCELED; | 41 | ret |= LM_OUT_CANCELED; |
@@ -164,14 +170,16 @@ static unsigned int gdlm_lock(struct gfs2_glock *gl, | |||
164 | return LM_OUT_ASYNC; | 170 | return LM_OUT_ASYNC; |
165 | } | 171 | } |
166 | 172 | ||
167 | static void gdlm_put_lock(struct kmem_cache *cachep, void *ptr) | 173 | static void gdlm_put_lock(struct kmem_cache *cachep, struct gfs2_glock *gl) |
168 | { | 174 | { |
169 | struct gfs2_glock *gl = ptr; | 175 | struct gfs2_sbd *sdp = gl->gl_sbd; |
170 | struct lm_lockstruct *ls = &gl->gl_sbd->sd_lockstruct; | 176 | struct lm_lockstruct *ls = &sdp->sd_lockstruct; |
171 | int error; | 177 | int error; |
172 | 178 | ||
173 | if (gl->gl_lksb.sb_lkid == 0) { | 179 | if (gl->gl_lksb.sb_lkid == 0) { |
174 | kmem_cache_free(cachep, gl); | 180 | kmem_cache_free(cachep, gl); |
181 | if (atomic_dec_and_test(&sdp->sd_glock_disposal)) | ||
182 | wake_up(&sdp->sd_glock_wait); | ||
175 | return; | 183 | return; |
176 | } | 184 | } |
177 | 185 | ||
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index de97632ba32f..adc260fbea90 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c | |||
@@ -528,9 +528,9 @@ static void databuf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le) | |||
528 | gfs2_pin(sdp, bd->bd_bh); | 528 | gfs2_pin(sdp, bd->bd_bh); |
529 | tr->tr_num_databuf_new++; | 529 | tr->tr_num_databuf_new++; |
530 | sdp->sd_log_num_databuf++; | 530 | sdp->sd_log_num_databuf++; |
531 | list_add(&le->le_list, &sdp->sd_log_le_databuf); | 531 | list_add_tail(&le->le_list, &sdp->sd_log_le_databuf); |
532 | } else { | 532 | } else { |
533 | list_add(&le->le_list, &sdp->sd_log_le_ordered); | 533 | list_add_tail(&le->le_list, &sdp->sd_log_le_ordered); |
534 | } | 534 | } |
535 | out: | 535 | out: |
536 | gfs2_log_unlock(sdp); | 536 | gfs2_log_unlock(sdp); |
diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c index 5b31f7741a8f..a88fadc704bb 100644 --- a/fs/gfs2/main.c +++ b/fs/gfs2/main.c | |||
@@ -52,6 +52,22 @@ static void gfs2_init_glock_once(void *foo) | |||
52 | atomic_set(&gl->gl_ail_count, 0); | 52 | atomic_set(&gl->gl_ail_count, 0); |
53 | } | 53 | } |
54 | 54 | ||
55 | static void gfs2_init_gl_aspace_once(void *foo) | ||
56 | { | ||
57 | struct gfs2_glock *gl = foo; | ||
58 | struct address_space *mapping = (struct address_space *)(gl + 1); | ||
59 | |||
60 | gfs2_init_glock_once(gl); | ||
61 | memset(mapping, 0, sizeof(*mapping)); | ||
62 | INIT_RADIX_TREE(&mapping->page_tree, GFP_ATOMIC); | ||
63 | spin_lock_init(&mapping->tree_lock); | ||
64 | spin_lock_init(&mapping->i_mmap_lock); | ||
65 | INIT_LIST_HEAD(&mapping->private_list); | ||
66 | spin_lock_init(&mapping->private_lock); | ||
67 | INIT_RAW_PRIO_TREE_ROOT(&mapping->i_mmap); | ||
68 | INIT_LIST_HEAD(&mapping->i_mmap_nonlinear); | ||
69 | } | ||
70 | |||
55 | /** | 71 | /** |
56 | * init_gfs2_fs - Register GFS2 as a filesystem | 72 | * init_gfs2_fs - Register GFS2 as a filesystem |
57 | * | 73 | * |
@@ -78,6 +94,14 @@ static int __init init_gfs2_fs(void) | |||
78 | if (!gfs2_glock_cachep) | 94 | if (!gfs2_glock_cachep) |
79 | goto fail; | 95 | goto fail; |
80 | 96 | ||
97 | gfs2_glock_aspace_cachep = kmem_cache_create("gfs2_glock (aspace)", | ||
98 | sizeof(struct gfs2_glock) + | ||
99 | sizeof(struct address_space), | ||
100 | 0, 0, gfs2_init_gl_aspace_once); | ||
101 | |||
102 | if (!gfs2_glock_aspace_cachep) | ||
103 | goto fail; | ||
104 | |||
81 | gfs2_inode_cachep = kmem_cache_create("gfs2_inode", | 105 | gfs2_inode_cachep = kmem_cache_create("gfs2_inode", |
82 | sizeof(struct gfs2_inode), | 106 | sizeof(struct gfs2_inode), |
83 | 0, SLAB_RECLAIM_ACCOUNT| | 107 | 0, SLAB_RECLAIM_ACCOUNT| |
@@ -144,6 +168,9 @@ fail: | |||
144 | if (gfs2_inode_cachep) | 168 | if (gfs2_inode_cachep) |
145 | kmem_cache_destroy(gfs2_inode_cachep); | 169 | kmem_cache_destroy(gfs2_inode_cachep); |
146 | 170 | ||
171 | if (gfs2_glock_aspace_cachep) | ||
172 | kmem_cache_destroy(gfs2_glock_aspace_cachep); | ||
173 | |||
147 | if (gfs2_glock_cachep) | 174 | if (gfs2_glock_cachep) |
148 | kmem_cache_destroy(gfs2_glock_cachep); | 175 | kmem_cache_destroy(gfs2_glock_cachep); |
149 | 176 | ||
@@ -169,6 +196,7 @@ static void __exit exit_gfs2_fs(void) | |||
169 | kmem_cache_destroy(gfs2_rgrpd_cachep); | 196 | kmem_cache_destroy(gfs2_rgrpd_cachep); |
170 | kmem_cache_destroy(gfs2_bufdata_cachep); | 197 | kmem_cache_destroy(gfs2_bufdata_cachep); |
171 | kmem_cache_destroy(gfs2_inode_cachep); | 198 | kmem_cache_destroy(gfs2_inode_cachep); |
199 | kmem_cache_destroy(gfs2_glock_aspace_cachep); | ||
172 | kmem_cache_destroy(gfs2_glock_cachep); | 200 | kmem_cache_destroy(gfs2_glock_cachep); |
173 | 201 | ||
174 | gfs2_sys_uninit(); | 202 | gfs2_sys_uninit(); |
diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c index 6f68a5f18eb8..0bb12c80937a 100644 --- a/fs/gfs2/meta_io.c +++ b/fs/gfs2/meta_io.c | |||
@@ -93,49 +93,13 @@ static int gfs2_aspace_writepage(struct page *page, struct writeback_control *wb | |||
93 | return err; | 93 | return err; |
94 | } | 94 | } |
95 | 95 | ||
96 | static const struct address_space_operations aspace_aops = { | 96 | const struct address_space_operations gfs2_meta_aops = { |
97 | .writepage = gfs2_aspace_writepage, | 97 | .writepage = gfs2_aspace_writepage, |
98 | .releasepage = gfs2_releasepage, | 98 | .releasepage = gfs2_releasepage, |
99 | .sync_page = block_sync_page, | 99 | .sync_page = block_sync_page, |
100 | }; | 100 | }; |
101 | 101 | ||
102 | /** | 102 | /** |
103 | * gfs2_aspace_get - Create and initialize a struct inode structure | ||
104 | * @sdp: the filesystem the aspace is in | ||
105 | * | ||
106 | * Right now a struct inode is just a struct inode. Maybe Linux | ||
107 | * will supply a more lightweight address space construct (that works) | ||
108 | * in the future. | ||
109 | * | ||
110 | * Make sure pages/buffers in this aspace aren't in high memory. | ||
111 | * | ||
112 | * Returns: the aspace | ||
113 | */ | ||
114 | |||
115 | struct inode *gfs2_aspace_get(struct gfs2_sbd *sdp) | ||
116 | { | ||
117 | struct inode *aspace; | ||
118 | struct gfs2_inode *ip; | ||
119 | |||
120 | aspace = new_inode(sdp->sd_vfs); | ||
121 | if (aspace) { | ||
122 | mapping_set_gfp_mask(aspace->i_mapping, GFP_NOFS); | ||
123 | aspace->i_mapping->a_ops = &aspace_aops; | ||
124 | aspace->i_size = MAX_LFS_FILESIZE; | ||
125 | ip = GFS2_I(aspace); | ||
126 | clear_bit(GIF_USER, &ip->i_flags); | ||
127 | insert_inode_hash(aspace); | ||
128 | } | ||
129 | return aspace; | ||
130 | } | ||
131 | |||
132 | void gfs2_aspace_put(struct inode *aspace) | ||
133 | { | ||
134 | remove_inode_hash(aspace); | ||
135 | iput(aspace); | ||
136 | } | ||
137 | |||
138 | /** | ||
139 | * gfs2_meta_sync - Sync all buffers associated with a glock | 103 | * gfs2_meta_sync - Sync all buffers associated with a glock |
140 | * @gl: The glock | 104 | * @gl: The glock |
141 | * | 105 | * |
@@ -143,7 +107,7 @@ void gfs2_aspace_put(struct inode *aspace) | |||
143 | 107 | ||
144 | void gfs2_meta_sync(struct gfs2_glock *gl) | 108 | void gfs2_meta_sync(struct gfs2_glock *gl) |
145 | { | 109 | { |
146 | struct address_space *mapping = gl->gl_aspace->i_mapping; | 110 | struct address_space *mapping = gfs2_glock2aspace(gl); |
147 | int error; | 111 | int error; |
148 | 112 | ||
149 | filemap_fdatawrite(mapping); | 113 | filemap_fdatawrite(mapping); |
@@ -164,7 +128,7 @@ void gfs2_meta_sync(struct gfs2_glock *gl) | |||
164 | 128 | ||
165 | struct buffer_head *gfs2_getbuf(struct gfs2_glock *gl, u64 blkno, int create) | 129 | struct buffer_head *gfs2_getbuf(struct gfs2_glock *gl, u64 blkno, int create) |
166 | { | 130 | { |
167 | struct address_space *mapping = gl->gl_aspace->i_mapping; | 131 | struct address_space *mapping = gfs2_glock2aspace(gl); |
168 | struct gfs2_sbd *sdp = gl->gl_sbd; | 132 | struct gfs2_sbd *sdp = gl->gl_sbd; |
169 | struct page *page; | 133 | struct page *page; |
170 | struct buffer_head *bh; | 134 | struct buffer_head *bh; |
@@ -344,8 +308,10 @@ void gfs2_attach_bufdata(struct gfs2_glock *gl, struct buffer_head *bh, | |||
344 | 308 | ||
345 | void gfs2_remove_from_journal(struct buffer_head *bh, struct gfs2_trans *tr, int meta) | 309 | void gfs2_remove_from_journal(struct buffer_head *bh, struct gfs2_trans *tr, int meta) |
346 | { | 310 | { |
347 | struct gfs2_sbd *sdp = GFS2_SB(bh->b_page->mapping->host); | 311 | struct address_space *mapping = bh->b_page->mapping; |
312 | struct gfs2_sbd *sdp = gfs2_mapping2sbd(mapping); | ||
348 | struct gfs2_bufdata *bd = bh->b_private; | 313 | struct gfs2_bufdata *bd = bh->b_private; |
314 | |||
349 | if (test_clear_buffer_pinned(bh)) { | 315 | if (test_clear_buffer_pinned(bh)) { |
350 | list_del_init(&bd->bd_le.le_list); | 316 | list_del_init(&bd->bd_le.le_list); |
351 | if (meta) { | 317 | if (meta) { |
diff --git a/fs/gfs2/meta_io.h b/fs/gfs2/meta_io.h index de270c2f9b63..6a1d9ba16411 100644 --- a/fs/gfs2/meta_io.h +++ b/fs/gfs2/meta_io.h | |||
@@ -37,8 +37,16 @@ static inline void gfs2_buffer_copy_tail(struct buffer_head *to_bh, | |||
37 | 0, from_head - to_head); | 37 | 0, from_head - to_head); |
38 | } | 38 | } |
39 | 39 | ||
40 | struct inode *gfs2_aspace_get(struct gfs2_sbd *sdp); | 40 | extern const struct address_space_operations gfs2_meta_aops; |
41 | void gfs2_aspace_put(struct inode *aspace); | 41 | |
42 | static inline struct gfs2_sbd *gfs2_mapping2sbd(struct address_space *mapping) | ||
43 | { | ||
44 | struct inode *inode = mapping->host; | ||
45 | if (mapping->a_ops == &gfs2_meta_aops) | ||
46 | return (((struct gfs2_glock *)mapping) - 1)->gl_sbd; | ||
47 | else | ||
48 | return inode->i_sb->s_fs_info; | ||
49 | } | ||
42 | 50 | ||
43 | void gfs2_meta_sync(struct gfs2_glock *gl); | 51 | void gfs2_meta_sync(struct gfs2_glock *gl); |
44 | 52 | ||
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 0556f7fededd..c1309ed1c496 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c | |||
@@ -65,7 +65,6 @@ static void gfs2_tune_init(struct gfs2_tune *gt) | |||
65 | gt->gt_quota_scale_den = 1; | 65 | gt->gt_quota_scale_den = 1; |
66 | gt->gt_new_files_jdata = 0; | 66 | gt->gt_new_files_jdata = 0; |
67 | gt->gt_max_readahead = 1 << 18; | 67 | gt->gt_max_readahead = 1 << 18; |
68 | gt->gt_stall_secs = 600; | ||
69 | gt->gt_complain_secs = 10; | 68 | gt->gt_complain_secs = 10; |
70 | } | 69 | } |
71 | 70 | ||
@@ -82,6 +81,8 @@ static struct gfs2_sbd *init_sbd(struct super_block *sb) | |||
82 | 81 | ||
83 | gfs2_tune_init(&sdp->sd_tune); | 82 | gfs2_tune_init(&sdp->sd_tune); |
84 | 83 | ||
84 | init_waitqueue_head(&sdp->sd_glock_wait); | ||
85 | atomic_set(&sdp->sd_glock_disposal, 0); | ||
85 | spin_lock_init(&sdp->sd_statfs_spin); | 86 | spin_lock_init(&sdp->sd_statfs_spin); |
86 | 87 | ||
87 | spin_lock_init(&sdp->sd_rindex_spin); | 88 | spin_lock_init(&sdp->sd_rindex_spin); |
@@ -723,7 +724,7 @@ static int init_journal(struct gfs2_sbd *sdp, int undo) | |||
723 | goto fail; | 724 | goto fail; |
724 | } | 725 | } |
725 | 726 | ||
726 | error = -EINVAL; | 727 | error = -EUSERS; |
727 | if (!gfs2_jindex_size(sdp)) { | 728 | if (!gfs2_jindex_size(sdp)) { |
728 | fs_err(sdp, "no journals!\n"); | 729 | fs_err(sdp, "no journals!\n"); |
729 | goto fail_jindex; | 730 | goto fail_jindex; |
@@ -983,9 +984,17 @@ static const match_table_t nolock_tokens = { | |||
983 | { Opt_err, NULL }, | 984 | { Opt_err, NULL }, |
984 | }; | 985 | }; |
985 | 986 | ||
987 | static void nolock_put_lock(struct kmem_cache *cachep, struct gfs2_glock *gl) | ||
988 | { | ||
989 | struct gfs2_sbd *sdp = gl->gl_sbd; | ||
990 | kmem_cache_free(cachep, gl); | ||
991 | if (atomic_dec_and_test(&sdp->sd_glock_disposal)) | ||
992 | wake_up(&sdp->sd_glock_wait); | ||
993 | } | ||
994 | |||
986 | static const struct lm_lockops nolock_ops = { | 995 | static const struct lm_lockops nolock_ops = { |
987 | .lm_proto_name = "lock_nolock", | 996 | .lm_proto_name = "lock_nolock", |
988 | .lm_put_lock = kmem_cache_free, | 997 | .lm_put_lock = nolock_put_lock, |
989 | .lm_tokens = &nolock_tokens, | 998 | .lm_tokens = &nolock_tokens, |
990 | }; | 999 | }; |
991 | 1000 | ||
@@ -1231,10 +1240,9 @@ fail_sb: | |||
1231 | fail_locking: | 1240 | fail_locking: |
1232 | init_locking(sdp, &mount_gh, UNDO); | 1241 | init_locking(sdp, &mount_gh, UNDO); |
1233 | fail_lm: | 1242 | fail_lm: |
1243 | invalidate_inodes(sb); | ||
1234 | gfs2_gl_hash_clear(sdp); | 1244 | gfs2_gl_hash_clear(sdp); |
1235 | gfs2_lm_unmount(sdp); | 1245 | gfs2_lm_unmount(sdp); |
1236 | while (invalidate_inodes(sb)) | ||
1237 | yield(); | ||
1238 | fail_sys: | 1246 | fail_sys: |
1239 | gfs2_sys_fs_del(sdp); | 1247 | gfs2_sys_fs_del(sdp); |
1240 | fail: | 1248 | fail: |
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index 84350e1be66d..4e64352d49de 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c | |||
@@ -976,122 +976,62 @@ out: | |||
976 | } | 976 | } |
977 | 977 | ||
978 | /** | 978 | /** |
979 | * gfs2_readlinki - return the contents of a symlink | 979 | * gfs2_follow_link - Follow a symbolic link |
980 | * @ip: the symlink's inode | 980 | * @dentry: The dentry of the link |
981 | * @buf: a pointer to the buffer to be filled | 981 | * @nd: Data that we pass to vfs_follow_link() |
982 | * @len: a pointer to the length of @buf | ||
983 | * | 982 | * |
984 | * If @buf is too small, a piece of memory is kmalloc()ed and needs | 983 | * This can handle symlinks of any size. |
985 | * to be freed by the caller. | ||
986 | * | 984 | * |
987 | * Returns: errno | 985 | * Returns: 0 on success or error code |
988 | */ | 986 | */ |
989 | 987 | ||
990 | static int gfs2_readlinki(struct gfs2_inode *ip, char **buf, unsigned int *len) | 988 | static void *gfs2_follow_link(struct dentry *dentry, struct nameidata *nd) |
991 | { | 989 | { |
990 | struct gfs2_inode *ip = GFS2_I(dentry->d_inode); | ||
992 | struct gfs2_holder i_gh; | 991 | struct gfs2_holder i_gh; |
993 | struct buffer_head *dibh; | 992 | struct buffer_head *dibh; |
994 | unsigned int x; | 993 | unsigned int x; |
994 | char *buf; | ||
995 | int error; | 995 | int error; |
996 | 996 | ||
997 | gfs2_holder_init(ip->i_gl, LM_ST_SHARED, 0, &i_gh); | 997 | gfs2_holder_init(ip->i_gl, LM_ST_SHARED, 0, &i_gh); |
998 | error = gfs2_glock_nq(&i_gh); | 998 | error = gfs2_glock_nq(&i_gh); |
999 | if (error) { | 999 | if (error) { |
1000 | gfs2_holder_uninit(&i_gh); | 1000 | gfs2_holder_uninit(&i_gh); |
1001 | return error; | 1001 | nd_set_link(nd, ERR_PTR(error)); |
1002 | return NULL; | ||
1002 | } | 1003 | } |
1003 | 1004 | ||
1004 | if (!ip->i_disksize) { | 1005 | if (!ip->i_disksize) { |
1005 | gfs2_consist_inode(ip); | 1006 | gfs2_consist_inode(ip); |
1006 | error = -EIO; | 1007 | buf = ERR_PTR(-EIO); |
1007 | goto out; | 1008 | goto out; |
1008 | } | 1009 | } |
1009 | 1010 | ||
1010 | error = gfs2_meta_inode_buffer(ip, &dibh); | 1011 | error = gfs2_meta_inode_buffer(ip, &dibh); |
1011 | if (error) | 1012 | if (error) { |
1013 | buf = ERR_PTR(error); | ||
1012 | goto out; | 1014 | goto out; |
1013 | |||
1014 | x = ip->i_disksize + 1; | ||
1015 | if (x > *len) { | ||
1016 | *buf = kmalloc(x, GFP_NOFS); | ||
1017 | if (!*buf) { | ||
1018 | error = -ENOMEM; | ||
1019 | goto out_brelse; | ||
1020 | } | ||
1021 | } | 1015 | } |
1022 | 1016 | ||
1023 | memcpy(*buf, dibh->b_data + sizeof(struct gfs2_dinode), x); | 1017 | x = ip->i_disksize + 1; |
1024 | *len = x; | 1018 | buf = kmalloc(x, GFP_NOFS); |
1025 | 1019 | if (!buf) | |
1026 | out_brelse: | 1020 | buf = ERR_PTR(-ENOMEM); |
1021 | else | ||
1022 | memcpy(buf, dibh->b_data + sizeof(struct gfs2_dinode), x); | ||
1027 | brelse(dibh); | 1023 | brelse(dibh); |
1028 | out: | 1024 | out: |
1029 | gfs2_glock_dq_uninit(&i_gh); | 1025 | gfs2_glock_dq_uninit(&i_gh); |
1030 | return error; | 1026 | nd_set_link(nd, buf); |
1031 | } | 1027 | return NULL; |
1032 | |||
1033 | /** | ||
1034 | * gfs2_readlink - Read the value of a symlink | ||
1035 | * @dentry: the symlink | ||
1036 | * @buf: the buffer to read the symlink data into | ||
1037 | * @size: the size of the buffer | ||
1038 | * | ||
1039 | * Returns: errno | ||
1040 | */ | ||
1041 | |||
1042 | static int gfs2_readlink(struct dentry *dentry, char __user *user_buf, | ||
1043 | int user_size) | ||
1044 | { | ||
1045 | struct gfs2_inode *ip = GFS2_I(dentry->d_inode); | ||
1046 | char array[GFS2_FAST_NAME_SIZE], *buf = array; | ||
1047 | unsigned int len = GFS2_FAST_NAME_SIZE; | ||
1048 | int error; | ||
1049 | |||
1050 | error = gfs2_readlinki(ip, &buf, &len); | ||
1051 | if (error) | ||
1052 | return error; | ||
1053 | |||
1054 | if (user_size > len - 1) | ||
1055 | user_size = len - 1; | ||
1056 | |||
1057 | if (copy_to_user(user_buf, buf, user_size)) | ||
1058 | error = -EFAULT; | ||
1059 | else | ||
1060 | error = user_size; | ||
1061 | |||
1062 | if (buf != array) | ||
1063 | kfree(buf); | ||
1064 | |||
1065 | return error; | ||
1066 | } | 1028 | } |
1067 | 1029 | ||
1068 | /** | 1030 | static void gfs2_put_link(struct dentry *dentry, struct nameidata *nd, void *p) |
1069 | * gfs2_follow_link - Follow a symbolic link | ||
1070 | * @dentry: The dentry of the link | ||
1071 | * @nd: Data that we pass to vfs_follow_link() | ||
1072 | * | ||
1073 | * This can handle symlinks of any size. It is optimised for symlinks | ||
1074 | * under GFS2_FAST_NAME_SIZE. | ||
1075 | * | ||
1076 | * Returns: 0 on success or error code | ||
1077 | */ | ||
1078 | |||
1079 | static void *gfs2_follow_link(struct dentry *dentry, struct nameidata *nd) | ||
1080 | { | 1031 | { |
1081 | struct gfs2_inode *ip = GFS2_I(dentry->d_inode); | 1032 | char *s = nd_get_link(nd); |
1082 | char array[GFS2_FAST_NAME_SIZE], *buf = array; | 1033 | if (!IS_ERR(s)) |
1083 | unsigned int len = GFS2_FAST_NAME_SIZE; | 1034 | kfree(s); |
1084 | int error; | ||
1085 | |||
1086 | error = gfs2_readlinki(ip, &buf, &len); | ||
1087 | if (!error) { | ||
1088 | error = vfs_follow_link(nd, buf); | ||
1089 | if (buf != array) | ||
1090 | kfree(buf); | ||
1091 | } else | ||
1092 | path_put(&nd->path); | ||
1093 | |||
1094 | return ERR_PTR(error); | ||
1095 | } | 1035 | } |
1096 | 1036 | ||
1097 | /** | 1037 | /** |
@@ -1426,8 +1366,9 @@ const struct inode_operations gfs2_dir_iops = { | |||
1426 | }; | 1366 | }; |
1427 | 1367 | ||
1428 | const struct inode_operations gfs2_symlink_iops = { | 1368 | const struct inode_operations gfs2_symlink_iops = { |
1429 | .readlink = gfs2_readlink, | 1369 | .readlink = generic_readlink, |
1430 | .follow_link = gfs2_follow_link, | 1370 | .follow_link = gfs2_follow_link, |
1371 | .put_link = gfs2_put_link, | ||
1431 | .permission = gfs2_permission, | 1372 | .permission = gfs2_permission, |
1432 | .setattr = gfs2_setattr, | 1373 | .setattr = gfs2_setattr, |
1433 | .getattr = gfs2_getattr, | 1374 | .getattr = gfs2_getattr, |
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index e3bf6eab8750..6dbcbad6ab17 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c | |||
@@ -1083,7 +1083,7 @@ void gfs2_quota_change(struct gfs2_inode *ip, s64 change, | |||
1083 | } | 1083 | } |
1084 | } | 1084 | } |
1085 | 1085 | ||
1086 | int gfs2_quota_sync(struct super_block *sb, int type) | 1086 | int gfs2_quota_sync(struct super_block *sb, int type, int wait) |
1087 | { | 1087 | { |
1088 | struct gfs2_sbd *sdp = sb->s_fs_info; | 1088 | struct gfs2_sbd *sdp = sb->s_fs_info; |
1089 | struct gfs2_quota_data **qda; | 1089 | struct gfs2_quota_data **qda; |
@@ -1127,6 +1127,11 @@ int gfs2_quota_sync(struct super_block *sb, int type) | |||
1127 | return error; | 1127 | return error; |
1128 | } | 1128 | } |
1129 | 1129 | ||
1130 | static int gfs2_quota_sync_timeo(struct super_block *sb, int type) | ||
1131 | { | ||
1132 | return gfs2_quota_sync(sb, type, 0); | ||
1133 | } | ||
1134 | |||
1130 | int gfs2_quota_refresh(struct gfs2_sbd *sdp, int user, u32 id) | 1135 | int gfs2_quota_refresh(struct gfs2_sbd *sdp, int user, u32 id) |
1131 | { | 1136 | { |
1132 | struct gfs2_quota_data *qd; | 1137 | struct gfs2_quota_data *qd; |
@@ -1382,7 +1387,7 @@ int gfs2_quotad(void *data) | |||
1382 | &tune->gt_statfs_quantum); | 1387 | &tune->gt_statfs_quantum); |
1383 | 1388 | ||
1384 | /* Update quota file */ | 1389 | /* Update quota file */ |
1385 | quotad_check_timeo(sdp, "sync", gfs2_quota_sync, t, | 1390 | quotad_check_timeo(sdp, "sync", gfs2_quota_sync_timeo, t, |
1386 | "ad_timeo, &tune->gt_quota_quantum); | 1391 | "ad_timeo, &tune->gt_quota_quantum); |
1387 | 1392 | ||
1388 | /* Check for & recover partially truncated inodes */ | 1393 | /* Check for & recover partially truncated inodes */ |
diff --git a/fs/gfs2/quota.h b/fs/gfs2/quota.h index e271fa07ad02..195f60c8bd14 100644 --- a/fs/gfs2/quota.h +++ b/fs/gfs2/quota.h | |||
@@ -25,7 +25,7 @@ extern int gfs2_quota_check(struct gfs2_inode *ip, u32 uid, u32 gid); | |||
25 | extern void gfs2_quota_change(struct gfs2_inode *ip, s64 change, | 25 | extern void gfs2_quota_change(struct gfs2_inode *ip, s64 change, |
26 | u32 uid, u32 gid); | 26 | u32 uid, u32 gid); |
27 | 27 | ||
28 | extern int gfs2_quota_sync(struct super_block *sb, int type); | 28 | extern int gfs2_quota_sync(struct super_block *sb, int type, int wait); |
29 | extern int gfs2_quota_refresh(struct gfs2_sbd *sdp, int user, u32 id); | 29 | extern int gfs2_quota_refresh(struct gfs2_sbd *sdp, int user, u32 id); |
30 | 30 | ||
31 | extern int gfs2_quota_init(struct gfs2_sbd *sdp); | 31 | extern int gfs2_quota_init(struct gfs2_sbd *sdp); |
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index c282ad41f3d1..50aac606b990 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <linux/gfs2_ondisk.h> | 21 | #include <linux/gfs2_ondisk.h> |
22 | #include <linux/crc32.h> | 22 | #include <linux/crc32.h> |
23 | #include <linux/time.h> | 23 | #include <linux/time.h> |
24 | #include <linux/wait.h> | ||
25 | #include <linux/writeback.h> | ||
24 | 26 | ||
25 | #include "gfs2.h" | 27 | #include "gfs2.h" |
26 | #include "incore.h" | 28 | #include "incore.h" |
@@ -710,7 +712,7 @@ void gfs2_unfreeze_fs(struct gfs2_sbd *sdp) | |||
710 | * Returns: errno | 712 | * Returns: errno |
711 | */ | 713 | */ |
712 | 714 | ||
713 | static int gfs2_write_inode(struct inode *inode, int sync) | 715 | static int gfs2_write_inode(struct inode *inode, struct writeback_control *wbc) |
714 | { | 716 | { |
715 | struct gfs2_inode *ip = GFS2_I(inode); | 717 | struct gfs2_inode *ip = GFS2_I(inode); |
716 | struct gfs2_sbd *sdp = GFS2_SB(inode); | 718 | struct gfs2_sbd *sdp = GFS2_SB(inode); |
@@ -721,8 +723,7 @@ static int gfs2_write_inode(struct inode *inode, int sync) | |||
721 | int ret = 0; | 723 | int ret = 0; |
722 | 724 | ||
723 | /* Check this is a "normal" inode, etc */ | 725 | /* Check this is a "normal" inode, etc */ |
724 | if (!test_bit(GIF_USER, &ip->i_flags) || | 726 | if (current->flags & PF_MEMALLOC) |
725 | (current->flags & PF_MEMALLOC)) | ||
726 | return 0; | 727 | return 0; |
727 | ret = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); | 728 | ret = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); |
728 | if (ret) | 729 | if (ret) |
@@ -745,7 +746,7 @@ static int gfs2_write_inode(struct inode *inode, int sync) | |||
745 | do_unlock: | 746 | do_unlock: |
746 | gfs2_glock_dq_uninit(&gh); | 747 | gfs2_glock_dq_uninit(&gh); |
747 | do_flush: | 748 | do_flush: |
748 | if (sync != 0) | 749 | if (wbc->sync_mode == WB_SYNC_ALL) |
749 | gfs2_log_flush(GFS2_SB(inode), ip->i_gl); | 750 | gfs2_log_flush(GFS2_SB(inode), ip->i_gl); |
750 | return ret; | 751 | return ret; |
751 | } | 752 | } |
@@ -763,7 +764,7 @@ static int gfs2_make_fs_ro(struct gfs2_sbd *sdp) | |||
763 | int error; | 764 | int error; |
764 | 765 | ||
765 | flush_workqueue(gfs2_delete_workqueue); | 766 | flush_workqueue(gfs2_delete_workqueue); |
766 | gfs2_quota_sync(sdp->sd_vfs, 0); | 767 | gfs2_quota_sync(sdp->sd_vfs, 0, 1); |
767 | gfs2_statfs_sync(sdp->sd_vfs, 0); | 768 | gfs2_statfs_sync(sdp->sd_vfs, 0); |
768 | 769 | ||
769 | error = gfs2_glock_nq_init(sdp->sd_trans_gl, LM_ST_SHARED, GL_NOCACHE, | 770 | error = gfs2_glock_nq_init(sdp->sd_trans_gl, LM_ST_SHARED, GL_NOCACHE, |
@@ -859,6 +860,7 @@ restart: | |||
859 | gfs2_clear_rgrpd(sdp); | 860 | gfs2_clear_rgrpd(sdp); |
860 | gfs2_jindex_free(sdp); | 861 | gfs2_jindex_free(sdp); |
861 | /* Take apart glock structures and buffer lists */ | 862 | /* Take apart glock structures and buffer lists */ |
863 | invalidate_inodes(sdp->sd_vfs); | ||
862 | gfs2_gl_hash_clear(sdp); | 864 | gfs2_gl_hash_clear(sdp); |
863 | /* Unmount the locking protocol */ | 865 | /* Unmount the locking protocol */ |
864 | gfs2_lm_unmount(sdp); | 866 | gfs2_lm_unmount(sdp); |
@@ -1193,7 +1195,7 @@ static void gfs2_drop_inode(struct inode *inode) | |||
1193 | { | 1195 | { |
1194 | struct gfs2_inode *ip = GFS2_I(inode); | 1196 | struct gfs2_inode *ip = GFS2_I(inode); |
1195 | 1197 | ||
1196 | if (test_bit(GIF_USER, &ip->i_flags) && inode->i_nlink) { | 1198 | if (inode->i_nlink) { |
1197 | struct gfs2_glock *gl = ip->i_iopen_gh.gh_gl; | 1199 | struct gfs2_glock *gl = ip->i_iopen_gh.gh_gl; |
1198 | if (gl && test_bit(GLF_DEMOTE, &gl->gl_flags)) | 1200 | if (gl && test_bit(GLF_DEMOTE, &gl->gl_flags)) |
1199 | clear_nlink(inode); | 1201 | clear_nlink(inode); |
@@ -1211,18 +1213,12 @@ static void gfs2_clear_inode(struct inode *inode) | |||
1211 | { | 1213 | { |
1212 | struct gfs2_inode *ip = GFS2_I(inode); | 1214 | struct gfs2_inode *ip = GFS2_I(inode); |
1213 | 1215 | ||
1214 | /* This tells us its a "real" inode and not one which only | 1216 | ip->i_gl->gl_object = NULL; |
1215 | * serves to contain an address space (see rgrp.c, meta_io.c) | 1217 | gfs2_glock_put(ip->i_gl); |
1216 | * which therefore doesn't have its own glocks. | 1218 | ip->i_gl = NULL; |
1217 | */ | 1219 | if (ip->i_iopen_gh.gh_gl) { |
1218 | if (test_bit(GIF_USER, &ip->i_flags)) { | 1220 | ip->i_iopen_gh.gh_gl->gl_object = NULL; |
1219 | ip->i_gl->gl_object = NULL; | 1221 | gfs2_glock_dq_uninit(&ip->i_iopen_gh); |
1220 | gfs2_glock_put(ip->i_gl); | ||
1221 | ip->i_gl = NULL; | ||
1222 | if (ip->i_iopen_gh.gh_gl) { | ||
1223 | ip->i_iopen_gh.gh_gl->gl_object = NULL; | ||
1224 | gfs2_glock_dq_uninit(&ip->i_iopen_gh); | ||
1225 | } | ||
1226 | } | 1222 | } |
1227 | } | 1223 | } |
1228 | 1224 | ||
@@ -1357,9 +1353,6 @@ static void gfs2_delete_inode(struct inode *inode) | |||
1357 | struct gfs2_holder gh; | 1353 | struct gfs2_holder gh; |
1358 | int error; | 1354 | int error; |
1359 | 1355 | ||
1360 | if (!test_bit(GIF_USER, &ip->i_flags)) | ||
1361 | goto out; | ||
1362 | |||
1363 | error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); | 1356 | error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); |
1364 | if (unlikely(error)) { | 1357 | if (unlikely(error)) { |
1365 | gfs2_glock_dq_uninit(&ip->i_iopen_gh); | 1358 | gfs2_glock_dq_uninit(&ip->i_iopen_gh); |
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index 0dc34621f6a6..b5f1a46133c8 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c | |||
@@ -167,7 +167,7 @@ static ssize_t quota_sync_store(struct gfs2_sbd *sdp, const char *buf, | |||
167 | if (simple_strtol(buf, NULL, 0) != 1) | 167 | if (simple_strtol(buf, NULL, 0) != 1) |
168 | return -EINVAL; | 168 | return -EINVAL; |
169 | 169 | ||
170 | gfs2_quota_sync(sdp->sd_vfs, 0); | 170 | gfs2_quota_sync(sdp->sd_vfs, 0, 1); |
171 | return len; | 171 | return len; |
172 | } | 172 | } |
173 | 173 | ||
@@ -478,7 +478,6 @@ TUNE_ATTR(complain_secs, 0); | |||
478 | TUNE_ATTR(statfs_slow, 0); | 478 | TUNE_ATTR(statfs_slow, 0); |
479 | TUNE_ATTR(new_files_jdata, 0); | 479 | TUNE_ATTR(new_files_jdata, 0); |
480 | TUNE_ATTR(quota_simul_sync, 1); | 480 | TUNE_ATTR(quota_simul_sync, 1); |
481 | TUNE_ATTR(stall_secs, 1); | ||
482 | TUNE_ATTR(statfs_quantum, 1); | 481 | TUNE_ATTR(statfs_quantum, 1); |
483 | TUNE_ATTR_3(quota_scale, quota_scale_show, quota_scale_store); | 482 | TUNE_ATTR_3(quota_scale, quota_scale_show, quota_scale_store); |
484 | 483 | ||
@@ -491,7 +490,6 @@ static struct attribute *tune_attrs[] = { | |||
491 | &tune_attr_complain_secs.attr, | 490 | &tune_attr_complain_secs.attr, |
492 | &tune_attr_statfs_slow.attr, | 491 | &tune_attr_statfs_slow.attr, |
493 | &tune_attr_quota_simul_sync.attr, | 492 | &tune_attr_quota_simul_sync.attr, |
494 | &tune_attr_stall_secs.attr, | ||
495 | &tune_attr_statfs_quantum.attr, | 493 | &tune_attr_statfs_quantum.attr, |
496 | &tune_attr_quota_scale.attr, | 494 | &tune_attr_quota_scale.attr, |
497 | &tune_attr_new_files_jdata.attr, | 495 | &tune_attr_new_files_jdata.attr, |
diff --git a/fs/gfs2/util.c b/fs/gfs2/util.c index f6a7efa34eb9..226f2bfbf16a 100644 --- a/fs/gfs2/util.c +++ b/fs/gfs2/util.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include "util.h" | 21 | #include "util.h" |
22 | 22 | ||
23 | struct kmem_cache *gfs2_glock_cachep __read_mostly; | 23 | struct kmem_cache *gfs2_glock_cachep __read_mostly; |
24 | struct kmem_cache *gfs2_glock_aspace_cachep __read_mostly; | ||
24 | struct kmem_cache *gfs2_inode_cachep __read_mostly; | 25 | struct kmem_cache *gfs2_inode_cachep __read_mostly; |
25 | struct kmem_cache *gfs2_bufdata_cachep __read_mostly; | 26 | struct kmem_cache *gfs2_bufdata_cachep __read_mostly; |
26 | struct kmem_cache *gfs2_rgrpd_cachep __read_mostly; | 27 | struct kmem_cache *gfs2_rgrpd_cachep __read_mostly; |
diff --git a/fs/gfs2/util.h b/fs/gfs2/util.h index 33e96b0ce9ab..b432e04600de 100644 --- a/fs/gfs2/util.h +++ b/fs/gfs2/util.h | |||
@@ -145,6 +145,7 @@ gfs2_io_error_bh_i((sdp), (bh), __func__, __FILE__, __LINE__); | |||
145 | 145 | ||
146 | 146 | ||
147 | extern struct kmem_cache *gfs2_glock_cachep; | 147 | extern struct kmem_cache *gfs2_glock_cachep; |
148 | extern struct kmem_cache *gfs2_glock_aspace_cachep; | ||
148 | extern struct kmem_cache *gfs2_inode_cachep; | 149 | extern struct kmem_cache *gfs2_inode_cachep; |
149 | extern struct kmem_cache *gfs2_bufdata_cachep; | 150 | extern struct kmem_cache *gfs2_bufdata_cachep; |
150 | extern struct kmem_cache *gfs2_rgrpd_cachep; | 151 | extern struct kmem_cache *gfs2_rgrpd_cachep; |