diff options
| author | David S. Miller <davem@davemloft.net> | 2009-05-18 21:08:20 -0700 | 
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2009-05-18 21:08:20 -0700 | 
| commit | bb803cfbecb03a0cf8dc7e1864f18dda6631af00 (patch) | |
| tree | 6c0989693bea6f50cfa5c6bb14f52ec19668def3 /fs/jbd2/revoke.c | |
| parent | 3878fb6fdbceecca20b15748f807340854220f06 (diff) | |
| parent | 511e11e396dc596825ce04d53d7f6d579404bc01 (diff) | |
| download | olio-linux-3.10-bb803cfbecb03a0cf8dc7e1864f18dda6631af00.tar.xz olio-linux-3.10-bb803cfbecb03a0cf8dc7e1864f18dda6631af00.zip  | |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/scsi/fcoe/fcoe.c
Diffstat (limited to 'fs/jbd2/revoke.c')
| -rw-r--r-- | fs/jbd2/revoke.c | 21 | 
1 files changed, 12 insertions, 9 deletions
diff --git a/fs/jbd2/revoke.c b/fs/jbd2/revoke.c index bbe6d592d8b..a360b06af2e 100644 --- a/fs/jbd2/revoke.c +++ b/fs/jbd2/revoke.c @@ -86,6 +86,7 @@  #include <linux/slab.h>  #include <linux/list.h>  #include <linux/init.h> +#include <linux/bio.h>  #endif  #include <linux/log2.h> @@ -118,8 +119,8 @@ struct jbd2_revoke_table_s  #ifdef __KERNEL__  static void write_one_revoke_record(journal_t *, transaction_t *,  				    struct journal_head **, int *, -				    struct jbd2_revoke_record_s *); -static void flush_descriptor(journal_t *, struct journal_head *, int); +				    struct jbd2_revoke_record_s *, int); +static void flush_descriptor(journal_t *, struct journal_head *, int, int);  #endif  /* Utility functions to maintain the revoke table */ @@ -499,7 +500,8 @@ void jbd2_journal_switch_revoke_table(journal_t *journal)   * revoke hash, deleting the entries as we go.   */  void jbd2_journal_write_revoke_records(journal_t *journal, -				  transaction_t *transaction) +				       transaction_t *transaction, +				       int write_op)  {  	struct journal_head *descriptor;  	struct jbd2_revoke_record_s *record; @@ -523,14 +525,14 @@ void jbd2_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(jbd2_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);  } @@ -543,7 +545,8 @@ static void write_one_revoke_record(journal_t *journal,  				    transaction_t *transaction,  				    struct journal_head **descriptorp,  				    int *offsetp, -				    struct jbd2_revoke_record_s *record) +				    struct jbd2_revoke_record_s *record, +				    int write_op)  {  	struct journal_head *descriptor;  	int offset; @@ -562,7 +565,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;  		}  	} @@ -607,7 +610,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)  {  	jbd2_journal_revoke_header_t *header;  	struct buffer_head *bh = jh2bh(descriptor); @@ -622,7 +625,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  |