diff options
| author | James Simmons <jsimmons@maxwell.earthlink.net> | 2002-07-05 19:55:58 -0700 |
|---|---|---|
| committer | James Simmons <jsimmons@maxwell.earthlink.net> | 2002-07-05 19:55:58 -0700 |
| commit | a9c5e233ae82ca768cb495aa0dedc496c8f660b7 (patch) | |
| tree | b2af1b90962932700e84bb6657a1cb6aeae79ccc /include/linux/jbd.h | |
| parent | fbb30912709d8cc3061abb38fe15ff14c8cd7c41 (diff) | |
| parent | 7970f12d1e175e93a23416a55b87f28356d91188 (diff) | |
Merge http://linus.bkbits.net/linux-2.5
into maxwell.earthlink.net:/tmp/linus-2.5
Diffstat (limited to 'include/linux/jbd.h')
| -rw-r--r-- | include/linux/jbd.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index 683c1247fd70..fafb868eec11 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h @@ -250,6 +250,13 @@ static inline struct journal_head *bh2jh(struct buffer_head *bh) return bh->b_private; } +#define HAVE_JOURNAL_CALLBACK_STATUS +struct journal_callback { + struct list_head jcb_list; + void (*jcb_func)(struct journal_callback *jcb, int error); + /* user data goes here */ +}; + struct jbd_revoke_table_s; /* The handle_t type represents a single atomic update being performed @@ -280,6 +287,12 @@ struct handle_s operations */ int h_err; + /* List of application registered callbacks for this handle. + * The function(s) will be called after the transaction that + * this handle is part of has been committed to disk. + */ + struct list_head h_jcb; + /* Flags */ unsigned int h_sync: 1; /* sync-on-close */ unsigned int h_jdata: 1; /* force data journaling */ @@ -399,6 +412,10 @@ struct transaction_s /* How many handles used this transaction? */ int t_handle_count; + + /* List of registered callback functions for this transaction. + * Called when the transaction is committed. */ + struct list_head t_jcb; }; @@ -647,6 +664,9 @@ extern int journal_invalidatepage(journal_t *, extern int journal_try_to_free_buffers(journal_t *, struct page *, int); extern int journal_stop(handle_t *); extern int journal_flush (journal_t *); +extern void journal_callback_set(handle_t *handle, + void (*fn)(struct journal_callback *,int), + struct journal_callback *jcb); extern void journal_lock_updates (journal_t *); extern void journal_unlock_updates (journal_t *); |
