journal.c (aeb5d727062a0238a2f96c9c380fbd2be4640c6f) | journal.c (9a1c3542768b5a58e45a9216921cd10a3bae1205) |
---|---|
1/* 2** Write ahead logging implementation copyright Chris Mason 2000 3** 4** The background commits make this code very interelated, and 5** overly complex. I need to rethink things a bit....The major players: 6** 7** journal_begin -- call with the number of blocks you expect to log. 8** If the current transaction is too --- 2561 unchanged lines hidden (view full) --- 2570{ 2571 int result; 2572 2573 result = 0; 2574 2575 if (journal->j_dev_bd != NULL) { 2576 if (journal->j_dev_bd->bd_dev != super->s_dev) 2577 bd_release(journal->j_dev_bd); | 1/* 2** Write ahead logging implementation copyright Chris Mason 2000 3** 4** The background commits make this code very interelated, and 5** overly complex. I need to rethink things a bit....The major players: 6** 7** journal_begin -- call with the number of blocks you expect to log. 8** If the current transaction is too --- 2561 unchanged lines hidden (view full) --- 2570{ 2571 int result; 2572 2573 result = 0; 2574 2575 if (journal->j_dev_bd != NULL) { 2576 if (journal->j_dev_bd->bd_dev != super->s_dev) 2577 bd_release(journal->j_dev_bd); |
2578 result = blkdev_put(journal->j_dev_bd); | 2578 result = blkdev_put(journal->j_dev_bd, 0); /* move up */ |
2579 journal->j_dev_bd = NULL; 2580 } 2581 2582 if (result != 0) { 2583 reiserfs_warning(super, 2584 "sh-457: release_journal_dev: Cannot release journal device: %i", 2585 result); 2586 } --- 26 unchanged lines hidden (view full) --- 2613 journal->j_dev_bd = NULL; 2614 reiserfs_warning(super, "sh-458: journal_init_dev: " 2615 "cannot init journal device '%s': %i", 2616 __bdevname(jdev, b), result); 2617 return result; 2618 } else if (jdev != super->s_dev) { 2619 result = bd_claim(journal->j_dev_bd, journal); 2620 if (result) { | 2579 journal->j_dev_bd = NULL; 2580 } 2581 2582 if (result != 0) { 2583 reiserfs_warning(super, 2584 "sh-457: release_journal_dev: Cannot release journal device: %i", 2585 result); 2586 } --- 26 unchanged lines hidden (view full) --- 2613 journal->j_dev_bd = NULL; 2614 reiserfs_warning(super, "sh-458: journal_init_dev: " 2615 "cannot init journal device '%s': %i", 2616 __bdevname(jdev, b), result); 2617 return result; 2618 } else if (jdev != super->s_dev) { 2619 result = bd_claim(journal->j_dev_bd, journal); 2620 if (result) { |
2621 blkdev_put(journal->j_dev_bd); | 2621 blkdev_put(journal->j_dev_bd, blkdev_mode); |
2622 return result; 2623 } 2624 2625 set_blocksize(journal->j_dev_bd, super->s_blocksize); 2626 } 2627 2628 return 0; 2629 } --- 1685 unchanged lines hidden --- | 2622 return result; 2623 } 2624 2625 set_blocksize(journal->j_dev_bd, super->s_blocksize); 2626 } 2627 2628 return 0; 2629 } --- 1685 unchanged lines hidden --- |