Redo the (strange) layout of some of Roger's comments. jbd/recovery.c | 16 ++++++---------- jbd/transaction.c | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 22 deletions(-) diff -puN fs/jbd/transaction.c~ext3-comment-cleanup fs/jbd/transaction.c --- 25/fs/jbd/transaction.c~ext3-comment-cleanup 2003-02-09 02:37:36.000000000 -0800 +++ 25-akpm/fs/jbd/transaction.c 2003-02-09 02:38:43.000000000 -0800 @@ -862,22 +862,23 @@ out: } /** - * int journal_dirty_data() - mark a buffer as containing dirty data which needs to be flushed before we can commit the current transaction. + * int journal_dirty_data() - mark a buffer as containing dirty data which + * needs to be flushed before we can commit the + * current transaction. * @handle: transaction * @bh: bufferhead to mark * * The buffer is placed on the transaction's data list and is marked as * belonging to the transaction. * - * Returns error number or 0 on success. - */ -int journal_dirty_data (handle_t *handle, struct buffer_head *bh) -{ -/* + * Returns error number or 0 on success. + * * journal_dirty_data() can be called via page_launder->ext3_writepage * by kswapd. So it cannot block. Happily, there's nothing here * which needs lock_journal if `async' is set. */ +int journal_dirty_data (handle_t *handle, struct buffer_head *bh) +{ journal_t *journal = handle->h_transaction->t_journal; int need_brelse = 0; struct journal_head *jh; @@ -1022,23 +1023,22 @@ no_journal: * @handle: transaction to add buffer to. * @bh: buffer to mark * - * mark dirty metadata which needs to be journaled as part of the current transaction. + * mark dirty metadata which needs to be journaled as part of the current + * transaction. * * The buffer is placed on the transaction's metadata list and is marked * as belonging to the transaction. * * Returns error number or 0 on success. - */ -int journal_dirty_metadata (handle_t *handle, struct buffer_head *bh) -{ -/* + * * Special care needs to be taken if the buffer already belongs to the * current committing transaction (in which case we should have frozen * data present for that commit). In that case, we don't relink the * buffer: that only gets done when the old transaction finally * completes its commit. - * */ +int journal_dirty_metadata (handle_t *handle, struct buffer_head *bh) +{ transaction_t *transaction = handle->h_transaction; journal_t *journal = transaction->t_journal; struct journal_head *jh = bh2jh(bh); diff -puN fs/jbd/recovery.c~ext3-comment-cleanup fs/jbd/recovery.c --- 25/fs/jbd/recovery.c~ext3-comment-cleanup 2003-02-09 02:39:05.000000000 -0800 +++ 25-akpm/fs/jbd/recovery.c 2003-02-09 02:39:32.000000000 -0800 @@ -212,16 +212,14 @@ do { \ * * The primary function for recovering the log contents when mounting a * journaled device. - */ -int journal_recover(journal_t *journal) -{ -/* + * * Recovery is done in three passes. In the first pass, we look for the * end of the log. In the second, we assemble the list of revoke * blocks. In the third and final pass, we replay any un-revoked blocks * in the log. */ - +int journal_recover(journal_t *journal) +{ int err; journal_superblock_t * sb; @@ -273,15 +271,13 @@ int journal_recover(journal_t *journal) * journal structures in memory to ignore it (presumably because the * caller has evidence that it is out of date). * This function does'nt appear to be exorted.. - */ -int journal_skip_recovery(journal_t *journal) -{ -/* + * * We perform one pass over the journal to allow us to tell the user how * much recovery information is being erased, and to let us initialise * the journal transaction sequence numbers to the next unused ID. */ - +int journal_skip_recovery(journal_t *journal) +{ int err; journal_superblock_t * sb; _