diff options
Diffstat (limited to 'fs/jfs/jfs_logmgr.c')
-rw-r--r-- | fs/jfs/jfs_logmgr.c | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index 44a2f33cb98d..88eae45a4644 100644 --- a/fs/jfs/jfs_logmgr.c +++ b/fs/jfs/jfs_logmgr.c | |||
@@ -244,7 +244,7 @@ int lmLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, | |||
244 | goto writeRecord; | 244 | goto writeRecord; |
245 | 245 | ||
246 | /* | 246 | /* |
247 | * initialize/update page/transaction recovery lsn | 247 | * initialize/update page/transaction recovery lsn |
248 | */ | 248 | */ |
249 | lsn = log->lsn; | 249 | lsn = log->lsn; |
250 | 250 | ||
@@ -263,7 +263,7 @@ int lmLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, | |||
263 | } | 263 | } |
264 | 264 | ||
265 | /* | 265 | /* |
266 | * initialize/update lsn of tblock of the page | 266 | * initialize/update lsn of tblock of the page |
267 | * | 267 | * |
268 | * transaction inherits oldest lsn of pages associated | 268 | * transaction inherits oldest lsn of pages associated |
269 | * with allocation/deallocation of resources (their | 269 | * with allocation/deallocation of resources (their |
@@ -307,7 +307,7 @@ int lmLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, | |||
307 | LOGSYNC_UNLOCK(log, flags); | 307 | LOGSYNC_UNLOCK(log, flags); |
308 | 308 | ||
309 | /* | 309 | /* |
310 | * write the log record | 310 | * write the log record |
311 | */ | 311 | */ |
312 | writeRecord: | 312 | writeRecord: |
313 | lsn = lmWriteRecord(log, tblk, lrd, tlck); | 313 | lsn = lmWriteRecord(log, tblk, lrd, tlck); |
@@ -372,7 +372,7 @@ lmWriteRecord(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, | |||
372 | goto moveLrd; | 372 | goto moveLrd; |
373 | 373 | ||
374 | /* | 374 | /* |
375 | * move log record data | 375 | * move log record data |
376 | */ | 376 | */ |
377 | /* retrieve source meta-data page to log */ | 377 | /* retrieve source meta-data page to log */ |
378 | if (tlck->flag & tlckPAGELOCK) { | 378 | if (tlck->flag & tlckPAGELOCK) { |
@@ -465,7 +465,7 @@ lmWriteRecord(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, | |||
465 | } | 465 | } |
466 | 466 | ||
467 | /* | 467 | /* |
468 | * move log record descriptor | 468 | * move log record descriptor |
469 | */ | 469 | */ |
470 | moveLrd: | 470 | moveLrd: |
471 | lrd->length = cpu_to_le16(len); | 471 | lrd->length = cpu_to_le16(len); |
@@ -574,7 +574,7 @@ static int lmNextPage(struct jfs_log * log) | |||
574 | LOGGC_LOCK(log); | 574 | LOGGC_LOCK(log); |
575 | 575 | ||
576 | /* | 576 | /* |
577 | * write or queue the full page at the tail of write queue | 577 | * write or queue the full page at the tail of write queue |
578 | */ | 578 | */ |
579 | /* get the tail tblk on commit queue */ | 579 | /* get the tail tblk on commit queue */ |
580 | if (list_empty(&log->cqueue)) | 580 | if (list_empty(&log->cqueue)) |
@@ -625,7 +625,7 @@ static int lmNextPage(struct jfs_log * log) | |||
625 | LOGGC_UNLOCK(log); | 625 | LOGGC_UNLOCK(log); |
626 | 626 | ||
627 | /* | 627 | /* |
628 | * allocate/initialize next page | 628 | * allocate/initialize next page |
629 | */ | 629 | */ |
630 | /* if log wraps, the first data page of log is 2 | 630 | /* if log wraps, the first data page of log is 2 |
631 | * (0 never used, 1 is superblock). | 631 | * (0 never used, 1 is superblock). |
@@ -953,7 +953,7 @@ static int lmLogSync(struct jfs_log * log, int hard_sync) | |||
953 | } | 953 | } |
954 | 954 | ||
955 | /* | 955 | /* |
956 | * forward syncpt | 956 | * forward syncpt |
957 | */ | 957 | */ |
958 | /* if last sync is same as last syncpt, | 958 | /* if last sync is same as last syncpt, |
959 | * invoke sync point forward processing to update sync. | 959 | * invoke sync point forward processing to update sync. |
@@ -989,7 +989,7 @@ static int lmLogSync(struct jfs_log * log, int hard_sync) | |||
989 | lsn = log->lsn; | 989 | lsn = log->lsn; |
990 | 990 | ||
991 | /* | 991 | /* |
992 | * setup next syncpt trigger (SWAG) | 992 | * setup next syncpt trigger (SWAG) |
993 | */ | 993 | */ |
994 | logsize = log->logsize; | 994 | logsize = log->logsize; |
995 | 995 | ||
@@ -1000,11 +1000,11 @@ static int lmLogSync(struct jfs_log * log, int hard_sync) | |||
1000 | if (more < 2 * LOGPSIZE) { | 1000 | if (more < 2 * LOGPSIZE) { |
1001 | jfs_warn("\n ... Log Wrap ... Log Wrap ... Log Wrap ...\n"); | 1001 | jfs_warn("\n ... Log Wrap ... Log Wrap ... Log Wrap ...\n"); |
1002 | /* | 1002 | /* |
1003 | * log wrapping | 1003 | * log wrapping |
1004 | * | 1004 | * |
1005 | * option 1 - panic ? No.! | 1005 | * option 1 - panic ? No.! |
1006 | * option 2 - shutdown file systems | 1006 | * option 2 - shutdown file systems |
1007 | * associated with log ? | 1007 | * associated with log ? |
1008 | * option 3 - extend log ? | 1008 | * option 3 - extend log ? |
1009 | */ | 1009 | */ |
1010 | /* | 1010 | /* |
@@ -1062,7 +1062,7 @@ void jfs_syncpt(struct jfs_log *log, int hard_sync) | |||
1062 | /* | 1062 | /* |
1063 | * NAME: lmLogOpen() | 1063 | * NAME: lmLogOpen() |
1064 | * | 1064 | * |
1065 | * FUNCTION: open the log on first open; | 1065 | * FUNCTION: open the log on first open; |
1066 | * insert filesystem in the active list of the log. | 1066 | * insert filesystem in the active list of the log. |
1067 | * | 1067 | * |
1068 | * PARAMETER: ipmnt - file system mount inode | 1068 | * PARAMETER: ipmnt - file system mount inode |
@@ -1113,7 +1113,7 @@ int lmLogOpen(struct super_block *sb) | |||
1113 | init_waitqueue_head(&log->syncwait); | 1113 | init_waitqueue_head(&log->syncwait); |
1114 | 1114 | ||
1115 | /* | 1115 | /* |
1116 | * external log as separate logical volume | 1116 | * external log as separate logical volume |
1117 | * | 1117 | * |
1118 | * file systems to log may have n-to-1 relationship; | 1118 | * file systems to log may have n-to-1 relationship; |
1119 | */ | 1119 | */ |
@@ -1155,7 +1155,7 @@ journal_found: | |||
1155 | return 0; | 1155 | return 0; |
1156 | 1156 | ||
1157 | /* | 1157 | /* |
1158 | * unwind on error | 1158 | * unwind on error |
1159 | */ | 1159 | */ |
1160 | shutdown: /* unwind lbmLogInit() */ | 1160 | shutdown: /* unwind lbmLogInit() */ |
1161 | list_del(&log->journal_list); | 1161 | list_del(&log->journal_list); |
@@ -1427,7 +1427,7 @@ int lmLogInit(struct jfs_log * log) | |||
1427 | return 0; | 1427 | return 0; |
1428 | 1428 | ||
1429 | /* | 1429 | /* |
1430 | * unwind on error | 1430 | * unwind on error |
1431 | */ | 1431 | */ |
1432 | errout30: /* release log page */ | 1432 | errout30: /* release log page */ |
1433 | log->wqueue = NULL; | 1433 | log->wqueue = NULL; |
@@ -1480,7 +1480,7 @@ int lmLogClose(struct super_block *sb) | |||
1480 | 1480 | ||
1481 | if (test_bit(log_INLINELOG, &log->flag)) { | 1481 | if (test_bit(log_INLINELOG, &log->flag)) { |
1482 | /* | 1482 | /* |
1483 | * in-line log in host file system | 1483 | * in-line log in host file system |
1484 | */ | 1484 | */ |
1485 | rc = lmLogShutdown(log); | 1485 | rc = lmLogShutdown(log); |
1486 | kfree(log); | 1486 | kfree(log); |
@@ -1504,7 +1504,7 @@ int lmLogClose(struct super_block *sb) | |||
1504 | goto out; | 1504 | goto out; |
1505 | 1505 | ||
1506 | /* | 1506 | /* |
1507 | * external log as separate logical volume | 1507 | * external log as separate logical volume |
1508 | */ | 1508 | */ |
1509 | list_del(&log->journal_list); | 1509 | list_del(&log->journal_list); |
1510 | bdev = log->bdev; | 1510 | bdev = log->bdev; |
@@ -1723,7 +1723,7 @@ int lmLogShutdown(struct jfs_log * log) | |||
1723 | * | 1723 | * |
1724 | * PARAMETE: log - pointer to logs inode. | 1724 | * PARAMETE: log - pointer to logs inode. |
1725 | * fsdev - kdev_t of filesystem. | 1725 | * fsdev - kdev_t of filesystem. |
1726 | * serial - pointer to returned log serial number | 1726 | * serial - pointer to returned log serial number |
1727 | * activate - insert/remove device from active list. | 1727 | * activate - insert/remove device from active list. |
1728 | * | 1728 | * |
1729 | * RETURN: 0 - success | 1729 | * RETURN: 0 - success |
@@ -1963,7 +1963,7 @@ static void lbmfree(struct lbuf * bp) | |||
1963 | * FUNCTION: add a log buffer to the log redrive list | 1963 | * FUNCTION: add a log buffer to the log redrive list |
1964 | * | 1964 | * |
1965 | * PARAMETER: | 1965 | * PARAMETER: |
1966 | * bp - log buffer | 1966 | * bp - log buffer |
1967 | * | 1967 | * |
1968 | * NOTES: | 1968 | * NOTES: |
1969 | * Takes log_redrive_lock. | 1969 | * Takes log_redrive_lock. |
@@ -2054,7 +2054,7 @@ static void lbmWrite(struct jfs_log * log, struct lbuf * bp, int flag, | |||
2054 | bp->l_flag = flag; | 2054 | bp->l_flag = flag; |
2055 | 2055 | ||
2056 | /* | 2056 | /* |
2057 | * insert bp at tail of write queue associated with log | 2057 | * insert bp at tail of write queue associated with log |
2058 | * | 2058 | * |
2059 | * (request is either for bp already/currently at head of queue | 2059 | * (request is either for bp already/currently at head of queue |
2060 | * or new bp to be inserted at tail) | 2060 | * or new bp to be inserted at tail) |
@@ -2117,7 +2117,7 @@ static void lbmDirectWrite(struct jfs_log * log, struct lbuf * bp, int flag) | |||
2117 | log->base + (bp->l_pn << (L2LOGPSIZE - log->l2bsize)); | 2117 | log->base + (bp->l_pn << (L2LOGPSIZE - log->l2bsize)); |
2118 | 2118 | ||
2119 | /* | 2119 | /* |
2120 | * initiate pageout of the page | 2120 | * initiate pageout of the page |
2121 | */ | 2121 | */ |
2122 | lbmStartIO(bp); | 2122 | lbmStartIO(bp); |
2123 | } | 2123 | } |
@@ -2128,7 +2128,7 @@ static void lbmDirectWrite(struct jfs_log * log, struct lbuf * bp, int flag) | |||
2128 | * | 2128 | * |
2129 | * FUNCTION: Interface to DD strategy routine | 2129 | * FUNCTION: Interface to DD strategy routine |
2130 | * | 2130 | * |
2131 | * RETURN: none | 2131 | * RETURN: none |
2132 | * | 2132 | * |
2133 | * serialization: LCACHE_LOCK() is NOT held during log i/o; | 2133 | * serialization: LCACHE_LOCK() is NOT held during log i/o; |
2134 | */ | 2134 | */ |
@@ -2222,7 +2222,7 @@ static int lbmIODone(struct bio *bio, unsigned int bytes_done, int error) | |||
2222 | bio_put(bio); | 2222 | bio_put(bio); |
2223 | 2223 | ||
2224 | /* | 2224 | /* |
2225 | * pagein completion | 2225 | * pagein completion |
2226 | */ | 2226 | */ |
2227 | if (bp->l_flag & lbmREAD) { | 2227 | if (bp->l_flag & lbmREAD) { |
2228 | bp->l_flag &= ~lbmREAD; | 2228 | bp->l_flag &= ~lbmREAD; |
@@ -2236,7 +2236,7 @@ static int lbmIODone(struct bio *bio, unsigned int bytes_done, int error) | |||
2236 | } | 2236 | } |
2237 | 2237 | ||
2238 | /* | 2238 | /* |
2239 | * pageout completion | 2239 | * pageout completion |
2240 | * | 2240 | * |
2241 | * the bp at the head of write queue has completed pageout. | 2241 | * the bp at the head of write queue has completed pageout. |
2242 | * | 2242 | * |
@@ -2302,7 +2302,7 @@ static int lbmIODone(struct bio *bio, unsigned int bytes_done, int error) | |||
2302 | } | 2302 | } |
2303 | 2303 | ||
2304 | /* | 2304 | /* |
2305 | * synchronous pageout: | 2305 | * synchronous pageout: |
2306 | * | 2306 | * |
2307 | * buffer has not necessarily been removed from write queue | 2307 | * buffer has not necessarily been removed from write queue |
2308 | * (e.g., synchronous write of partial-page with COMMIT): | 2308 | * (e.g., synchronous write of partial-page with COMMIT): |
@@ -2316,7 +2316,7 @@ static int lbmIODone(struct bio *bio, unsigned int bytes_done, int error) | |||
2316 | } | 2316 | } |
2317 | 2317 | ||
2318 | /* | 2318 | /* |
2319 | * Group Commit pageout: | 2319 | * Group Commit pageout: |
2320 | */ | 2320 | */ |
2321 | else if (bp->l_flag & lbmGC) { | 2321 | else if (bp->l_flag & lbmGC) { |
2322 | LCACHE_UNLOCK(flags); | 2322 | LCACHE_UNLOCK(flags); |
@@ -2324,7 +2324,7 @@ static int lbmIODone(struct bio *bio, unsigned int bytes_done, int error) | |||
2324 | } | 2324 | } |
2325 | 2325 | ||
2326 | /* | 2326 | /* |
2327 | * asynchronous pageout: | 2327 | * asynchronous pageout: |
2328 | * | 2328 | * |
2329 | * buffer must have been removed from write queue: | 2329 | * buffer must have been removed from write queue: |
2330 | * insert buffer at head of freelist where it can be recycled | 2330 | * insert buffer at head of freelist where it can be recycled |
@@ -2375,7 +2375,7 @@ int jfsIOWait(void *arg) | |||
2375 | * FUNCTION: format file system log | 2375 | * FUNCTION: format file system log |
2376 | * | 2376 | * |
2377 | * PARAMETERS: | 2377 | * PARAMETERS: |
2378 | * log - volume log | 2378 | * log - volume log |
2379 | * logAddress - start address of log space in FS block | 2379 | * logAddress - start address of log space in FS block |
2380 | * logSize - length of log space in FS block; | 2380 | * logSize - length of log space in FS block; |
2381 | * | 2381 | * |
@@ -2407,16 +2407,16 @@ int lmLogFormat(struct jfs_log *log, s64 logAddress, int logSize) | |||
2407 | npages = logSize >> sbi->l2nbperpage; | 2407 | npages = logSize >> sbi->l2nbperpage; |
2408 | 2408 | ||
2409 | /* | 2409 | /* |
2410 | * log space: | 2410 | * log space: |
2411 | * | 2411 | * |
2412 | * page 0 - reserved; | 2412 | * page 0 - reserved; |
2413 | * page 1 - log superblock; | 2413 | * page 1 - log superblock; |
2414 | * page 2 - log data page: A SYNC log record is written | 2414 | * page 2 - log data page: A SYNC log record is written |
2415 | * into this page at logform time; | 2415 | * into this page at logform time; |
2416 | * pages 3-N - log data page: set to empty log data pages; | 2416 | * pages 3-N - log data page: set to empty log data pages; |
2417 | */ | 2417 | */ |
2418 | /* | 2418 | /* |
2419 | * init log superblock: log page 1 | 2419 | * init log superblock: log page 1 |
2420 | */ | 2420 | */ |
2421 | logsuper = (struct logsuper *) bp->l_ldata; | 2421 | logsuper = (struct logsuper *) bp->l_ldata; |
2422 | 2422 | ||
@@ -2436,7 +2436,7 @@ int lmLogFormat(struct jfs_log *log, s64 logAddress, int logSize) | |||
2436 | goto exit; | 2436 | goto exit; |
2437 | 2437 | ||
2438 | /* | 2438 | /* |
2439 | * init pages 2 to npages-1 as log data pages: | 2439 | * init pages 2 to npages-1 as log data pages: |
2440 | * | 2440 | * |
2441 | * log page sequence number (lpsn) initialization: | 2441 | * log page sequence number (lpsn) initialization: |
2442 | * | 2442 | * |
@@ -2479,7 +2479,7 @@ int lmLogFormat(struct jfs_log *log, s64 logAddress, int logSize) | |||
2479 | goto exit; | 2479 | goto exit; |
2480 | 2480 | ||
2481 | /* | 2481 | /* |
2482 | * initialize succeeding log pages: lpsn = 0, 1, ..., (N-2) | 2482 | * initialize succeeding log pages: lpsn = 0, 1, ..., (N-2) |
2483 | */ | 2483 | */ |
2484 | for (lspn = 0; lspn < npages - 3; lspn++) { | 2484 | for (lspn = 0; lspn < npages - 3; lspn++) { |
2485 | lp->h.page = lp->t.page = cpu_to_le32(lspn); | 2485 | lp->h.page = lp->t.page = cpu_to_le32(lspn); |
@@ -2495,7 +2495,7 @@ int lmLogFormat(struct jfs_log *log, s64 logAddress, int logSize) | |||
2495 | rc = 0; | 2495 | rc = 0; |
2496 | exit: | 2496 | exit: |
2497 | /* | 2497 | /* |
2498 | * finalize log | 2498 | * finalize log |
2499 | */ | 2499 | */ |
2500 | /* release the buffer */ | 2500 | /* release the buffer */ |
2501 | lbmFree(bp); | 2501 | lbmFree(bp); |