diff options
Diffstat (limited to 'fs/gfs2/super.c')
-rw-r--r-- | fs/gfs2/super.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index dd3e737f528e..ef0562c3bc71 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. | 2 | * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. |
3 | * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. | 3 | * Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. |
4 | * | 4 | * |
5 | * This copyrighted material is made available to anyone wishing to use, | 5 | * This copyrighted material is made available to anyone wishing to use, |
6 | * modify, copy, or redistribute it subject to the terms and conditions | 6 | * modify, copy, or redistribute it subject to the terms and conditions |
@@ -51,13 +51,9 @@ void gfs2_tune_init(struct gfs2_tune *gt) | |||
51 | { | 51 | { |
52 | spin_lock_init(>->gt_spin); | 52 | spin_lock_init(>->gt_spin); |
53 | 53 | ||
54 | gt->gt_ilimit = 100; | ||
55 | gt->gt_ilimit_tries = 3; | ||
56 | gt->gt_ilimit_min = 1; | ||
57 | gt->gt_demote_secs = 300; | 54 | gt->gt_demote_secs = 300; |
58 | gt->gt_incore_log_blocks = 1024; | 55 | gt->gt_incore_log_blocks = 1024; |
59 | gt->gt_log_flush_secs = 60; | 56 | gt->gt_log_flush_secs = 60; |
60 | gt->gt_jindex_refresh_secs = 60; | ||
61 | gt->gt_recoverd_secs = 60; | 57 | gt->gt_recoverd_secs = 60; |
62 | gt->gt_logd_secs = 1; | 58 | gt->gt_logd_secs = 1; |
63 | gt->gt_quotad_secs = 5; | 59 | gt->gt_quotad_secs = 5; |
@@ -71,10 +67,8 @@ void gfs2_tune_init(struct gfs2_tune *gt) | |||
71 | gt->gt_new_files_jdata = 0; | 67 | gt->gt_new_files_jdata = 0; |
72 | gt->gt_new_files_directio = 0; | 68 | gt->gt_new_files_directio = 0; |
73 | gt->gt_max_readahead = 1 << 18; | 69 | gt->gt_max_readahead = 1 << 18; |
74 | gt->gt_lockdump_size = 131072; | ||
75 | gt->gt_stall_secs = 600; | 70 | gt->gt_stall_secs = 600; |
76 | gt->gt_complain_secs = 10; | 71 | gt->gt_complain_secs = 10; |
77 | gt->gt_reclaim_limit = 5000; | ||
78 | gt->gt_statfs_quantum = 30; | 72 | gt->gt_statfs_quantum = 30; |
79 | gt->gt_statfs_slow = 0; | 73 | gt->gt_statfs_slow = 0; |
80 | } | 74 | } |
@@ -393,6 +387,7 @@ int gfs2_jindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ji_gh) | |||
393 | if (!jd) | 387 | if (!jd) |
394 | break; | 388 | break; |
395 | 389 | ||
390 | INIT_LIST_HEAD(&jd->extent_list); | ||
396 | jd->jd_inode = gfs2_lookupi(sdp->sd_jindex, &name, 1, NULL); | 391 | jd->jd_inode = gfs2_lookupi(sdp->sd_jindex, &name, 1, NULL); |
397 | if (!jd->jd_inode || IS_ERR(jd->jd_inode)) { | 392 | if (!jd->jd_inode || IS_ERR(jd->jd_inode)) { |
398 | if (!jd->jd_inode) | 393 | if (!jd->jd_inode) |
@@ -422,8 +417,9 @@ int gfs2_jindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ji_gh) | |||
422 | 417 | ||
423 | void gfs2_jindex_free(struct gfs2_sbd *sdp) | 418 | void gfs2_jindex_free(struct gfs2_sbd *sdp) |
424 | { | 419 | { |
425 | struct list_head list; | 420 | struct list_head list, *head; |
426 | struct gfs2_jdesc *jd; | 421 | struct gfs2_jdesc *jd; |
422 | struct gfs2_journal_extent *jext; | ||
427 | 423 | ||
428 | spin_lock(&sdp->sd_jindex_spin); | 424 | spin_lock(&sdp->sd_jindex_spin); |
429 | list_add(&list, &sdp->sd_jindex_list); | 425 | list_add(&list, &sdp->sd_jindex_list); |
@@ -433,6 +429,14 @@ void gfs2_jindex_free(struct gfs2_sbd *sdp) | |||
433 | 429 | ||
434 | while (!list_empty(&list)) { | 430 | while (!list_empty(&list)) { |
435 | jd = list_entry(list.next, struct gfs2_jdesc, jd_list); | 431 | jd = list_entry(list.next, struct gfs2_jdesc, jd_list); |
432 | head = &jd->extent_list; | ||
433 | while (!list_empty(head)) { | ||
434 | jext = list_entry(head->next, | ||
435 | struct gfs2_journal_extent, | ||
436 | extent_list); | ||
437 | list_del(&jext->extent_list); | ||
438 | kfree(jext); | ||
439 | } | ||
436 | list_del(&jd->jd_list); | 440 | list_del(&jd->jd_list); |
437 | iput(jd->jd_inode); | 441 | iput(jd->jd_inode); |
438 | kfree(jd); | 442 | kfree(jd); |
@@ -543,7 +547,6 @@ int gfs2_make_fs_rw(struct gfs2_sbd *sdp) | |||
543 | if (error) | 547 | if (error) |
544 | return error; | 548 | return error; |
545 | 549 | ||
546 | gfs2_meta_cache_flush(ip); | ||
547 | j_gl->gl_ops->go_inval(j_gl, DIO_METADATA); | 550 | j_gl->gl_ops->go_inval(j_gl, DIO_METADATA); |
548 | 551 | ||
549 | error = gfs2_find_jhead(sdp->sd_jdesc, &head); | 552 | error = gfs2_find_jhead(sdp->sd_jdesc, &head); |
@@ -686,9 +689,7 @@ void gfs2_statfs_change(struct gfs2_sbd *sdp, s64 total, s64 free, | |||
686 | if (error) | 689 | if (error) |
687 | return; | 690 | return; |
688 | 691 | ||
689 | mutex_lock(&sdp->sd_statfs_mutex); | ||
690 | gfs2_trans_add_bh(l_ip->i_gl, l_bh, 1); | 692 | gfs2_trans_add_bh(l_ip->i_gl, l_bh, 1); |
691 | mutex_unlock(&sdp->sd_statfs_mutex); | ||
692 | 693 | ||
693 | spin_lock(&sdp->sd_statfs_spin); | 694 | spin_lock(&sdp->sd_statfs_spin); |
694 | l_sc->sc_total += total; | 695 | l_sc->sc_total += total; |
@@ -736,9 +737,7 @@ int gfs2_statfs_sync(struct gfs2_sbd *sdp) | |||
736 | if (error) | 737 | if (error) |
737 | goto out_bh2; | 738 | goto out_bh2; |
738 | 739 | ||
739 | mutex_lock(&sdp->sd_statfs_mutex); | ||
740 | gfs2_trans_add_bh(l_ip->i_gl, l_bh, 1); | 740 | gfs2_trans_add_bh(l_ip->i_gl, l_bh, 1); |
741 | mutex_unlock(&sdp->sd_statfs_mutex); | ||
742 | 741 | ||
743 | spin_lock(&sdp->sd_statfs_spin); | 742 | spin_lock(&sdp->sd_statfs_spin); |
744 | m_sc->sc_total += l_sc->sc_total; | 743 | m_sc->sc_total += l_sc->sc_total; |