• Home
  • Raw
  • Download

Lines Matching refs:jl

89 			      struct reiserfs_journal_list *jl, int flushall);
91 struct reiserfs_journal_list *jl, int flushall);
98 struct reiserfs_journal_list *jl);
313 *jl) in get_list_bitmap()
337 jb->journal_list = jl; in get_list_bitmap()
547 static inline void get_journal_list(struct reiserfs_journal_list *jl) in get_journal_list() argument
549 jl->j_refcount++; in get_journal_list()
553 struct reiserfs_journal_list *jl) in put_journal_list() argument
555 if (jl->j_refcount < 1) { in put_journal_list()
557 jl->j_trans_id, jl->j_refcount); in put_journal_list()
559 if (--jl->j_refcount == 0) in put_journal_list()
560 kfree(jl); in put_journal_list()
569 struct reiserfs_journal_list *jl) in cleanup_freed_for_journal_list() argument
572 struct reiserfs_list_bitmap *jb = jl->j_list_bitmap; in cleanup_freed_for_journal_list()
576 jl->j_list_bitmap->journal_list = NULL; in cleanup_freed_for_journal_list()
577 jl->j_list_bitmap = NULL; in cleanup_freed_for_journal_list()
585 struct reiserfs_journal_list *jl; in journal_list_still_alive() local
588 jl = JOURNAL_LIST_ENTRY(entry->next); in journal_list_still_alive()
589 if (jl->j_trans_id <= trans_id) { in journal_list_still_alive()
774 jh->jl = j->j_current_jl; in __add_jh()
776 list_add_tail(&jh->list, &jh->jl->j_tail_bh_list); in __add_jh()
778 list_add_tail(&jh->list, &jh->jl->j_bh_list); in __add_jh()
796 struct reiserfs_journal_list *jl, in write_ordered_buffers() argument
886 struct reiserfs_journal_list *jl) in flush_older_commits() argument
892 unsigned int trans_id = jl->j_trans_id; in flush_older_commits()
899 first_jl = jl; in flush_older_commits()
900 entry = jl->j_list.prev; in flush_older_commits()
912 if (first_jl == jl) { in flush_older_commits()
973 struct reiserfs_journal_list *jl, int flushall) in flush_commit_list() argument
978 unsigned int trans_id = jl->j_trans_id; in flush_commit_list()
986 if (atomic_read(&jl->j_older_commits_done)) { in flush_commit_list()
994 BUG_ON(jl->j_len <= 0); in flush_commit_list()
997 get_journal_list(jl); in flush_commit_list()
999 if (flush_older_commits(s, jl) == 1) { in flush_commit_list()
1009 reiserfs_mutex_lock_safe(&jl->j_commit_mutex, s); in flush_commit_list()
1012 mutex_unlock(&jl->j_commit_mutex); in flush_commit_list()
1015 BUG_ON(jl->j_trans_id == 0); in flush_commit_list()
1018 if (atomic_read(&jl->j_commit_left) <= 0) { in flush_commit_list()
1020 atomic_set(&jl->j_older_commits_done, 1); in flush_commit_list()
1022 mutex_unlock(&jl->j_commit_mutex); in flush_commit_list()
1026 if (!list_empty(&jl->j_bh_list)) { in flush_commit_list()
1035 journal, jl, &jl->j_bh_list); in flush_commit_list()
1040 BUG_ON(!list_empty(&jl->j_bh_list)); in flush_commit_list()
1049 write_len = jl->j_len + 1; in flush_commit_list()
1053 bn = SB_ONDISK_JOURNAL_1st_BLOCK(s) + (jl->j_start + i) % in flush_commit_list()
1067 for (i = 0; i < (jl->j_len + 1); i++) { in flush_commit_list()
1069 (jl->j_start + i) % SB_ONDISK_JOURNAL_SIZE(s); in flush_commit_list()
1096 atomic_dec(&jl->j_commit_left); in flush_commit_list()
1099 BUG_ON(atomic_read(&jl->j_commit_left) != 1); in flush_commit_list()
1108 if (buffer_dirty(jl->j_commit_bh)) in flush_commit_list()
1110 mark_buffer_dirty(jl->j_commit_bh) ; in flush_commit_list()
1113 __sync_dirty_buffer(jl->j_commit_bh, in flush_commit_list()
1116 sync_dirty_buffer(jl->j_commit_bh); in flush_commit_list()
1125 if (unlikely(!buffer_uptodate(jl->j_commit_bh))) { in flush_commit_list()
1131 bforget(jl->j_commit_bh); in flush_commit_list()
1133 (jl->j_trans_id - journal->j_last_commit_id) != 1) { in flush_commit_list()
1135 journal->j_last_commit_id, jl->j_trans_id); in flush_commit_list()
1137 journal->j_last_commit_id = jl->j_trans_id; in flush_commit_list()
1143 cleanup_freed_for_journal_list(s, jl); in flush_commit_list()
1149 dirty_one_transaction(s, jl); in flush_commit_list()
1150 atomic_dec(&jl->j_commit_left); in flush_commit_list()
1153 atomic_set(&jl->j_older_commits_done, 1); in flush_commit_list()
1155 mutex_unlock(&jl->j_commit_mutex); in flush_commit_list()
1157 put_journal_list(s, jl); in flush_commit_list()
1198 struct reiserfs_journal_list *jl, in remove_all_from_journal_list() argument
1203 cn = jl->j_realblock; in remove_all_from_journal_list()
1219 jl, cn->blocknr, 1); in remove_all_from_journal_list()
1225 jl->j_realblock = NULL; in remove_all_from_journal_list()
1299 struct reiserfs_journal_list *jl) in flush_older_journal_lists() argument
1304 unsigned int trans_id = jl->j_trans_id; in flush_older_journal_lists()
1328 struct reiserfs_journal_list *jl) in del_from_work_list() argument
1331 if (!list_empty(&jl->j_working_list)) { in del_from_work_list()
1332 list_del_init(&jl->j_working_list); in del_from_work_list()
1348 struct reiserfs_journal_list *jl, int flushall) in flush_journal_list() argument
1356 unsigned long j_len_saved = jl->j_len; in flush_journal_list()
1378 j_len_saved, jl->j_trans_id); in flush_journal_list()
1383 if (atomic_read(&jl->j_nonzerolen) <= 0 && in flush_journal_list()
1384 atomic_read(&jl->j_commit_left) <= 0) { in flush_journal_list()
1392 flush_commit_list(s, jl, 1); in flush_journal_list()
1394 if (!(jl->j_state & LIST_DIRTY) in flush_journal_list()
1399 if (atomic_read(&jl->j_nonzerolen) <= 0 && in flush_journal_list()
1400 atomic_read(&jl->j_commit_left) <= 0) { in flush_journal_list()
1412 cn = jl->j_realblock; in flush_journal_list()
1426 if (!(jl->j_state & LIST_DIRTY)) in flush_journal_list()
1523 cn = jl->j_realblock; in flush_journal_list()
1576 flush_older_journal_lists(s, jl); in flush_journal_list()
1592 (jl->j_start + jl->j_len + in flush_journal_list()
1594 jl->j_trans_id); in flush_journal_list()
1600 remove_all_from_journal_list(s, jl, 0); in flush_journal_list()
1601 list_del_init(&jl->j_list); in flush_journal_list()
1603 del_from_work_list(s, jl); in flush_journal_list()
1606 (jl->j_trans_id - journal->j_last_flush_id) != 1) { in flush_journal_list()
1608 journal->j_last_flush_id, jl->j_trans_id); in flush_journal_list()
1610 journal->j_last_flush_id = jl->j_trans_id; in flush_journal_list()
1616 jl->j_len = 0; in flush_journal_list()
1617 atomic_set(&jl->j_nonzerolen, 0); in flush_journal_list()
1618 jl->j_start = 0; in flush_journal_list()
1619 jl->j_realblock = NULL; in flush_journal_list()
1620 jl->j_commit_bh = NULL; in flush_journal_list()
1621 jl->j_trans_id = 0; in flush_journal_list()
1622 jl->j_state = 0; in flush_journal_list()
1623 put_journal_list(s, jl); in flush_journal_list()
1630 struct reiserfs_journal_list *jl, in write_one_transaction() argument
1636 jl->j_state |= LIST_TOUCHED; in write_one_transaction()
1637 del_from_work_list(s, jl); in write_one_transaction()
1638 if (jl->j_len == 0 || atomic_read(&jl->j_nonzerolen) == 0) { in write_one_transaction()
1642 cn = jl->j_realblock; in write_one_transaction()
1682 struct reiserfs_journal_list *jl) in dirty_one_transaction() argument
1687 jl->j_state |= LIST_DIRTY; in dirty_one_transaction()
1688 cn = jl->j_realblock; in dirty_one_transaction()
1717 struct reiserfs_journal_list *jl, in kupdate_transactions() argument
1725 unsigned int orig_trans_id = jl->j_trans_id; in kupdate_transactions()
1743 if (jl->j_len == 0 || (jl->j_state & LIST_TOUCHED) || in kupdate_transactions()
1744 atomic_read(&jl->j_commit_left) in kupdate_transactions()
1745 || !(jl->j_state & LIST_DIRTY)) { in kupdate_transactions()
1746 del_from_work_list(s, jl); in kupdate_transactions()
1749 ret = write_one_transaction(s, jl, &chunk); in kupdate_transactions()
1755 entry = jl->j_list.next; in kupdate_transactions()
1761 jl = JOURNAL_LIST_ENTRY(entry); in kupdate_transactions()
1764 if (jl->j_trans_id <= orig_trans_id) in kupdate_transactions()
1787 struct reiserfs_journal_list *jl) in flush_used_journal_lists() argument
1798 flush_jl = tjl = jl; in flush_used_journal_lists()
1806 tjl->j_trans_id < jl->j_trans_id) { in flush_used_journal_lists()
1819 get_journal_list(jl); in flush_used_journal_lists()
1827 if (flush_jl != jl) in flush_used_journal_lists()
1828 kupdate_transactions(s, jl, &tjl, &trans_id, len, i); in flush_used_journal_lists()
1832 put_journal_list(s, jl); in flush_used_journal_lists()
1842 struct reiserfs_journal_list *jl, in remove_journal_hash() argument
1855 && (jl == NULL || jl == cur->jlist) in remove_journal_hash()
2572 struct reiserfs_journal_list *jl; in alloc_journal_list() local
2573 jl = kzalloc(sizeof(struct reiserfs_journal_list), in alloc_journal_list()
2575 INIT_LIST_HEAD(&jl->j_list); in alloc_journal_list()
2576 INIT_LIST_HEAD(&jl->j_working_list); in alloc_journal_list()
2577 INIT_LIST_HEAD(&jl->j_tail_bh_list); in alloc_journal_list()
2578 INIT_LIST_HEAD(&jl->j_bh_list); in alloc_journal_list()
2579 mutex_init(&jl->j_commit_mutex); in alloc_journal_list()
2581 get_journal_list(jl); in alloc_journal_list()
2582 return jl; in alloc_journal_list()
2722 struct reiserfs_journal_list *jl; in journal_init() local
2884 jl = journal->j_current_jl; in journal_init()
2892 jl->j_list_bitmap = get_list_bitmap(sb, jl); in journal_init()
2894 if (!jl->j_list_bitmap) { in journal_init()
3549 struct reiserfs_journal_list *jl; in flush_async_commits() local
3556 jl = JOURNAL_LIST_ENTRY(entry); in flush_async_commits()
3557 flush_commit_list(sb, jl, 1); in flush_async_commits()
3626 struct reiserfs_journal_list *jl; in check_journal_end() local
3663 jl = journal->j_current_jl; in check_journal_end()
3664 trans_id = jl->j_trans_id; in check_journal_end()
3666 jl->j_state |= LIST_COMMIT_PENDING; in check_journal_end()
3694 flush_commit_list(sb, jl, 1); in check_journal_end()
3847 struct reiserfs_journal_list *jl) in __commit_trans_jl() argument
3859 jl = journal->j_current_jl; in __commit_trans_jl()
3899 if (atomic_read(&jl->j_commit_left) > 1) in __commit_trans_jl()
3901 flush_commit_list(sb, jl, 1); in __commit_trans_jl()
3913 struct reiserfs_journal_list *jl = REISERFS_I(inode)->i_jl; in reiserfs_commit_for_inode() local
3919 if (!id || !jl) { in reiserfs_commit_for_inode()
3925 return __commit_trans_jl(inode, id, jl); in reiserfs_commit_for_inode()
4002 struct reiserfs_journal_list *jl, *temp_jl; in do_journal_end() local
4103 jl = journal->j_current_jl; in do_journal_end()
4111 reiserfs_mutex_lock_safe(&jl->j_commit_mutex, sb); in do_journal_end()
4114 commit_trans_id = jl->j_trans_id; in do_journal_end()
4116 atomic_set(&jl->j_older_commits_done, 0); in do_journal_end()
4117 jl->j_trans_id = journal->j_trans_id; in do_journal_end()
4118 jl->j_timestamp = journal->j_trans_start_time; in do_journal_end()
4119 jl->j_commit_bh = c_bh; in do_journal_end()
4120 jl->j_start = journal->j_start; in do_journal_end()
4121 jl->j_len = journal->j_len; in do_journal_end()
4122 atomic_set(&jl->j_nonzerolen, journal->j_len); in do_journal_end()
4123 atomic_set(&jl->j_commit_left, journal->j_len + 2); in do_journal_end()
4124 jl->j_realblock = NULL; in do_journal_end()
4140 jl->j_realblock = jl_cn; in do_journal_end()
4163 jl_cn->jlist = jl; in do_journal_end()
4250 list_add_tail(&jl->j_list, &journal->j_journal_list); in do_journal_end()
4251 list_add_tail(&jl->j_working_list, &journal->j_working_list); in do_journal_end()
4287 if (!list_empty(&jl->j_tail_bh_list)) { in do_journal_end()
4290 journal, jl, &jl->j_tail_bh_list); in do_journal_end()
4293 BUG_ON(!list_empty(&jl->j_tail_bh_list)); in do_journal_end()
4294 mutex_unlock(&jl->j_commit_mutex); in do_journal_end()
4305 flush_commit_list(sb, jl, 1); in do_journal_end()
4306 flush_journal_list(sb, jl, 1); in do_journal_end()
4307 } else if (!(jl->j_state & LIST_COMMIT_PENDING)) { in do_journal_end()
4377 flush_commit_list(sb, jl, 1); in do_journal_end()