mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
32ac43f6a4
commit
a5b1d3fc50
|
@ -809,8 +809,8 @@ struct gfs2_sbd {
|
|||
atomic_t sd_log_pinned;
|
||||
unsigned int sd_log_num_revoke;
|
||||
|
||||
struct list_head sd_log_le_revoke;
|
||||
struct list_head sd_log_le_ordered;
|
||||
struct list_head sd_log_revokes;
|
||||
struct list_head sd_log_ordered;
|
||||
spinlock_t sd_ordered_lock;
|
||||
|
||||
atomic_t sd_log_thresh1;
|
||||
|
|
|
@ -551,9 +551,9 @@ static void gfs2_ordered_write(struct gfs2_sbd *sdp)
|
|||
LIST_HEAD(written);
|
||||
|
||||
spin_lock(&sdp->sd_ordered_lock);
|
||||
list_sort(NULL, &sdp->sd_log_le_ordered, &ip_cmp);
|
||||
while (!list_empty(&sdp->sd_log_le_ordered)) {
|
||||
ip = list_entry(sdp->sd_log_le_ordered.next, struct gfs2_inode, i_ordered);
|
||||
list_sort(NULL, &sdp->sd_log_ordered, &ip_cmp);
|
||||
while (!list_empty(&sdp->sd_log_ordered)) {
|
||||
ip = list_entry(sdp->sd_log_ordered.next, struct gfs2_inode, i_ordered);
|
||||
if (ip->i_inode.i_mapping->nrpages == 0) {
|
||||
test_and_clear_bit(GIF_ORDERED, &ip->i_flags);
|
||||
list_del(&ip->i_ordered);
|
||||
|
@ -564,7 +564,7 @@ static void gfs2_ordered_write(struct gfs2_sbd *sdp)
|
|||
filemap_fdatawrite(ip->i_inode.i_mapping);
|
||||
spin_lock(&sdp->sd_ordered_lock);
|
||||
}
|
||||
list_splice(&written, &sdp->sd_log_le_ordered);
|
||||
list_splice(&written, &sdp->sd_log_ordered);
|
||||
spin_unlock(&sdp->sd_ordered_lock);
|
||||
}
|
||||
|
||||
|
@ -573,8 +573,8 @@ static void gfs2_ordered_wait(struct gfs2_sbd *sdp)
|
|||
struct gfs2_inode *ip;
|
||||
|
||||
spin_lock(&sdp->sd_ordered_lock);
|
||||
while (!list_empty(&sdp->sd_log_le_ordered)) {
|
||||
ip = list_entry(sdp->sd_log_le_ordered.next, struct gfs2_inode, i_ordered);
|
||||
while (!list_empty(&sdp->sd_log_ordered)) {
|
||||
ip = list_entry(sdp->sd_log_ordered.next, struct gfs2_inode, i_ordered);
|
||||
list_del(&ip->i_ordered);
|
||||
WARN_ON(!test_and_clear_bit(GIF_ORDERED, &ip->i_flags));
|
||||
if (ip->i_inode.i_mapping->nrpages == 0)
|
||||
|
@ -611,7 +611,7 @@ void gfs2_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd)
|
|||
gfs2_glock_hold(gl);
|
||||
}
|
||||
set_bit(GLF_LFLUSH, &gl->gl_flags);
|
||||
list_add(&bd->bd_list, &sdp->sd_log_le_revoke);
|
||||
list_add(&bd->bd_list, &sdp->sd_log_revokes);
|
||||
}
|
||||
|
||||
void gfs2_write_revokes(struct gfs2_sbd *sdp)
|
||||
|
|
|
@ -59,7 +59,7 @@ static inline void gfs2_ordered_add_inode(struct gfs2_inode *ip)
|
|||
if (!test_bit(GIF_ORDERED, &ip->i_flags)) {
|
||||
spin_lock(&sdp->sd_ordered_lock);
|
||||
if (!test_and_set_bit(GIF_ORDERED, &ip->i_flags))
|
||||
list_add(&ip->i_ordered, &sdp->sd_log_le_ordered);
|
||||
list_add(&ip->i_ordered, &sdp->sd_log_ordered);
|
||||
spin_unlock(&sdp->sd_ordered_lock);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -623,7 +623,7 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp, struct gfs2_trans *tr)
|
|||
{
|
||||
struct gfs2_meta_header *mh;
|
||||
unsigned int offset;
|
||||
struct list_head *head = &sdp->sd_log_le_revoke;
|
||||
struct list_head *head = &sdp->sd_log_revokes;
|
||||
struct gfs2_bufdata *bd;
|
||||
struct page *page;
|
||||
unsigned int length;
|
||||
|
@ -661,7 +661,7 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp, struct gfs2_trans *tr)
|
|||
|
||||
static void revoke_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_trans *tr)
|
||||
{
|
||||
struct list_head *head = &sdp->sd_log_le_revoke;
|
||||
struct list_head *head = &sdp->sd_log_revokes;
|
||||
struct gfs2_bufdata *bd, *tmp;
|
||||
|
||||
/*
|
||||
|
|
|
@ -117,8 +117,8 @@ static struct gfs2_sbd *init_sbd(struct super_block *sb)
|
|||
|
||||
spin_lock_init(&sdp->sd_log_lock);
|
||||
atomic_set(&sdp->sd_log_pinned, 0);
|
||||
INIT_LIST_HEAD(&sdp->sd_log_le_revoke);
|
||||
INIT_LIST_HEAD(&sdp->sd_log_le_ordered);
|
||||
INIT_LIST_HEAD(&sdp->sd_log_revokes);
|
||||
INIT_LIST_HEAD(&sdp->sd_log_ordered);
|
||||
spin_lock_init(&sdp->sd_ordered_lock);
|
||||
|
||||
init_waitqueue_head(&sdp->sd_log_waitq);
|
||||
|
|
|
@ -260,7 +260,7 @@ void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, u64 blkno, unsigned int len)
|
|||
unsigned int n = len;
|
||||
|
||||
gfs2_log_lock(sdp);
|
||||
list_for_each_entry_safe(bd, tmp, &sdp->sd_log_le_revoke, bd_list) {
|
||||
list_for_each_entry_safe(bd, tmp, &sdp->sd_log_revokes, bd_list) {
|
||||
if ((bd->bd_blkno >= blkno) && (bd->bd_blkno < (blkno + len))) {
|
||||
list_del_init(&bd->bd_list);
|
||||
gfs2_assert_withdraw(sdp, sdp->sd_log_num_revoke);
|
||||
|
|
Loading…
Reference in New Issue