Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43251
b: refs/heads/master
c: 5516762
h: refs/heads/master
i:
  43249: 5149381
  43247: 0e792f0
v: v3
  • Loading branch information
Al Viro authored and Steven Whitehouse committed Nov 30, 2006
1 parent 8e48e04 commit 4b939c2
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 22 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: e697264709c86040271cdd7abee781d7adbb7f91
refs/heads/master: 551676226163379c217e8ec54bd287eab9b8521e
2 changes: 1 addition & 1 deletion trunk/fs/gfs2/glops.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ static void trans_go_xmote_bh(struct gfs2_glock *gl)
struct gfs2_sbd *sdp = gl->gl_sbd;
struct gfs2_inode *ip = GFS2_I(sdp->sd_jdesc->jd_inode);
struct gfs2_glock *j_gl = ip->i_gl;
struct gfs2_log_header head;
struct gfs2_log_header_host head;
int error;

if (gl->gl_state != LM_ST_UNLOCKED &&
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/gfs2/incore.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct gfs2_log_operations {
void (*lo_before_commit) (struct gfs2_sbd *sdp);
void (*lo_after_commit) (struct gfs2_sbd *sdp, struct gfs2_ail *ai);
void (*lo_before_scan) (struct gfs2_jdesc *jd,
struct gfs2_log_header *head, int pass);
struct gfs2_log_header_host *head, int pass);
int (*lo_scan_elements) (struct gfs2_jdesc *jd, unsigned int start,
struct gfs2_log_descriptor *ld, __be64 *ptr,
int pass);
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/gfs2/lops.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ static void buf_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_ail *ai)
}

static void buf_lo_before_scan(struct gfs2_jdesc *jd,
struct gfs2_log_header *head, int pass)
struct gfs2_log_header_host *head, int pass)
{
struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);

Expand Down Expand Up @@ -328,7 +328,7 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp)
}

static void revoke_lo_before_scan(struct gfs2_jdesc *jd,
struct gfs2_log_header *head, int pass)
struct gfs2_log_header_host *head, int pass)
{
struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);

Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/gfs2/lops.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static inline void lops_after_commit(struct gfs2_sbd *sdp, struct gfs2_ail *ai)
}

static inline void lops_before_scan(struct gfs2_jdesc *jd,
struct gfs2_log_header *head,
struct gfs2_log_header_host *head,
unsigned int pass)
{
int x;
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/gfs2/ondisk.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ void gfs2_dinode_print(const struct gfs2_dinode_host *di)
printk(KERN_INFO " di_eattr = %llu\n", (unsigned long long)di->di_eattr);
}

void gfs2_log_header_in(struct gfs2_log_header *lh, const void *buf)
void gfs2_log_header_in(struct gfs2_log_header_host *lh, const void *buf)
{
const struct gfs2_log_header *str = buf;

Expand Down
22 changes: 11 additions & 11 deletions trunk/fs/gfs2/recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,18 @@ void gfs2_revoke_clean(struct gfs2_sbd *sdp)
*/

static int get_log_header(struct gfs2_jdesc *jd, unsigned int blk,
struct gfs2_log_header *head)
struct gfs2_log_header_host *head)
{
struct buffer_head *bh;
struct gfs2_log_header lh;
struct gfs2_log_header_host lh;
u32 hash;
int error;

error = gfs2_replay_read_block(jd, blk, &bh);
if (error)
return error;

memcpy(&lh, bh->b_data, sizeof(struct gfs2_log_header));
memcpy(&lh, bh->b_data, sizeof(struct gfs2_log_header)); /* XXX */
lh.lh_hash = 0;
hash = gfs2_disk_hash((char *)&lh, sizeof(struct gfs2_log_header));
gfs2_log_header_in(&lh, bh->b_data);
Expand Down Expand Up @@ -174,7 +174,7 @@ static int get_log_header(struct gfs2_jdesc *jd, unsigned int blk,
*/

static int find_good_lh(struct gfs2_jdesc *jd, unsigned int *blk,
struct gfs2_log_header *head)
struct gfs2_log_header_host *head)
{
unsigned int orig_blk = *blk;
int error;
Expand Down Expand Up @@ -205,10 +205,10 @@ static int find_good_lh(struct gfs2_jdesc *jd, unsigned int *blk,
* Returns: errno
*/

static int jhead_scan(struct gfs2_jdesc *jd, struct gfs2_log_header *head)
static int jhead_scan(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head)
{
unsigned int blk = head->lh_blkno;
struct gfs2_log_header lh;
struct gfs2_log_header_host lh;
int error;

for (;;) {
Expand Down Expand Up @@ -245,9 +245,9 @@ static int jhead_scan(struct gfs2_jdesc *jd, struct gfs2_log_header *head)
* Returns: errno
*/

int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header *head)
int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head)
{
struct gfs2_log_header lh_1, lh_m;
struct gfs2_log_header_host lh_1, lh_m;
u32 blk_1, blk_2, blk_m;
int error;

Expand Down Expand Up @@ -320,7 +320,7 @@ static int foreach_descriptor(struct gfs2_jdesc *jd, unsigned int start,
length = be32_to_cpu(ld->ld_length);

if (be32_to_cpu(ld->ld_header.mh_type) == GFS2_METATYPE_LH) {
struct gfs2_log_header lh;
struct gfs2_log_header_host lh;
error = get_log_header(jd, start, &lh);
if (!error) {
gfs2_replay_incr_blk(sdp, &start);
Expand Down Expand Up @@ -363,7 +363,7 @@ static int foreach_descriptor(struct gfs2_jdesc *jd, unsigned int start,
* Returns: errno
*/

static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header *head)
static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head)
{
struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
Expand Down Expand Up @@ -425,7 +425,7 @@ int gfs2_recover_journal(struct gfs2_jdesc *jd)
{
struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
struct gfs2_log_header head;
struct gfs2_log_header_host head;
struct gfs2_holder j_gh, ji_gh, t_gh;
unsigned long t;
int ro = 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/gfs2/recovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int gfs2_revoke_check(struct gfs2_sbd *sdp, u64 blkno, unsigned int where);
void gfs2_revoke_clean(struct gfs2_sbd *sdp);

int gfs2_find_jhead(struct gfs2_jdesc *jd,
struct gfs2_log_header *head);
struct gfs2_log_header_host *head);
int gfs2_recover_journal(struct gfs2_jdesc *gfs2_jd);
void gfs2_check_journals(struct gfs2_sbd *sdp);

Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/gfs2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ int gfs2_make_fs_rw(struct gfs2_sbd *sdp)
struct gfs2_inode *ip = GFS2_I(sdp->sd_jdesc->jd_inode);
struct gfs2_glock *j_gl = ip->i_gl;
struct gfs2_holder t_gh;
struct gfs2_log_header head;
struct gfs2_log_header_host head;
int error;

error = gfs2_glock_nq_init(sdp->sd_trans_gl, LM_ST_SHARED,
Expand Down Expand Up @@ -873,7 +873,7 @@ static int gfs2_lock_fs_check_clean(struct gfs2_sbd *sdp,
struct gfs2_jdesc *jd;
struct lfcc *lfcc;
LIST_HEAD(list);
struct gfs2_log_header lh;
struct gfs2_log_header_host lh;
int error;

error = gfs2_jindex_hold(sdp, &ji_gh);
Expand Down
12 changes: 11 additions & 1 deletion trunk/include/linux/gfs2_ondisk.h
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,16 @@ struct gfs2_log_header {
__be32 lh_hash;
};

struct gfs2_log_header_host {
struct gfs2_meta_header lh_header;

__u64 lh_sequence; /* Sequence number of this transaction */
__u32 lh_flags; /* GFS2_LOG_HEAD_... */
__u32 lh_tail; /* Block number of log tail */
__u32 lh_blkno;
__u32 lh_hash;
};

/*
* Log type descriptor
*/
Expand Down Expand Up @@ -492,7 +502,7 @@ extern void gfs2_dinode_in(struct gfs2_dinode_host *di, const void *buf);
extern void gfs2_dinode_out(const struct gfs2_dinode_host *di, void *buf);
extern void gfs2_ea_header_in(struct gfs2_ea_header *ea, const void *buf);
extern void gfs2_ea_header_out(const struct gfs2_ea_header *ea, void *buf);
extern void gfs2_log_header_in(struct gfs2_log_header *lh, const void *buf);
extern void gfs2_log_header_in(struct gfs2_log_header_host *lh, const void *buf);
extern void gfs2_inum_range_in(struct gfs2_inum_range_host *ir, const void *buf);
extern void gfs2_inum_range_out(const struct gfs2_inum_range_host *ir, void *buf);
extern void gfs2_statfs_change_in(struct gfs2_statfs_change *sc, const void *buf);
Expand Down

0 comments on commit 4b939c2

Please sign in to comment.