aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2019-04-05 07:16:14 -0400
committerAndreas Gruenbacher <agruenba@redhat.com>2019-05-07 17:39:14 -0400
commita5b1d3fc503164bb04e2b720054ab07d8a0004fc (patch)
tree2befe2b0136b720305f684de5e3ffb638dcdf325 /fs/gfs2
parent32ac43f6a4ebf398c82e4b541fbe1229b2e47384 (diff)
gfs2: Rename sd_log_le_{revoke,ordered}
Rename sd_log_le_revoke to sd_log_revokes and sd_log_le_ordered to sd_log_ordered: not sure what le stands for here, but it doesn't add clarity, and if it stands for list entry, it's actually confusing as those are both list heads but not list entries. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/incore.h4
-rw-r--r--fs/gfs2/log.c14
-rw-r--r--fs/gfs2/log.h2
-rw-r--r--fs/gfs2/lops.c4
-rw-r--r--fs/gfs2/ops_fstype.c4
-rw-r--r--fs/gfs2/trans.c2
6 files changed, 15 insertions, 15 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 6a94b094a904..78c8e761b321 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -809,8 +809,8 @@ struct gfs2_sbd {
809 atomic_t sd_log_pinned; 809 atomic_t sd_log_pinned;
810 unsigned int sd_log_num_revoke; 810 unsigned int sd_log_num_revoke;
811 811
812 struct list_head sd_log_le_revoke; 812 struct list_head sd_log_revokes;
813 struct list_head sd_log_le_ordered; 813 struct list_head sd_log_ordered;
814 spinlock_t sd_ordered_lock; 814 spinlock_t sd_ordered_lock;
815 815
816 atomic_t sd_log_thresh1; 816 atomic_t sd_log_thresh1;
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index d55315a46ece..a7febb4bd400 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -551,9 +551,9 @@ static void gfs2_ordered_write(struct gfs2_sbd *sdp)
551 LIST_HEAD(written); 551 LIST_HEAD(written);
552 552
553 spin_lock(&sdp->sd_ordered_lock); 553 spin_lock(&sdp->sd_ordered_lock);
554 list_sort(NULL, &sdp->sd_log_le_ordered, &ip_cmp); 554 list_sort(NULL, &sdp->sd_log_ordered, &ip_cmp);
555 while (!list_empty(&sdp->sd_log_le_ordered)) { 555 while (!list_empty(&sdp->sd_log_ordered)) {
556 ip = list_entry(sdp->sd_log_le_ordered.next, struct gfs2_inode, i_ordered); 556 ip = list_entry(sdp->sd_log_ordered.next, struct gfs2_inode, i_ordered);
557 if (ip->i_inode.i_mapping->nrpages == 0) { 557 if (ip->i_inode.i_mapping->nrpages == 0) {
558 test_and_clear_bit(GIF_ORDERED, &ip->i_flags); 558 test_and_clear_bit(GIF_ORDERED, &ip->i_flags);
559 list_del(&ip->i_ordered); 559 list_del(&ip->i_ordered);
@@ -564,7 +564,7 @@ static void gfs2_ordered_write(struct gfs2_sbd *sdp)
564 filemap_fdatawrite(ip->i_inode.i_mapping); 564 filemap_fdatawrite(ip->i_inode.i_mapping);
565 spin_lock(&sdp->sd_ordered_lock); 565 spin_lock(&sdp->sd_ordered_lock);
566 } 566 }
567 list_splice(&written, &sdp->sd_log_le_ordered); 567 list_splice(&written, &sdp->sd_log_ordered);
568 spin_unlock(&sdp->sd_ordered_lock); 568 spin_unlock(&sdp->sd_ordered_lock);
569} 569}
570 570
@@ -573,8 +573,8 @@ static void gfs2_ordered_wait(struct gfs2_sbd *sdp)
573 struct gfs2_inode *ip; 573 struct gfs2_inode *ip;
574 574
575 spin_lock(&sdp->sd_ordered_lock); 575 spin_lock(&sdp->sd_ordered_lock);
576 while (!list_empty(&sdp->sd_log_le_ordered)) { 576 while (!list_empty(&sdp->sd_log_ordered)) {
577 ip = list_entry(sdp->sd_log_le_ordered.next, struct gfs2_inode, i_ordered); 577 ip = list_entry(sdp->sd_log_ordered.next, struct gfs2_inode, i_ordered);
578 list_del(&ip->i_ordered); 578 list_del(&ip->i_ordered);
579 WARN_ON(!test_and_clear_bit(GIF_ORDERED, &ip->i_flags)); 579 WARN_ON(!test_and_clear_bit(GIF_ORDERED, &ip->i_flags));
580 if (ip->i_inode.i_mapping->nrpages == 0) 580 if (ip->i_inode.i_mapping->nrpages == 0)
@@ -611,7 +611,7 @@ void gfs2_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd)
611 gfs2_glock_hold(gl); 611 gfs2_glock_hold(gl);
612 } 612 }
613 set_bit(GLF_LFLUSH, &gl->gl_flags); 613 set_bit(GLF_LFLUSH, &gl->gl_flags);
614 list_add(&bd->bd_list, &sdp->sd_log_le_revoke); 614 list_add(&bd->bd_list, &sdp->sd_log_revokes);
615} 615}
616 616
617void gfs2_write_revokes(struct gfs2_sbd *sdp) 617void gfs2_write_revokes(struct gfs2_sbd *sdp)
diff --git a/fs/gfs2/log.h b/fs/gfs2/log.h
index 86d07d436cdf..7a34a3234266 100644
--- a/fs/gfs2/log.h
+++ b/fs/gfs2/log.h
@@ -59,7 +59,7 @@ static inline void gfs2_ordered_add_inode(struct gfs2_inode *ip)
59 if (!test_bit(GIF_ORDERED, &ip->i_flags)) { 59 if (!test_bit(GIF_ORDERED, &ip->i_flags)) {
60 spin_lock(&sdp->sd_ordered_lock); 60 spin_lock(&sdp->sd_ordered_lock);
61 if (!test_and_set_bit(GIF_ORDERED, &ip->i_flags)) 61 if (!test_and_set_bit(GIF_ORDERED, &ip->i_flags))
62 list_add(&ip->i_ordered, &sdp->sd_log_le_ordered); 62 list_add(&ip->i_ordered, &sdp->sd_log_ordered);
63 spin_unlock(&sdp->sd_ordered_lock); 63 spin_unlock(&sdp->sd_ordered_lock);
64 } 64 }
65} 65}
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index 6c1ec6c60639..6af6a3cea967 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -623,7 +623,7 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp, struct gfs2_trans *tr)
623{ 623{
624 struct gfs2_meta_header *mh; 624 struct gfs2_meta_header *mh;
625 unsigned int offset; 625 unsigned int offset;
626 struct list_head *head = &sdp->sd_log_le_revoke; 626 struct list_head *head = &sdp->sd_log_revokes;
627 struct gfs2_bufdata *bd; 627 struct gfs2_bufdata *bd;
628 struct page *page; 628 struct page *page;
629 unsigned int length; 629 unsigned int length;
@@ -661,7 +661,7 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp, struct gfs2_trans *tr)
661 661
662static void revoke_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_trans *tr) 662static void revoke_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_trans *tr)
663{ 663{
664 struct list_head *head = &sdp->sd_log_le_revoke; 664 struct list_head *head = &sdp->sd_log_revokes;
665 struct gfs2_bufdata *bd, *tmp; 665 struct gfs2_bufdata *bd, *tmp;
666 666
667 /* 667 /*
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index b041cb8ae383..abfaecde0e3d 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -117,8 +117,8 @@ static struct gfs2_sbd *init_sbd(struct super_block *sb)
117 117
118 spin_lock_init(&sdp->sd_log_lock); 118 spin_lock_init(&sdp->sd_log_lock);
119 atomic_set(&sdp->sd_log_pinned, 0); 119 atomic_set(&sdp->sd_log_pinned, 0);
120 INIT_LIST_HEAD(&sdp->sd_log_le_revoke); 120 INIT_LIST_HEAD(&sdp->sd_log_revokes);
121 INIT_LIST_HEAD(&sdp->sd_log_le_ordered); 121 INIT_LIST_HEAD(&sdp->sd_log_ordered);
122 spin_lock_init(&sdp->sd_ordered_lock); 122 spin_lock_init(&sdp->sd_ordered_lock);
123 123
124 init_waitqueue_head(&sdp->sd_log_waitq); 124 init_waitqueue_head(&sdp->sd_log_waitq);
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
index cd9a94a6b5bb..5c4eae3b69fb 100644
--- a/fs/gfs2/trans.c
+++ b/fs/gfs2/trans.c
@@ -260,7 +260,7 @@ void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, u64 blkno, unsigned int len)
260 unsigned int n = len; 260 unsigned int n = len;
261 261
262 gfs2_log_lock(sdp); 262 gfs2_log_lock(sdp);
263 list_for_each_entry_safe(bd, tmp, &sdp->sd_log_le_revoke, bd_list) { 263 list_for_each_entry_safe(bd, tmp, &sdp->sd_log_revokes, bd_list) {
264 if ((bd->bd_blkno >= blkno) && (bd->bd_blkno < (blkno + len))) { 264 if ((bd->bd_blkno >= blkno) && (bd->bd_blkno < (blkno + len))) {
265 list_del_init(&bd->bd_list); 265 list_del_init(&bd->bd_list);
266 gfs2_assert_withdraw(sdp, sdp->sd_log_num_revoke); 266 gfs2_assert_withdraw(sdp, sdp->sd_log_num_revoke);