diff options
Diffstat (limited to 'fs/jbd/checkpoint.c')
-rw-r--r-- | fs/jbd/checkpoint.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/fs/jbd/checkpoint.c b/fs/jbd/checkpoint.c index d0685596e5a6..961ada28db5e 100644 --- a/fs/jbd/checkpoint.c +++ b/fs/jbd/checkpoint.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * linux/fs/checkpoint.c | 2 | * linux/fs/checkpoint.c |
3 | * | 3 | * |
4 | * Written by Stephen C. Tweedie <sct@redhat.com>, 1999 | 4 | * Written by Stephen C. Tweedie <sct@redhat.com>, 1999 |
5 | * | 5 | * |
6 | * Copyright 1999 Red Hat Software --- All Rights Reserved | 6 | * Copyright 1999 Red Hat Software --- All Rights Reserved |
@@ -9,8 +9,8 @@ | |||
9 | * the terms of the GNU General Public License, version 2, or at your | 9 | * the terms of the GNU General Public License, version 2, or at your |
10 | * option, any later version, incorporated herein by reference. | 10 | * option, any later version, incorporated herein by reference. |
11 | * | 11 | * |
12 | * Checkpoint routines for the generic filesystem journaling code. | 12 | * Checkpoint routines for the generic filesystem journaling code. |
13 | * Part of the ext2fs journaling system. | 13 | * Part of the ext2fs journaling system. |
14 | * | 14 | * |
15 | * Checkpointing is the process of ensuring that a section of the log is | 15 | * Checkpointing is the process of ensuring that a section of the log is |
16 | * committed fully to disk, so that that portion of the log can be | 16 | * committed fully to disk, so that that portion of the log can be |
@@ -226,7 +226,7 @@ __flush_batch(journal_t *journal, struct buffer_head **bhs, int *batch_count) | |||
226 | * Try to flush one buffer from the checkpoint list to disk. | 226 | * Try to flush one buffer from the checkpoint list to disk. |
227 | * | 227 | * |
228 | * Return 1 if something happened which requires us to abort the current | 228 | * Return 1 if something happened which requires us to abort the current |
229 | * scan of the checkpoint list. | 229 | * scan of the checkpoint list. |
230 | * | 230 | * |
231 | * Called with j_list_lock held and drops it if 1 is returned | 231 | * Called with j_list_lock held and drops it if 1 is returned |
232 | * Called under jbd_lock_bh_state(jh2bh(jh)), and drops it | 232 | * Called under jbd_lock_bh_state(jh2bh(jh)), and drops it |
@@ -270,7 +270,7 @@ static int __process_buffer(journal_t *journal, struct journal_head *jh, | |||
270 | * possibly block, while still holding the journal lock. | 270 | * possibly block, while still holding the journal lock. |
271 | * We cannot afford to let the transaction logic start | 271 | * We cannot afford to let the transaction logic start |
272 | * messing around with this buffer before we write it to | 272 | * messing around with this buffer before we write it to |
273 | * disk, as that would break recoverability. | 273 | * disk, as that would break recoverability. |
274 | */ | 274 | */ |
275 | BUFFER_TRACE(bh, "queue"); | 275 | BUFFER_TRACE(bh, "queue"); |
276 | get_bh(bh); | 276 | get_bh(bh); |
@@ -293,7 +293,7 @@ static int __process_buffer(journal_t *journal, struct journal_head *jh, | |||
293 | * Perform an actual checkpoint. We take the first transaction on the | 293 | * Perform an actual checkpoint. We take the first transaction on the |
294 | * list of transactions to be checkpointed and send all its buffers | 294 | * list of transactions to be checkpointed and send all its buffers |
295 | * to disk. We submit larger chunks of data at once. | 295 | * to disk. We submit larger chunks of data at once. |
296 | * | 296 | * |
297 | * The journal should be locked before calling this function. | 297 | * The journal should be locked before calling this function. |
298 | */ | 298 | */ |
299 | int log_do_checkpoint(journal_t *journal) | 299 | int log_do_checkpoint(journal_t *journal) |
@@ -304,10 +304,10 @@ int log_do_checkpoint(journal_t *journal) | |||
304 | 304 | ||
305 | jbd_debug(1, "Start checkpoint\n"); | 305 | jbd_debug(1, "Start checkpoint\n"); |
306 | 306 | ||
307 | /* | 307 | /* |
308 | * First thing: if there are any transactions in the log which | 308 | * First thing: if there are any transactions in the log which |
309 | * don't need checkpointing, just eliminate them from the | 309 | * don't need checkpointing, just eliminate them from the |
310 | * journal straight away. | 310 | * journal straight away. |
311 | */ | 311 | */ |
312 | result = cleanup_journal_tail(journal); | 312 | result = cleanup_journal_tail(journal); |
313 | jbd_debug(1, "cleanup_journal_tail returned %d\n", result); | 313 | jbd_debug(1, "cleanup_journal_tail returned %d\n", result); |
@@ -385,9 +385,9 @@ out: | |||
385 | * we have already got rid of any since the last update of the log tail | 385 | * we have already got rid of any since the last update of the log tail |
386 | * in the journal superblock. If so, we can instantly roll the | 386 | * in the journal superblock. If so, we can instantly roll the |
387 | * superblock forward to remove those transactions from the log. | 387 | * superblock forward to remove those transactions from the log. |
388 | * | 388 | * |
389 | * Return <0 on error, 0 on success, 1 if there was nothing to clean up. | 389 | * Return <0 on error, 0 on success, 1 if there was nothing to clean up. |
390 | * | 390 | * |
391 | * Called with the journal lock held. | 391 | * Called with the journal lock held. |
392 | * | 392 | * |
393 | * This is the only part of the journaling code which really needs to be | 393 | * This is the only part of the journaling code which really needs to be |
@@ -404,8 +404,8 @@ int cleanup_journal_tail(journal_t *journal) | |||
404 | unsigned long blocknr, freed; | 404 | unsigned long blocknr, freed; |
405 | 405 | ||
406 | /* OK, work out the oldest transaction remaining in the log, and | 406 | /* OK, work out the oldest transaction remaining in the log, and |
407 | * the log block it starts at. | 407 | * the log block it starts at. |
408 | * | 408 | * |
409 | * If the log is now empty, we need to work out which is the | 409 | * If the log is now empty, we need to work out which is the |
410 | * next transaction ID we will write, and where it will | 410 | * next transaction ID we will write, and where it will |
411 | * start. */ | 411 | * start. */ |
@@ -558,7 +558,7 @@ out: | |||
558 | return ret; | 558 | return ret; |
559 | } | 559 | } |
560 | 560 | ||
561 | /* | 561 | /* |
562 | * journal_remove_checkpoint: called after a buffer has been committed | 562 | * journal_remove_checkpoint: called after a buffer has been committed |
563 | * to disk (either by being write-back flushed to disk, or being | 563 | * to disk (either by being write-back flushed to disk, or being |
564 | * committed to the log). | 564 | * committed to the log). |
@@ -636,7 +636,7 @@ out: | |||
636 | * Called with the journal locked. | 636 | * Called with the journal locked. |
637 | * Called with j_list_lock held. | 637 | * Called with j_list_lock held. |
638 | */ | 638 | */ |
639 | void __journal_insert_checkpoint(struct journal_head *jh, | 639 | void __journal_insert_checkpoint(struct journal_head *jh, |
640 | transaction_t *transaction) | 640 | transaction_t *transaction) |
641 | { | 641 | { |
642 | JBUFFER_TRACE(jh, "entry"); | 642 | JBUFFER_TRACE(jh, "entry"); |
@@ -658,7 +658,7 @@ void __journal_insert_checkpoint(struct journal_head *jh, | |||
658 | 658 | ||
659 | /* | 659 | /* |
660 | * We've finished with this transaction structure: adios... | 660 | * We've finished with this transaction structure: adios... |
661 | * | 661 | * |
662 | * The transaction must have no links except for the checkpoint by this | 662 | * The transaction must have no links except for the checkpoint by this |
663 | * point. | 663 | * point. |
664 | * | 664 | * |