Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144068
b: refs/heads/master
c: 38d726d
h: refs/heads/master
v: v3
  • Loading branch information
Theodore Ts'o committed Apr 14, 2009
1 parent 3a49f43 commit 3ffb772
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 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: 67c457a8c378a006a34d92f9bd3078a80a92f250
refs/heads/master: 38d726d153cfe5efe5fe22d28d36ab382dda3a5c
2 changes: 1 addition & 1 deletion trunk/fs/jbd/commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ void journal_commit_transaction(journal_t *journal)
err = 0;
}

journal_write_revoke_records(journal, commit_transaction);
journal_write_revoke_records(journal, commit_transaction, write_op);

/*
* If we found any dirty or locked buffers, then we should have
Expand Down
20 changes: 11 additions & 9 deletions trunk/fs/jbd/revoke.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
#include <linux/slab.h>
#include <linux/list.h>
#include <linux/init.h>
#include <linux/bio.h>
#endif
#include <linux/log2.h>

Expand Down Expand Up @@ -99,8 +100,8 @@ struct jbd_revoke_table_s
#ifdef __KERNEL__
static void write_one_revoke_record(journal_t *, transaction_t *,
struct journal_head **, int *,
struct jbd_revoke_record_s *);
static void flush_descriptor(journal_t *, struct journal_head *, int);
struct jbd_revoke_record_s *, int);
static void flush_descriptor(journal_t *, struct journal_head *, int, int);
#endif

/* Utility functions to maintain the revoke table */
Expand Down Expand Up @@ -486,7 +487,7 @@ void journal_switch_revoke_table(journal_t *journal)
*/

void journal_write_revoke_records(journal_t *journal,
transaction_t *transaction)
transaction_t *transaction, int write_op)
{
struct journal_head *descriptor;
struct jbd_revoke_record_s *record;
Expand All @@ -510,14 +511,14 @@ void journal_write_revoke_records(journal_t *journal,
hash_list->next;
write_one_revoke_record(journal, transaction,
&descriptor, &offset,
record);
record, write_op);
count++;
list_del(&record->hash);
kmem_cache_free(revoke_record_cache, record);
}
}
if (descriptor)
flush_descriptor(journal, descriptor, offset);
flush_descriptor(journal, descriptor, offset, write_op);
jbd_debug(1, "Wrote %d revoke records\n", count);
}

Expand All @@ -530,7 +531,8 @@ static void write_one_revoke_record(journal_t *journal,
transaction_t *transaction,
struct journal_head **descriptorp,
int *offsetp,
struct jbd_revoke_record_s *record)
struct jbd_revoke_record_s *record,
int write_op)
{
struct journal_head *descriptor;
int offset;
Expand All @@ -549,7 +551,7 @@ static void write_one_revoke_record(journal_t *journal,
/* Make sure we have a descriptor with space left for the record */
if (descriptor) {
if (offset == journal->j_blocksize) {
flush_descriptor(journal, descriptor, offset);
flush_descriptor(journal, descriptor, offset, write_op);
descriptor = NULL;
}
}
Expand Down Expand Up @@ -586,7 +588,7 @@ static void write_one_revoke_record(journal_t *journal,

static void flush_descriptor(journal_t *journal,
struct journal_head *descriptor,
int offset)
int offset, int write_op)
{
journal_revoke_header_t *header;
struct buffer_head *bh = jh2bh(descriptor);
Expand All @@ -601,7 +603,7 @@ static void flush_descriptor(journal_t *journal,
set_buffer_jwrite(bh);
BUFFER_TRACE(bh, "write");
set_buffer_dirty(bh);
ll_rw_block(SWRITE, 1, &bh);
ll_rw_block((write_op == WRITE) ? SWRITE : SWRITE_SYNC_PLUG, 1, &bh);
}
#endif

Expand Down
3 changes: 2 additions & 1 deletion trunk/include/linux/jbd.h
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,8 @@ extern void journal_destroy_revoke(journal_t *);
extern int journal_revoke (handle_t *,
unsigned long, struct buffer_head *);
extern int journal_cancel_revoke(handle_t *, struct journal_head *);
extern void journal_write_revoke_records(journal_t *, transaction_t *);
extern void journal_write_revoke_records(journal_t *,
transaction_t *, int);

/* Recovery revoke support */
extern int journal_set_revoke(journal_t *, unsigned long, tid_t);
Expand Down

0 comments on commit 3ffb772

Please sign in to comment.