journal.c (fe56097b23b1303b894eefd91582e4a64247d03f) | journal.c (d796c52ef0b71a988364f6109aeb63d79c5b116b) |
---|---|
1/* 2 * linux/fs/jbd2/journal.c 3 * 4 * Written by Stephen C. Tweedie <sct@redhat.com>, 1998 5 * 6 * Copyright 1998 Red Hat corp --- All Rights Reserved 7 * 8 * This file is part of the Linux kernel and is made available under --- 598 unchanged lines hidden (view full) --- 607 __jbd2_log_start_commit(journal, tid); 608 /* There's a running transaction and we've just made sure 609 * it's commit has been scheduled. */ 610 if (ptid) 611 *ptid = tid; 612 ret = 1; 613 } else if (journal->j_committing_transaction) { 614 /* | 1/* 2 * linux/fs/jbd2/journal.c 3 * 4 * Written by Stephen C. Tweedie <sct@redhat.com>, 1998 5 * 6 * Copyright 1998 Red Hat corp --- All Rights Reserved 7 * 8 * This file is part of the Linux kernel and is made available under --- 598 unchanged lines hidden (view full) --- 607 __jbd2_log_start_commit(journal, tid); 608 /* There's a running transaction and we've just made sure 609 * it's commit has been scheduled. */ 610 if (ptid) 611 *ptid = tid; 612 ret = 1; 613 } else if (journal->j_committing_transaction) { 614 /* |
615 * If commit has been started, then we have to wait for 616 * completion of that transaction. | 615 * If ext3_write_super() recently started a commit, then we 616 * have to wait for completion of that transaction |
617 */ 618 if (ptid) 619 *ptid = journal->j_committing_transaction->t_tid; 620 ret = 1; 621 } 622 write_unlock(&journal->j_state_lock); 623 return ret; 624} --- 747 unchanged lines hidden (view full) --- 1372 1373/** 1374 * jbd2_journal_update_sb_errno() - Update error in the journal. 1375 * @journal: The journal to update. 1376 * 1377 * Update a journal's errno. Write updated superblock to disk waiting for IO 1378 * to complete. 1379 */ | 617 */ 618 if (ptid) 619 *ptid = journal->j_committing_transaction->t_tid; 620 ret = 1; 621 } 622 write_unlock(&journal->j_state_lock); 623 return ret; 624} --- 747 unchanged lines hidden (view full) --- 1372 1373/** 1374 * jbd2_journal_update_sb_errno() - Update error in the journal. 1375 * @journal: The journal to update. 1376 * 1377 * Update a journal's errno. Write updated superblock to disk waiting for IO 1378 * to complete. 1379 */ |
1380static void jbd2_journal_update_sb_errno(journal_t *journal) | 1380void jbd2_journal_update_sb_errno(journal_t *journal) |
1381{ 1382 journal_superblock_t *sb = journal->j_superblock; 1383 1384 read_lock(&journal->j_state_lock); 1385 jbd_debug(1, "JBD2: updating superblock error (errno %d)\n", 1386 journal->j_errno); 1387 sb->s_errno = cpu_to_be32(journal->j_errno); 1388 jbd2_superblock_csum_set(journal, sb); 1389 read_unlock(&journal->j_state_lock); 1390 1391 jbd2_write_superblock(journal, WRITE_SYNC); 1392} | 1381{ 1382 journal_superblock_t *sb = journal->j_superblock; 1383 1384 read_lock(&journal->j_state_lock); 1385 jbd_debug(1, "JBD2: updating superblock error (errno %d)\n", 1386 journal->j_errno); 1387 sb->s_errno = cpu_to_be32(journal->j_errno); 1388 jbd2_superblock_csum_set(journal, sb); 1389 read_unlock(&journal->j_state_lock); 1390 1391 jbd2_write_superblock(journal, WRITE_SYNC); 1392} |
1393EXPORT_SYMBOL(jbd2_journal_update_sb_errno); |
|
1393 1394/* 1395 * Read the superblock for a given journal, performing initial 1396 * validation of the format. 1397 */ 1398static int journal_get_superblock(journal_t *journal) 1399{ 1400 struct buffer_head *bh; --- 1230 unchanged lines hidden --- | 1394 1395/* 1396 * Read the superblock for a given journal, performing initial 1397 * validation of the format. 1398 */ 1399static int journal_get_superblock(journal_t *journal) 1400{ 1401 struct buffer_head *bh; --- 1230 unchanged lines hidden --- |