X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fjbd.h;h=fbc8eb90ea6fe93724fb469cf8b80445661c6330;hb=f1227cd3e0e73c48b93368800aa89f4341103a00;hp=593407e865b1b0ce543f3bee6059b71452b32ede;hpb=340e2b1a4c74f653454348914c408420d5d3c28a;p=linux-2.6.git diff --git a/include/linux/jbd.h b/include/linux/jbd.h index 593407e86..fbc8eb90e 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h @@ -562,7 +562,6 @@ struct transaction_s * @j_sb_buffer: First part of superblock buffer * @j_superblock: Second part of superblock buffer * @j_format_version: Version of the superblock format - * @j_state_lock: Protect the various scalars in the journal * @j_barrier_count: Number of processes waiting to create a barrier lock * @j_barrier: The barrier lock itself * @j_running_transaction: The current running transaction.. @@ -590,7 +589,6 @@ struct transaction_s * @j_fs_dev: Device which holds the client fs. For internal journal this will * be equal to j_dev * @j_maxlen: Total maximum capacity of the journal region on disk. - * @j_list_lock: Protects the buffer lists and internal buffer state. * @j_inode: Optional inode where we store the journal. If present, all journal * block numbers are mapped into this inode via bmap(). * @j_tail_sequence: Sequence number of the oldest transaction in the log @@ -606,11 +604,8 @@ struct transaction_s * @j_commit_interval: What is the maximum transaction lifetime before we begin * a commit? * @j_commit_timer: The timer used to wakeup the commit thread - * @j_revoke_lock: Protect the revoke table * @j_revoke: The revoke table - maintains the list of revoked blocks in the * current transaction. - * @j_revoke_table: alternate revoke tables for j_revoke - * @j_private: An opaque pointer to fs-private information. */ struct journal_s @@ -793,12 +788,6 @@ struct journal_s struct jbd_revoke_table_s *j_revoke; struct jbd_revoke_table_s *j_revoke_table[2]; - /* - * array of bhs for journal_commit_transaction - */ - struct buffer_head **j_wbuf; - int j_wbufsize; - /* * An opaque pointer to fs-private information. ext3 puts its * superblock pointer here @@ -822,7 +811,6 @@ struct journal_s */ /* Filing buffers */ -extern void __journal_temp_unlink_buffer(struct journal_head *jh); extern void journal_unfile_buffer(journal_t *, struct journal_head *); extern void __journal_unfile_buffer(struct journal_head *); extern void __journal_refile_buffer(struct journal_head *); @@ -879,12 +867,15 @@ static inline handle_t *journal_current_handle(void) extern handle_t *journal_start(journal_t *, int nblocks); extern int journal_restart (handle_t *, int nblocks); extern int journal_extend (handle_t *, int nblocks); -extern int journal_get_write_access(handle_t *, struct buffer_head *); +extern int journal_get_write_access(handle_t *, struct buffer_head *, + int *credits); extern int journal_get_create_access (handle_t *, struct buffer_head *); -extern int journal_get_undo_access(handle_t *, struct buffer_head *); +extern int journal_get_undo_access(handle_t *, struct buffer_head *, + int *credits); extern int journal_dirty_data (handle_t *, struct buffer_head *); extern int journal_dirty_metadata (handle_t *, struct buffer_head *); -extern void journal_release_buffer (handle_t *, struct buffer_head *); +extern void journal_release_buffer (handle_t *, struct buffer_head *, + int credits); extern int journal_forget (handle_t *, struct buffer_head *); extern void journal_sync_buffer (struct buffer_head *); extern int journal_invalidatepage(journal_t *, @@ -935,7 +926,7 @@ void journal_put_journal_head(struct journal_head *jh); */ extern kmem_cache_t *jbd_handle_cache; -static inline handle_t *jbd_alloc_handle(unsigned int __nocast gfp_flags) +static inline handle_t *jbd_alloc_handle(int gfp_flags) { return kmem_cache_alloc(jbd_handle_cache, gfp_flags); } @@ -1071,6 +1062,12 @@ extern int jbd_blocks_per_page(struct inode *inode); #ifdef __KERNEL__ +#ifdef CONFIG_SMP +#define assert_spin_locked(lock) J_ASSERT(spin_is_locked(lock)) +#else +#define assert_spin_locked(lock) do {} while(0) +#endif + #define buffer_trace_init(bh) do {} while (0) #define print_buffer_fields(bh) do {} while (0) #define print_buffer_trace(bh) do {} while (0)