Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89506
b: refs/heads/master
c: cf45b75
h: refs/heads/master
v: v3
  • Loading branch information
Bob Peterson authored and Steven Whitehouse committed Mar 31, 2008
1 parent 4e44cd6 commit 850fc15
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da755fdb414470d6dce3df12ad188de9131cf96c
refs/heads/master: cf45b752c9f23939e40d823b0600bf876e97b0e0
3 changes: 1 addition & 2 deletions trunk/fs/gfs2/glock.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
* Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
* Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
*
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
Expand Down Expand Up @@ -348,7 +348,6 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number,
gl->gl_ip = 0;
gl->gl_ops = glops;
gl->gl_req_gh = NULL;
gl->gl_vn = 0;
gl->gl_stamp = jiffies;
gl->gl_tchange = jiffies;
gl->gl_object = NULL;
Expand Down
10 changes: 8 additions & 2 deletions trunk/fs/gfs2/glops.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
* Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved.
* Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
*
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
Expand Down Expand Up @@ -126,7 +126,13 @@ static void meta_go_inval(struct gfs2_glock *gl, int flags)
return;

gfs2_meta_inval(gl);
gl->gl_vn++;
if (gl->gl_object == GFS2_I(gl->gl_sbd->sd_rindex))
gl->gl_sbd->sd_rindex_uptodate = 0;
else if (gl->gl_ops == &gfs2_rgrp_glops && gl->gl_object) {
struct gfs2_rgrpd *rgd = (struct gfs2_rgrpd *)gl->gl_object;

rgd->rd_flags &= ~GFS2_RDF_UPTODATE;
}
}

/**
Expand Down
5 changes: 2 additions & 3 deletions trunk/fs/gfs2/incore.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ struct gfs2_rgrpd {
u32 rd_data; /* num of data blocks in rgrp */
u32 rd_bitbytes; /* number of bytes in data bitmaps */
struct gfs2_rgrp_host rd_rg;
u64 rd_rg_vn;
struct gfs2_bitmap *rd_bits;
unsigned int rd_bh_count;
struct mutex rd_mutex;
Expand All @@ -97,6 +96,7 @@ struct gfs2_rgrpd {
unsigned char rd_flags;
#define GFS2_RDF_CHECK 0x01 /* Need to check for unlinked inodes */
#define GFS2_RDF_NOALLOC 0x02 /* rg prohibits allocation */
#define GFS2_RDF_UPTODATE 0x04 /* rg is up to date */
};

enum gfs2_state_bits {
Expand Down Expand Up @@ -196,7 +196,6 @@ struct gfs2_glock {
char *gl_lvb;
atomic_t gl_lvb_count;

u64 gl_vn;
unsigned long gl_stamp;
unsigned long gl_tchange;
void *gl_object;
Expand Down Expand Up @@ -533,7 +532,7 @@ struct gfs2_sbd {

/* Resource group stuff */

u64 sd_rindex_vn;
int sd_rindex_uptodate;
spinlock_t sd_rindex_spin;
struct mutex sd_rindex_mutex;
struct list_head sd_rindex_list;
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/gfs2/ops_fstype.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
* Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
* Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
*
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
Expand Down Expand Up @@ -548,7 +548,7 @@ static int init_inodes(struct gfs2_sbd *sdp, int undo)
}
ip = GFS2_I(sdp->sd_rindex);
set_bit(GLF_STICKY, &ip->i_gl->gl_flags);
sdp->sd_rindex_vn = ip->i_gl->gl_vn - 1;
sdp->sd_rindex_uptodate = 0;

/* Read in the quota inode */
sdp->sd_quota_inode = gfs2_lookup_simple(sdp->sd_master_dir, "quota");
Expand Down
14 changes: 7 additions & 7 deletions trunk/fs/gfs2/rgrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ static int read_rindex_entry(struct gfs2_inode *ip,
return error;

rgd->rd_gl->gl_object = rgd;
rgd->rd_rg_vn = rgd->rd_gl->gl_vn - 1;
rgd->rd_flags &= ~GFS2_RDF_UPTODATE;
rgd->rd_flags |= GFS2_RDF_CHECK;
return error;
}
Expand Down Expand Up @@ -576,7 +576,7 @@ static int gfs2_ri_update(struct gfs2_inode *ip)
}
}

sdp->sd_rindex_vn = ip->i_gl->gl_vn;
sdp->sd_rindex_uptodate = 1;
return 0;
}

Expand Down Expand Up @@ -610,7 +610,7 @@ static int gfs2_ri_update_special(struct gfs2_inode *ip)
}
}

sdp->sd_rindex_vn = ip->i_gl->gl_vn;
sdp->sd_rindex_uptodate = 1;
return 0;
}

Expand Down Expand Up @@ -643,9 +643,9 @@ int gfs2_rindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ri_gh)
return error;

/* Read new copy from disk if we don't have the latest */
if (sdp->sd_rindex_vn != gl->gl_vn) {
if (!sdp->sd_rindex_uptodate) {
mutex_lock(&sdp->sd_rindex_mutex);
if (sdp->sd_rindex_vn != gl->gl_vn) {
if (!sdp->sd_rindex_uptodate) {
error = gfs2_ri_update(ip);
if (error)
gfs2_glock_dq_uninit(ri_gh);
Expand Down Expand Up @@ -737,9 +737,9 @@ int gfs2_rgrp_bh_get(struct gfs2_rgrpd *rgd)
}
}

if (rgd->rd_rg_vn != gl->gl_vn) {
if (!(rgd->rd_flags & GFS2_RDF_UPTODATE)) {
gfs2_rgrp_in(rgd, (rgd->rd_bits[0].bi_bh)->b_data);
rgd->rd_rg_vn = gl->gl_vn;
rgd->rd_flags |= GFS2_RDF_UPTODATE;
}

spin_lock(&sdp->sd_rindex_spin);
Expand Down

0 comments on commit 850fc15

Please sign in to comment.