osb 333 arch/arm/kernel/sys_oabi-compat.c struct oabi_sembuf osb; osb 334 arch/arm/kernel/sys_oabi-compat.c err |= __copy_from_user(&osb, tsops, sizeof(osb)); osb 335 arch/arm/kernel/sys_oabi-compat.c sops[i].sem_num = osb.sem_num; osb 336 arch/arm/kernel/sys_oabi-compat.c sops[i].sem_op = osb.sem_op; osb 337 arch/arm/kernel/sys_oabi-compat.c sops[i].sem_flg = osb.sem_flg; osb 292 fs/ocfs2/acl.c struct ocfs2_super *osb; osb 298 fs/ocfs2/acl.c osb = OCFS2_SB(inode->i_sb); osb 299 fs/ocfs2/acl.c if (!(osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL)) osb 317 fs/ocfs2/acl.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 324 fs/ocfs2/acl.c if (!(osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL)) osb 353 fs/ocfs2/acl.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 359 fs/ocfs2/acl.c if (osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) { osb 376 fs/ocfs2/acl.c if ((osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) && acl) { osb 221 fs/ocfs2/alloc.c struct ocfs2_super *osb = OCFS2_SB(oi->vfs_inode.i_sb); osb 224 fs/ocfs2/alloc.c mlog_bug_on_msg(!ocfs2_sparse_alloc(osb) && osb 228 fs/ocfs2/alloc.c osb->dev_str, osb 997 fs/ocfs2/alloc.c struct ocfs2_super *osb = osb 1016 fs/ocfs2/alloc.c bhs[i] = sb_getblk(osb->sb, first_blkno); osb 1032 fs/ocfs2/alloc.c memset(bhs[i]->b_data, 0, osb->sb->s_blocksize); osb 1037 fs/ocfs2/alloc.c eb->h_fs_generation = cpu_to_le32(osb->fs_generation); osb 1043 fs/ocfs2/alloc.c cpu_to_le16(ocfs2_extent_recs_per_eb(osb->sb)); osb 3106 fs/ocfs2/alloc.c static int ocfs2_remove_rightmost_empty_extent(struct ocfs2_super *osb, osb 3115 fs/ocfs2/alloc.c handle = ocfs2_start_trans(osb, credits); osb 3126 fs/ocfs2/alloc.c ocfs2_commit_trans(osb, handle); osb 4788 fs/ocfs2/alloc.c struct ocfs2_super *osb = osb 4841 fs/ocfs2/alloc.c block = ocfs2_clusters_to_blocks(osb->sb, bit_off); osb 4867 fs/ocfs2/alloc.c ocfs2_free_local_alloc_bits(osb, handle, data_ac, osb 4873 fs/ocfs2/alloc.c ocfs2_clusters_to_blocks(osb->sb, bit_off), osb 5659 fs/ocfs2/alloc.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 5671 fs/ocfs2/alloc.c (ocfs2_sparse_alloc(osb) && num_free_extents < max_recs_needed)) osb 5675 fs/ocfs2/alloc.c ret = ocfs2_reserve_new_metadata_blocks(osb, extra_blocks, ac); osb 5701 fs/ocfs2/alloc.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 5702 fs/ocfs2/alloc.c struct inode *tl_inode = osb->osb_tl_inode; osb 5711 fs/ocfs2/alloc.c ret = ocfs2_lock_refcount_tree(osb, refcount_loc, 1, osb 5740 fs/ocfs2/alloc.c if (ocfs2_truncate_log_needs_flush(osb)) { osb 5741 fs/ocfs2/alloc.c ret = __ocfs2_flush_truncate_log(osb); osb 5748 fs/ocfs2/alloc.c handle = ocfs2_start_trans(osb, osb 5749 fs/ocfs2/alloc.c ocfs2_remove_extent_credits(osb->sb) + credits); osb 5780 fs/ocfs2/alloc.c ocfs2_blocks_to_clusters(osb->sb, osb 5785 fs/ocfs2/alloc.c ret = ocfs2_truncate_log_append(osb, handle, osb 5793 fs/ocfs2/alloc.c ocfs2_commit_trans(osb, handle); osb 5801 fs/ocfs2/alloc.c ocfs2_unlock_refcount_tree(osb, ref_tree, 1); osb 5806 fs/ocfs2/alloc.c int ocfs2_truncate_log_needs_flush(struct ocfs2_super *osb) osb 5808 fs/ocfs2/alloc.c struct buffer_head *tl_bh = osb->osb_tl_bh; osb 5817 fs/ocfs2/alloc.c "%u, count = %u\n", osb->slot_num, osb 5839 fs/ocfs2/alloc.c int ocfs2_truncate_log_append(struct ocfs2_super *osb, osb 5846 fs/ocfs2/alloc.c struct inode *tl_inode = osb->osb_tl_inode; osb 5847 fs/ocfs2/alloc.c struct buffer_head *tl_bh = osb->osb_tl_bh; osb 5853 fs/ocfs2/alloc.c start_cluster = ocfs2_blocks_to_clusters(osb->sb, start_blk); osb 5864 fs/ocfs2/alloc.c mlog_bug_on_msg(tl_count > ocfs2_truncate_recs_per_inode(osb->sb) || osb 5869 fs/ocfs2/alloc.c ocfs2_truncate_recs_per_inode(osb->sb), osb 5910 fs/ocfs2/alloc.c osb->truncated_clusters += num_clusters; osb 5915 fs/ocfs2/alloc.c static int ocfs2_replay_truncate_records(struct ocfs2_super *osb, osb 5926 fs/ocfs2/alloc.c struct inode *tl_inode = osb->osb_tl_inode; osb 5927 fs/ocfs2/alloc.c struct buffer_head *tl_bh = osb->osb_tl_bh; osb 5934 fs/ocfs2/alloc.c handle = ocfs2_start_trans(osb, OCFS2_TRUNCATE_LOG_FLUSH_ONE_REC); osb 5975 fs/ocfs2/alloc.c ocfs2_commit_trans(osb, handle); osb 5979 fs/ocfs2/alloc.c osb->truncated_clusters = 0; osb 5986 fs/ocfs2/alloc.c int __ocfs2_flush_truncate_log(struct ocfs2_super *osb) osb 5990 fs/ocfs2/alloc.c struct inode *tl_inode = osb->osb_tl_inode; osb 5992 fs/ocfs2/alloc.c struct buffer_head *tl_bh = osb->osb_tl_bh; osb 5996 fs/ocfs2/alloc.c struct ocfs2_journal *journal = osb->journal; osb 6031 fs/ocfs2/alloc.c data_alloc_inode = ocfs2_get_system_file_inode(osb, osb 6048 fs/ocfs2/alloc.c status = ocfs2_replay_truncate_records(osb, data_alloc_inode, osb 6064 fs/ocfs2/alloc.c int ocfs2_flush_truncate_log(struct ocfs2_super *osb) osb 6067 fs/ocfs2/alloc.c struct inode *tl_inode = osb->osb_tl_inode; osb 6070 fs/ocfs2/alloc.c status = __ocfs2_flush_truncate_log(osb); osb 6079 fs/ocfs2/alloc.c struct ocfs2_super *osb = osb 6083 fs/ocfs2/alloc.c status = ocfs2_flush_truncate_log(osb); osb 6087 fs/ocfs2/alloc.c ocfs2_init_steal_slots(osb); osb 6091 fs/ocfs2/alloc.c void ocfs2_schedule_truncate_log_flush(struct ocfs2_super *osb, osb 6094 fs/ocfs2/alloc.c if (osb->osb_tl_inode && osb 6095 fs/ocfs2/alloc.c atomic_read(&osb->osb_tl_disable) == 0) { osb 6099 fs/ocfs2/alloc.c cancel_delayed_work(&osb->osb_truncate_log_wq); osb 6101 fs/ocfs2/alloc.c queue_delayed_work(osb->ocfs2_wq, &osb->osb_truncate_log_wq, osb 6111 fs/ocfs2/alloc.c int ocfs2_try_to_free_truncate_log(struct ocfs2_super *osb, osb 6118 fs/ocfs2/alloc.c inode_lock(osb->osb_tl_inode); osb 6119 fs/ocfs2/alloc.c truncated_clusters = osb->truncated_clusters; osb 6120 fs/ocfs2/alloc.c inode_unlock(osb->osb_tl_inode); osb 6129 fs/ocfs2/alloc.c ret = ocfs2_flush_truncate_log(osb); osb 6135 fs/ocfs2/alloc.c if (jbd2_journal_start_commit(osb->journal->j_journal, &target)) { osb 6136 fs/ocfs2/alloc.c jbd2_log_wait_commit(osb->journal->j_journal, target); osb 6143 fs/ocfs2/alloc.c static int ocfs2_get_truncate_log_info(struct ocfs2_super *osb, osb 6152 fs/ocfs2/alloc.c inode = ocfs2_get_system_file_inode(osb, osb 6178 fs/ocfs2/alloc.c int ocfs2_begin_truncate_log_recovery(struct ocfs2_super *osb, osb 6192 fs/ocfs2/alloc.c status = ocfs2_get_truncate_log_info(osb, slot_num, &tl_inode, &tl_bh); osb 6224 fs/ocfs2/alloc.c ocfs2_compute_meta_ecc(osb->sb, tl_bh->b_data, &di->i_check); osb 6225 fs/ocfs2/alloc.c status = ocfs2_write_block(osb, tl_bh, INODE_CACHE(tl_inode)); osb 6245 fs/ocfs2/alloc.c int ocfs2_complete_truncate_log_recovery(struct ocfs2_super *osb, osb 6253 fs/ocfs2/alloc.c struct inode *tl_inode = osb->osb_tl_inode; osb 6269 fs/ocfs2/alloc.c if (ocfs2_truncate_log_needs_flush(osb)) { osb 6270 fs/ocfs2/alloc.c status = __ocfs2_flush_truncate_log(osb); osb 6277 fs/ocfs2/alloc.c handle = ocfs2_start_trans(osb, OCFS2_TRUNCATE_LOG_UPDATE); osb 6286 fs/ocfs2/alloc.c start_blk = ocfs2_clusters_to_blocks(osb->sb, start_cluster); osb 6288 fs/ocfs2/alloc.c status = ocfs2_truncate_log_append(osb, handle, osb 6290 fs/ocfs2/alloc.c ocfs2_commit_trans(osb, handle); osb 6303 fs/ocfs2/alloc.c void ocfs2_truncate_log_shutdown(struct ocfs2_super *osb) osb 6306 fs/ocfs2/alloc.c struct inode *tl_inode = osb->osb_tl_inode; osb 6308 fs/ocfs2/alloc.c atomic_set(&osb->osb_tl_disable, 1); osb 6311 fs/ocfs2/alloc.c cancel_delayed_work(&osb->osb_truncate_log_wq); osb 6312 fs/ocfs2/alloc.c flush_workqueue(osb->ocfs2_wq); osb 6314 fs/ocfs2/alloc.c status = ocfs2_flush_truncate_log(osb); osb 6318 fs/ocfs2/alloc.c brelse(osb->osb_tl_bh); osb 6319 fs/ocfs2/alloc.c iput(osb->osb_tl_inode); osb 6323 fs/ocfs2/alloc.c int ocfs2_truncate_log_init(struct ocfs2_super *osb) osb 6329 fs/ocfs2/alloc.c status = ocfs2_get_truncate_log_info(osb, osb 6330 fs/ocfs2/alloc.c osb->slot_num, osb 6339 fs/ocfs2/alloc.c INIT_DELAYED_WORK(&osb->osb_truncate_log_wq, osb 6341 fs/ocfs2/alloc.c atomic_set(&osb->osb_tl_disable, 0); osb 6342 fs/ocfs2/alloc.c osb->osb_tl_bh = tl_bh; osb 6343 fs/ocfs2/alloc.c osb->osb_tl_inode = tl_inode; osb 6386 fs/ocfs2/alloc.c static int ocfs2_free_cached_blocks(struct ocfs2_super *osb, osb 6398 fs/ocfs2/alloc.c inode = ocfs2_get_system_file_inode(osb, sysfile_type, slot); osb 6419 fs/ocfs2/alloc.c handle = ocfs2_start_trans(osb, OCFS2_SUBALLOC_FREE); osb 6434 fs/ocfs2/alloc.c ocfs2_commit_trans(osb, handle); osb 6481 fs/ocfs2/alloc.c static int ocfs2_free_cached_clusters(struct ocfs2_super *osb, osb 6485 fs/ocfs2/alloc.c struct inode *tl_inode = osb->osb_tl_inode; osb 6492 fs/ocfs2/alloc.c if (ocfs2_truncate_log_needs_flush(osb)) { osb 6493 fs/ocfs2/alloc.c ret = __ocfs2_flush_truncate_log(osb); osb 6500 fs/ocfs2/alloc.c handle = ocfs2_start_trans(osb, OCFS2_TRUNCATE_LOG_UPDATE); osb 6507 fs/ocfs2/alloc.c ret = ocfs2_truncate_log_append(osb, handle, head->free_blk, osb 6510 fs/ocfs2/alloc.c ocfs2_commit_trans(osb, handle); osb 6533 fs/ocfs2/alloc.c int ocfs2_run_deallocs(struct ocfs2_super *osb, osb 6548 fs/ocfs2/alloc.c ret2 = ocfs2_free_cached_blocks(osb, osb 6563 fs/ocfs2/alloc.c ret2 = ocfs2_free_cached_clusters(osb, osb 6662 fs/ocfs2/alloc.c struct ocfs2_super *osb = osb 6678 fs/ocfs2/alloc.c osb->slot_num, &real_slot, osb 6691 fs/ocfs2/alloc.c new_eb_bh[i] = sb_getblk(osb->sb, bf->free_blk); osb 6700 fs/ocfs2/alloc.c bf->free_blk, osb->slot_num, real_slot); osb 6712 fs/ocfs2/alloc.c memset(new_eb_bh[i]->b_data, 0, osb->sb->s_blocksize); osb 6720 fs/ocfs2/alloc.c eb->h_fs_generation = cpu_to_le32(osb->fs_generation); osb 6725 fs/ocfs2/alloc.c cpu_to_le16(ocfs2_extent_recs_per_eb(osb->sb)); osb 7057 fs/ocfs2/alloc.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 7061 fs/ocfs2/alloc.c loff_t end = osb->s_clustersize; osb 7068 fs/ocfs2/alloc.c pages = kcalloc(ocfs2_pages_per_cluster(osb->sb), osb 7076 fs/ocfs2/alloc.c ret = ocfs2_reserve_clusters(osb, 1, &data_ac); osb 7083 fs/ocfs2/alloc.c handle = ocfs2_start_trans(osb, osb 7084 fs/ocfs2/alloc.c ocfs2_inline_to_extents_credits(osb->sb)); osb 7103 fs/ocfs2/alloc.c ocfs2_clusters_to_bytes(osb->sb, 1)); osb 7127 fs/ocfs2/alloc.c if (!ocfs2_sparse_alloc(osb) && osb 7128 fs/ocfs2/alloc.c PAGE_SIZE < osb->s_clustersize) osb 7150 fs/ocfs2/alloc.c if (PAGE_SIZE > osb->s_clustersize) osb 7151 fs/ocfs2/alloc.c page_end = osb->s_clustersize; osb 7192 fs/ocfs2/alloc.c ocfs2_clusters_to_bytes(osb->sb, 1)); osb 7196 fs/ocfs2/alloc.c ocfs2_free_local_alloc_bits(osb, handle, data_ac, osb 7202 fs/ocfs2/alloc.c ocfs2_clusters_to_blocks(osb->sb, bit_off), osb 7206 fs/ocfs2/alloc.c ocfs2_commit_trans(osb, handle); osb 7222 fs/ocfs2/alloc.c int ocfs2_commit_truncate(struct ocfs2_super *osb, osb 7242 fs/ocfs2/alloc.c new_highest_cpos = ocfs2_clusters_for_bytes(osb->sb, osb 7314 fs/ocfs2/alloc.c status = ocfs2_remove_rightmost_empty_extent(osb, osb 7356 fs/ocfs2/alloc.c status = ocfs2_lock_refcount_tree(osb, refcount_loc, 1, osb 7382 fs/ocfs2/alloc.c ocfs2_unlock_refcount_tree(osb, ref_tree, 1); osb 7384 fs/ocfs2/alloc.c ocfs2_schedule_truncate_log_flush(osb, 1); osb 7386 fs/ocfs2/alloc.c ocfs2_run_deallocs(osb, &dealloc); osb 7402 fs/ocfs2/alloc.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 7417 fs/ocfs2/alloc.c !ocfs2_supports_inline_data(osb)) { osb 7423 fs/ocfs2/alloc.c osb->s_feature_incompat); osb 7428 fs/ocfs2/alloc.c handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); osb 7466 fs/ocfs2/alloc.c ocfs2_commit_trans(osb, handle); osb 7477 fs/ocfs2/alloc.c struct ocfs2_super *osb = OCFS2_SB(sb); osb 7490 fs/ocfs2/alloc.c if (group != osb->first_cluster_group_blkno) osb 7546 fs/ocfs2/alloc.c struct ocfs2_super *osb = OCFS2_SB(sb); osb 7556 fs/ocfs2/alloc.c start = range->start >> osb->s_clustersize_bits; osb 7557 fs/ocfs2/alloc.c len = range->len >> osb->s_clustersize_bits; osb 7558 fs/ocfs2/alloc.c minlen = range->minlen >> osb->s_clustersize_bits; osb 7560 fs/ocfs2/alloc.c if (minlen >= osb->bitmap_cpg || range->len < sb->s_blocksize) osb 7566 fs/ocfs2/alloc.c main_bm_inode = ocfs2_get_system_file_inode(osb, osb 7601 fs/ocfs2/alloc.c if (first_group == osb->first_cluster_group_blkno) osb 7612 fs/ocfs2/alloc.c if (first_bit + len >= osb->bitmap_cpg) osb 7613 fs/ocfs2/alloc.c last_bit = osb->bitmap_cpg; osb 7637 fs/ocfs2/alloc.c len -= osb->bitmap_cpg - first_bit; osb 7639 fs/ocfs2/alloc.c if (group == osb->first_cluster_group_blkno) osb 7640 fs/ocfs2/alloc.c group = ocfs2_clusters_to_blocks(sb, osb->bitmap_cpg); osb 7642 fs/ocfs2/alloc.c group += ocfs2_clusters_to_blocks(sb, osb->bitmap_cpg); osb 7668 fs/ocfs2/alloc.c struct ocfs2_super *osb = OCFS2_SB(sb); osb 7671 fs/ocfs2/alloc.c ocfs2_trim_fs_lock_res_init(osb); osb 7675 fs/ocfs2/alloc.c ret = ocfs2_trim_fs_lock(osb, NULL, 1); osb 7679 fs/ocfs2/alloc.c ocfs2_trim_fs_lock_res_uninit(osb); osb 7685 fs/ocfs2/alloc.c osb->dev_str); osb 7686 fs/ocfs2/alloc.c ret = ocfs2_trim_fs_lock(osb, &info, 0); osb 7689 fs/ocfs2/alloc.c ocfs2_trim_fs_lock_res_uninit(osb); osb 7700 fs/ocfs2/alloc.c osb->dev_str, info.tf_nodenum); osb 7706 fs/ocfs2/alloc.c info.tf_nodenum = osb->node_num; osb 7717 fs/ocfs2/alloc.c ocfs2_trim_fs_unlock(osb, pinfo); osb 7718 fs/ocfs2/alloc.c ocfs2_trim_fs_lock_res_uninit(osb); osb 161 fs/ocfs2/alloc.h int ocfs2_truncate_log_init(struct ocfs2_super *osb); osb 162 fs/ocfs2/alloc.h void ocfs2_truncate_log_shutdown(struct ocfs2_super *osb); osb 163 fs/ocfs2/alloc.h void ocfs2_schedule_truncate_log_flush(struct ocfs2_super *osb, osb 165 fs/ocfs2/alloc.h int ocfs2_flush_truncate_log(struct ocfs2_super *osb); osb 166 fs/ocfs2/alloc.h int ocfs2_begin_truncate_log_recovery(struct ocfs2_super *osb, osb 169 fs/ocfs2/alloc.h int ocfs2_complete_truncate_log_recovery(struct ocfs2_super *osb, osb 171 fs/ocfs2/alloc.h int ocfs2_truncate_log_needs_flush(struct ocfs2_super *osb); osb 172 fs/ocfs2/alloc.h int ocfs2_truncate_log_append(struct ocfs2_super *osb, osb 176 fs/ocfs2/alloc.h int __ocfs2_flush_truncate_log(struct ocfs2_super *osb); osb 177 fs/ocfs2/alloc.h int ocfs2_try_to_free_truncate_log(struct ocfs2_super *osb, osb 207 fs/ocfs2/alloc.h int ocfs2_run_deallocs(struct ocfs2_super *osb, osb 219 fs/ocfs2/alloc.h int ocfs2_commit_truncate(struct ocfs2_super *osb, osb 51 fs/ocfs2/aops.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 86 fs/ocfs2/aops.c buffer_cache_bh = sb_getblk(osb->sb, blkno); osb 144 fs/ocfs2/aops.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 182 fs/ocfs2/aops.c if (create && p_blkno == 0 && ocfs2_sparse_alloc(osb)) { osb 194 fs/ocfs2/aops.c if (!ocfs2_sparse_alloc(osb)) { osb 518 fs/ocfs2/aops.c static void ocfs2_figure_cluster_boundaries(struct ocfs2_super *osb, osb 525 fs/ocfs2/aops.c if (unlikely(PAGE_SHIFT > osb->s_clustersize_bits)) { osb 528 fs/ocfs2/aops.c cpp = 1 << (PAGE_SHIFT - osb->s_clustersize_bits); osb 531 fs/ocfs2/aops.c cluster_start = cluster_start << osb->s_clustersize_bits; osb 533 fs/ocfs2/aops.c cluster_end = cluster_start + osb->s_clustersize; osb 554 fs/ocfs2/aops.c struct ocfs2_super *osb, u32 cpos, osb 560 fs/ocfs2/aops.c ocfs2_figure_cluster_boundaries(osb, cpos, &cluster_start, &cluster_end); osb 851 fs/ocfs2/aops.c struct ocfs2_super *osb, loff_t pos, osb 862 fs/ocfs2/aops.c wc->w_cpos = pos >> osb->s_clustersize_bits; osb 864 fs/ocfs2/aops.c cend = (pos + len - 1) >> osb->s_clustersize_bits; osb 870 fs/ocfs2/aops.c if (unlikely(PAGE_SHIFT > osb->s_clustersize_bits)) osb 1241 fs/ocfs2/aops.c struct ocfs2_super *osb = OCFS2_SB(mapping->host->i_sb); osb 1251 fs/ocfs2/aops.c cluster_off = pos & (osb->s_clustersize - 1); osb 1252 fs/ocfs2/aops.c if ((cluster_off + local_len) > osb->s_clustersize) osb 1253 fs/ocfs2/aops.c local_len = osb->s_clustersize - cluster_off; osb 1280 fs/ocfs2/aops.c static void ocfs2_set_target_boundaries(struct ocfs2_super *osb, osb 1310 fs/ocfs2/aops.c ocfs2_figure_cluster_boundaries(osb, osb 1317 fs/ocfs2/aops.c ocfs2_figure_cluster_boundaries(osb, osb 1490 fs/ocfs2/aops.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 1495 fs/ocfs2/aops.c handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); osb 1504 fs/ocfs2/aops.c ocfs2_commit_trans(osb, handle); osb 1519 fs/ocfs2/aops.c ocfs2_commit_trans(osb, handle); osb 1531 fs/ocfs2/aops.c ocfs2_commit_trans(osb, handle); osb 1668 fs/ocfs2/aops.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 1677 fs/ocfs2/aops.c ret = ocfs2_alloc_write_ctxt(&wc, osb, pos, len, type, di_bh); osb 1683 fs/ocfs2/aops.c if (ocfs2_supports_inline_data(osb)) { osb 1698 fs/ocfs2/aops.c if (ocfs2_sparse_alloc(osb)) osb 1782 fs/ocfs2/aops.c ocfs2_set_target_boundaries(osb, wc, pos, len, cluster_of_pages); osb 1784 fs/ocfs2/aops.c handle = ocfs2_start_trans(osb, credits); osb 1795 fs/ocfs2/aops.c ocfs2_clusters_to_bytes(osb->sb, clusters_to_alloc)); osb 1851 fs/ocfs2/aops.c ocfs2_clusters_to_bytes(osb->sb, clusters_to_alloc)); osb 1853 fs/ocfs2/aops.c ocfs2_commit_trans(osb, handle); osb 1884 fs/ocfs2/aops.c ret1 = ocfs2_try_to_free_truncate_log(osb, clusters_need); osb 1969 fs/ocfs2/aops.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 2067 fs/ocfs2/aops.c ocfs2_commit_trans(osb, handle); osb 2069 fs/ocfs2/aops.c ocfs2_run_deallocs(osb, &wc->w_dealloc); osb 2143 fs/ocfs2/aops.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 2156 fs/ocfs2/aops.c len = osb->s_clustersize - (pos & (osb->s_clustersize - 1)); osb 2210 fs/ocfs2/aops.c ret = ocfs2_add_inode_to_orphan(osb, inode); osb 2227 fs/ocfs2/aops.c if (ocfs2_sparse_alloc(osb)) osb 2298 fs/ocfs2/aops.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 2339 fs/ocfs2/aops.c ret = ocfs2_del_inode_from_orphan(osb, inode, di_bh, osb 2364 fs/ocfs2/aops.c handle = ocfs2_start_trans(osb, credits); osb 2394 fs/ocfs2/aops.c ocfs2_commit_trans(osb, handle); osb 2404 fs/ocfs2/aops.c ocfs2_run_deallocs(osb, &dealloc); osb 2451 fs/ocfs2/aops.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 2463 fs/ocfs2/aops.c !ocfs2_supports_append_dio(osb)) osb 577 fs/ocfs2/blockcheck.c struct ocfs2_super *osb = OCFS2_SB(sb); osb 579 fs/ocfs2/blockcheck.c if (ocfs2_meta_ecc(osb)) osb 581 fs/ocfs2/blockcheck.c &osb->osb_ecc_stats); osb 599 fs/ocfs2/blockcheck.c struct ocfs2_super *osb = OCFS2_SB(sb); osb 601 fs/ocfs2/blockcheck.c if (ocfs2_meta_ecc(osb)) osb 603 fs/ocfs2/blockcheck.c &osb->osb_ecc_stats); osb 40 fs/ocfs2/buffer_head_io.c int ocfs2_write_block(struct ocfs2_super *osb, struct buffer_head *bh, osb 53 fs/ocfs2/buffer_head_io.c if (ocfs2_is_hard_readonly(osb)) { osb 91 fs/ocfs2/buffer_head_io.c int ocfs2_read_blocks_sync(struct ocfs2_super *osb, u64 block, osb 111 fs/ocfs2/buffer_head_io.c bhs[i] = sb_getblk(osb->sb, block++); osb 430 fs/ocfs2/buffer_head_io.c int ocfs2_write_super_or_backup(struct ocfs2_super *osb, osb 437 fs/ocfs2/buffer_head_io.c ocfs2_check_super_or_backup(osb->sb, bh->b_blocknr); osb 439 fs/ocfs2/buffer_head_io.c if (ocfs2_is_hard_readonly(osb) || ocfs2_is_soft_readonly(osb)) { osb 453 fs/ocfs2/buffer_head_io.c ocfs2_compute_meta_ecc(osb->sb, bh->b_data, &di->i_check); osb 17 fs/ocfs2/buffer_head_io.h int ocfs2_write_block(struct ocfs2_super *osb, osb 20 fs/ocfs2/buffer_head_io.h int ocfs2_read_blocks_sync(struct ocfs2_super *osb, u64 block, osb 35 fs/ocfs2/buffer_head_io.h int ocfs2_write_super_or_backup(struct ocfs2_super *osb, osb 41 fs/ocfs2/dcache.c struct ocfs2_super *osb; osb 47 fs/ocfs2/dcache.c osb = OCFS2_SB(dentry->d_sb); osb 70 fs/ocfs2/dcache.c BUG_ON(!osb); osb 72 fs/ocfs2/dcache.c if (inode == osb->root_inode || is_bad_inode(inode)) osb 367 fs/ocfs2/dcache.c static void ocfs2_drop_dentry_lock(struct ocfs2_super *osb, osb 371 fs/ocfs2/dcache.c ocfs2_simple_drop_lockres(osb, &dl->dl_lockres); osb 376 fs/ocfs2/dcache.c void ocfs2_dentry_lock_put(struct ocfs2_super *osb, osb 389 fs/ocfs2/dcache.c ocfs2_drop_dentry_lock(osb, dl); osb 446 fs/ocfs2/dcache.c struct ocfs2_super *osb = OCFS2_SB(old_dir->i_sb); osb 458 fs/ocfs2/dcache.c ocfs2_dentry_lock_put(osb, dentry->d_fsdata); osb 33 fs/ocfs2/dcache.h void ocfs2_dentry_lock_put(struct ocfs2_super *osb, osb 73 fs/ocfs2/dir.c struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); osb 78 fs/ocfs2/dir.c return ocfs2_meta_ecc(osb) || ocfs2_dir_indexed(dir); osb 91 fs/ocfs2/dir.c struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); osb 93 fs/ocfs2/dir.c return ocfs2_meta_ecc(osb) || osb 94 fs/ocfs2/dir.c ocfs2_supports_indexed_dirs(osb); osb 256 fs/ocfs2/dir.c struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); osb 280 fs/ocfs2/dir.c memcpy(buf, osb->osb_dx_seed, sizeof(buf)); osb 832 fs/ocfs2/dir.c static inline unsigned int __ocfs2_dx_dir_hash_idx(struct ocfs2_super *osb, osb 835 fs/ocfs2/dir.c return minor_hash & osb->osb_dx_mask; osb 838 fs/ocfs2/dir.c static inline unsigned int ocfs2_dx_dir_hash_idx(struct ocfs2_super *osb, osb 841 fs/ocfs2/dir.c return __ocfs2_dx_dir_hash_idx(osb, hinfo->minor_hash); osb 2181 fs/ocfs2/dir.c static int ocfs2_fill_new_dir_id(struct ocfs2_super *osb, osb 2214 fs/ocfs2/dir.c static int ocfs2_fill_new_dir_el(struct ocfs2_super *osb, osb 2223 fs/ocfs2/dir.c unsigned int size = osb->sb->s_blocksize; osb 2230 fs/ocfs2/dir.c status = ocfs2_do_extend_dir(osb->sb, handle, inode, fe_bh, osb 2245 fs/ocfs2/dir.c memset(new_bh->b_data, 0, osb->sb->s_blocksize); osb 2284 fs/ocfs2/dir.c static int ocfs2_dx_dir_attach_index(struct ocfs2_super *osb, osb 2313 fs/ocfs2/dir.c dx_root_bh = sb_getblk(osb->sb, dr_blkno); osb 2328 fs/ocfs2/dir.c memset(dx_root, 0, osb->sb->s_blocksize); osb 2333 fs/ocfs2/dir.c dx_root->dr_fs_generation = cpu_to_le32(osb->fs_generation); osb 2345 fs/ocfs2/dir.c cpu_to_le16(ocfs2_dx_entries_per_root(osb->sb)); osb 2348 fs/ocfs2/dir.c cpu_to_le16(ocfs2_extent_recs_per_dx_root(osb->sb)); osb 2376 fs/ocfs2/dir.c static int ocfs2_dx_dir_format_cluster(struct ocfs2_super *osb, osb 2386 fs/ocfs2/dir.c bh = sb_getblk(osb->sb, start_blk + i); osb 2404 fs/ocfs2/dir.c memset(dx_leaf, 0, osb->sb->s_blocksize); osb 2406 fs/ocfs2/dir.c dx_leaf->dl_fs_generation = cpu_to_le32(osb->fs_generation); osb 2409 fs/ocfs2/dir.c cpu_to_le16(ocfs2_dx_entries_per_leaf(osb->sb)); osb 2438 fs/ocfs2/dir.c struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); osb 2456 fs/ocfs2/dir.c phys_blkno = ocfs2_clusters_to_blocks(osb->sb, phys); osb 2457 fs/ocfs2/dir.c ret = ocfs2_dx_dir_format_cluster(osb, handle, dir, dx_leaves, osb 2509 fs/ocfs2/dir.c static int ocfs2_fill_new_dir_dx(struct ocfs2_super *osb, osb 2535 fs/ocfs2/dir.c ret = ocfs2_fill_new_dir_el(osb, handle, parent, inode, di_bh, osb 2542 fs/ocfs2/dir.c ret = ocfs2_dx_dir_attach_index(osb, handle, inode, di_bh, leaf_bh, osb 2564 fs/ocfs2/dir.c int ocfs2_fill_new_dir(struct ocfs2_super *osb, osb 2573 fs/ocfs2/dir.c BUG_ON(!ocfs2_supports_inline_data(osb) && data_ac == NULL); osb 2576 fs/ocfs2/dir.c return ocfs2_fill_new_dir_id(osb, handle, parent, inode, fe_bh); osb 2578 fs/ocfs2/dir.c if (ocfs2_supports_indexed_dirs(osb)) osb 2579 fs/ocfs2/dir.c return ocfs2_fill_new_dir_dx(osb, handle, parent, inode, fe_bh, osb 2582 fs/ocfs2/dir.c return ocfs2_fill_new_dir_el(osb, handle, parent, inode, fe_bh, osb 2777 fs/ocfs2/dir.c struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); osb 2797 fs/ocfs2/dir.c if (ocfs2_supports_indexed_dirs(osb)) { osb 2814 fs/ocfs2/dir.c ret = ocfs2_reserve_new_metadata_blocks(osb, 1, &meta_ac); osb 2831 fs/ocfs2/dir.c ret = ocfs2_reserve_clusters(osb, alloc + dx_alloc, &data_ac); osb 2844 fs/ocfs2/dir.c handle = ocfs2_start_trans(osb, credits); osb 2852 fs/ocfs2/dir.c ocfs2_clusters_to_bytes(osb->sb, alloc + dx_alloc)); osb 2857 fs/ocfs2/dir.c if (ocfs2_supports_indexed_dirs(osb) && !dx_inline) { osb 2878 fs/ocfs2/dir.c if (ocfs2_dir_resv_allowed(osb)) osb 2926 fs/ocfs2/dir.c if (ocfs2_supports_indexed_dirs(osb) && !dx_inline) { osb 2993 fs/ocfs2/dir.c if (ocfs2_supports_indexed_dirs(osb)) { osb 2994 fs/ocfs2/dir.c ret = ocfs2_dx_dir_attach_index(osb, handle, dir, di_bh, osb 3040 fs/ocfs2/dir.c if (ocfs2_supports_indexed_dirs(osb)) { osb 3048 fs/ocfs2/dir.c off = ocfs2_dx_dir_hash_idx(osb, osb 3061 fs/ocfs2/dir.c ocfs2_commit_trans(osb, handle); osb 3148 fs/ocfs2/dir.c static int ocfs2_extend_dir(struct ocfs2_super *osb, osb 3165 fs/ocfs2/dir.c struct super_block *sb = osb->sb; osb 3234 fs/ocfs2/dir.c status = ocfs2_reserve_new_metadata(osb, el, &meta_ac); osb 3242 fs/ocfs2/dir.c status = ocfs2_reserve_clusters(osb, 1, &data_ac); osb 3249 fs/ocfs2/dir.c if (ocfs2_dir_resv_allowed(osb)) osb 3263 fs/ocfs2/dir.c handle = ocfs2_start_trans(osb, credits); osb 3271 fs/ocfs2/dir.c status = ocfs2_do_extend_dir(osb->sb, handle, dir, parent_fe_bh, osb 3323 fs/ocfs2/dir.c ocfs2_commit_trans(osb, handle); osb 3672 fs/ocfs2/dir.c static int ocfs2_dx_dir_rebalance_credits(struct ocfs2_super *osb, osb 3675 fs/ocfs2/dir.c int credits = ocfs2_clusters_to_blocks(osb->sb, 3); osb 3677 fs/ocfs2/dir.c credits += ocfs2_calc_extend_credits(osb->sb, &dx_root->dr_list); osb 3678 fs/ocfs2/dir.c credits += ocfs2_quota_trans_credits(osb->sb); osb 3686 fs/ocfs2/dir.c static int ocfs2_dx_dir_rebalance(struct ocfs2_super *osb, struct inode *dir, osb 3728 fs/ocfs2/dir.c orig_dx_leaves = ocfs2_dx_dir_kmalloc_leaves(osb->sb, &num_dx_leaves); osb 3735 fs/ocfs2/dir.c new_dx_leaves = ocfs2_dx_dir_kmalloc_leaves(osb->sb, NULL); osb 3749 fs/ocfs2/dir.c credits = ocfs2_dx_dir_rebalance_credits(osb, dx_root); osb 3750 fs/ocfs2/dir.c handle = ocfs2_start_trans(osb, credits); osb 3807 fs/ocfs2/dir.c tmp_dx_leaf = kmalloc(osb->sb->s_blocksize, GFP_NOFS); osb 3858 fs/ocfs2/dir.c ocfs2_commit_trans(osb, handle); osb 3881 fs/ocfs2/dir.c static int ocfs2_find_dir_space_dx(struct ocfs2_super *osb, struct inode *dir, osb 3926 fs/ocfs2/dir.c ret = ocfs2_dx_dir_rebalance(osb, dir, dx_root_bh, dx_leaf_bh, osb 4010 fs/ocfs2/dir.c struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); osb 4017 fs/ocfs2/dir.c ret = ocfs2_reserve_clusters(osb, 1, &data_ac); osb 4023 fs/ocfs2/dir.c dx_leaves = ocfs2_dx_dir_kmalloc_leaves(osb->sb, &num_dx_leaves); osb 4030 fs/ocfs2/dir.c handle = ocfs2_start_trans(osb, ocfs2_calc_dxi_expand_credits(osb->sb)); osb 4038 fs/ocfs2/dir.c ocfs2_clusters_to_bytes(osb->sb, 1)); osb 4072 fs/ocfs2/dir.c j = __ocfs2_dx_dir_hash_idx(osb, osb 4083 fs/ocfs2/dir.c memset(&dx_root->dr_list, 0, osb->sb->s_blocksize - osb 4086 fs/ocfs2/dir.c cpu_to_le16(ocfs2_extent_recs_per_dx_root(osb->sb)); osb 4104 fs/ocfs2/dir.c ocfs2_commit_trans(osb, handle); osb 4140 fs/ocfs2/dir.c struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); osb 4183 fs/ocfs2/dir.c ret = ocfs2_find_dir_space_dx(osb, dir, di_bh, dx_root_bh, name, osb 4208 fs/ocfs2/dir.c ret = ocfs2_extend_dir(osb, dir, di_bh, 1, lookup, &leaf_bh); osb 4235 fs/ocfs2/dir.c int ocfs2_prepare_dir_for_insert(struct ocfs2_super *osb, osb 4266 fs/ocfs2/dir.c if (ocfs2_supports_indexed_dirs(osb)) osb 4294 fs/ocfs2/dir.c ret = ocfs2_extend_dir(osb, dir, parent_fe_bh, blocks_wanted, osb 4317 fs/ocfs2/dir.c struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); osb 4329 fs/ocfs2/dir.c dx_alloc_inode = ocfs2_get_system_file_inode(osb, osb 4345 fs/ocfs2/dir.c handle = ocfs2_start_trans(osb, OCFS2_DX_ROOT_REMOVE_CREDITS); osb 4380 fs/ocfs2/dir.c ocfs2_commit_trans(osb, handle); osb 4399 fs/ocfs2/dir.c struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); osb 4456 fs/ocfs2/dir.c ocfs2_schedule_truncate_log_flush(osb, 1); osb 4457 fs/ocfs2/dir.c ocfs2_run_deallocs(osb, &dealloc); osb 83 fs/ocfs2/dir.h int ocfs2_prepare_dir_for_insert(struct ocfs2_super *osb, osb 90 fs/ocfs2/dir.h int ocfs2_fill_new_dir(struct ocfs2_super *osb, osb 99 fs/ocfs2/dlmglue.c static void ocfs2_dentry_post_unlock(struct ocfs2_super *osb, osb 334 fs/ocfs2/dlmglue.c static int ocfs2_lock_create(struct ocfs2_super *osb, osb 340 fs/ocfs2/dlmglue.c static void __ocfs2_cluster_unlock(struct ocfs2_super *osb, osb 343 fs/ocfs2/dlmglue.c static inline void ocfs2_cluster_unlock(struct ocfs2_super *osb, osb 347 fs/ocfs2/dlmglue.c __ocfs2_cluster_unlock(osb, lockres, level, _RET_IP_); osb 354 fs/ocfs2/dlmglue.c static void ocfs2_schedule_blocked_lock(struct ocfs2_super *osb, osb 368 fs/ocfs2/dlmglue.c static void ocfs2_downconvert_on_unlock(struct ocfs2_super *osb, osb 372 fs/ocfs2/dlmglue.c static void ocfs2_drop_osb_locks(struct ocfs2_super *osb); osb 376 fs/ocfs2/dlmglue.c static int ocfs2_downconvert_lock(struct ocfs2_super *osb, osb 381 fs/ocfs2/dlmglue.c static int ocfs2_prepare_cancel_convert(struct ocfs2_super *osb, osb 383 fs/ocfs2/dlmglue.c static int ocfs2_cancel_convert(struct ocfs2_super *osb, osb 511 fs/ocfs2/dlmglue.c static void ocfs2_lock_res_init_common(struct ocfs2_super *osb, osb 529 fs/ocfs2/dlmglue.c ocfs2_add_lockres_tracking(res, osb->osb_dlm_debug); osb 659 fs/ocfs2/dlmglue.c struct ocfs2_super *osb) osb 666 fs/ocfs2/dlmglue.c ocfs2_lock_res_init_common(osb, res, OCFS2_LOCK_TYPE_SUPER, osb 667 fs/ocfs2/dlmglue.c &ocfs2_super_lops, osb); osb 671 fs/ocfs2/dlmglue.c struct ocfs2_super *osb) osb 677 fs/ocfs2/dlmglue.c ocfs2_lock_res_init_common(osb, res, OCFS2_LOCK_TYPE_RENAME, osb 678 fs/ocfs2/dlmglue.c &ocfs2_rename_lops, osb); osb 682 fs/ocfs2/dlmglue.c struct ocfs2_super *osb) osb 688 fs/ocfs2/dlmglue.c ocfs2_lock_res_init_common(osb, res, OCFS2_LOCK_TYPE_NFS_SYNC, osb 689 fs/ocfs2/dlmglue.c &ocfs2_nfs_sync_lops, osb); osb 692 fs/ocfs2/dlmglue.c void ocfs2_trim_fs_lock_res_init(struct ocfs2_super *osb) osb 694 fs/ocfs2/dlmglue.c struct ocfs2_lock_res *lockres = &osb->osb_trim_fs_lockres; osb 697 fs/ocfs2/dlmglue.c mutex_lock(&osb->obs_trim_fs_mutex); osb 701 fs/ocfs2/dlmglue.c ocfs2_lock_res_init_common(osb, lockres, OCFS2_LOCK_TYPE_TRIM_FS, osb 702 fs/ocfs2/dlmglue.c &ocfs2_trim_fs_lops, osb); osb 705 fs/ocfs2/dlmglue.c void ocfs2_trim_fs_lock_res_uninit(struct ocfs2_super *osb) osb 707 fs/ocfs2/dlmglue.c struct ocfs2_lock_res *lockres = &osb->osb_trim_fs_lockres; osb 709 fs/ocfs2/dlmglue.c ocfs2_simple_drop_lockres(osb, lockres); osb 712 fs/ocfs2/dlmglue.c mutex_unlock(&osb->obs_trim_fs_mutex); osb 716 fs/ocfs2/dlmglue.c struct ocfs2_super *osb) osb 720 fs/ocfs2/dlmglue.c ocfs2_lock_res_init_common(osb, res, OCFS2_LOCK_TYPE_ORPHAN_SCAN, osb 721 fs/ocfs2/dlmglue.c &ocfs2_orphan_scan_lops, osb); osb 751 fs/ocfs2/dlmglue.c struct ocfs2_super *osb, u64 ref_blkno, osb 757 fs/ocfs2/dlmglue.c ocfs2_lock_res_init_common(osb, lockres, OCFS2_LOCK_TYPE_REFCOUNT, osb 758 fs/ocfs2/dlmglue.c &ocfs2_refcount_block_lops, osb); osb 1063 fs/ocfs2/dlmglue.c struct ocfs2_super *osb) osb 1083 fs/ocfs2/dlmglue.c ocfs2_wake_downconvert_thread(osb); osb 1089 fs/ocfs2/dlmglue.c struct ocfs2_super *osb) osb 1094 fs/ocfs2/dlmglue.c __lockres_clear_pending(lockres, generation, osb); osb 1111 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = ocfs2_get_lockres_osb(lockres); osb 1131 fs/ocfs2/dlmglue.c ocfs2_schedule_blocked_lock(osb, lockres); osb 1136 fs/ocfs2/dlmglue.c ocfs2_wake_downconvert_thread(osb); osb 1142 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = ocfs2_get_lockres_osb(lockres); osb 1199 fs/ocfs2/dlmglue.c __lockres_clear_pending(lockres, lockres->l_pending_gen, osb); osb 1303 fs/ocfs2/dlmglue.c static int ocfs2_lock_create(struct ocfs2_super *osb, osb 1328 fs/ocfs2/dlmglue.c ret = ocfs2_dlm_lock(osb->cconn, osb 1334 fs/ocfs2/dlmglue.c lockres_clear_pending(lockres, gen, osb); osb 1463 fs/ocfs2/dlmglue.c static int __ocfs2_cluster_lock(struct ocfs2_super *osb, osb 1472 fs/ocfs2/dlmglue.c int wait, catch_signals = !(osb->s_mount_opt & OCFS2_MOUNT_NOINTR); osb 1576 fs/ocfs2/dlmglue.c ret = ocfs2_dlm_lock(osb->cconn, osb 1582 fs/ocfs2/dlmglue.c lockres_clear_pending(lockres, gen, osb); osb 1618 fs/ocfs2/dlmglue.c ocfs2_wake_downconvert_thread(osb); osb 1666 fs/ocfs2/dlmglue.c static inline int ocfs2_cluster_lock(struct ocfs2_super *osb, osb 1672 fs/ocfs2/dlmglue.c return __ocfs2_cluster_lock(osb, lockres, level, lkm_flags, arg_flags, osb 1677 fs/ocfs2/dlmglue.c static void __ocfs2_cluster_unlock(struct ocfs2_super *osb, osb 1686 fs/ocfs2/dlmglue.c ocfs2_downconvert_on_unlock(osb, lockres); osb 1694 fs/ocfs2/dlmglue.c static int ocfs2_create_new_lock(struct ocfs2_super *osb, osb 1708 fs/ocfs2/dlmglue.c return ocfs2_lock_create(osb, lockres, level, lkm_flags); osb 1720 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 1734 fs/ocfs2/dlmglue.c ret = ocfs2_create_new_lock(osb, &OCFS2_I(inode)->ip_rw_lockres, 1, 1); osb 1744 fs/ocfs2/dlmglue.c ret = ocfs2_create_new_lock(osb, &OCFS2_I(inode)->ip_inode_lockres, 1, 0); osb 1750 fs/ocfs2/dlmglue.c ret = ocfs2_create_new_lock(osb, &OCFS2_I(inode)->ip_open_lockres, 0, 0); osb 1762 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 1768 fs/ocfs2/dlmglue.c if (ocfs2_mount_local(osb)) osb 1775 fs/ocfs2/dlmglue.c status = ocfs2_cluster_lock(osb, lockres, level, 0, 0); osb 1786 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 1792 fs/ocfs2/dlmglue.c if (ocfs2_mount_local(osb)) osb 1799 fs/ocfs2/dlmglue.c status = ocfs2_cluster_lock(osb, lockres, level, DLM_LKF_NOQUEUE, 0); osb 1807 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 1813 fs/ocfs2/dlmglue.c if (!ocfs2_mount_local(osb)) osb 1814 fs/ocfs2/dlmglue.c ocfs2_cluster_unlock(osb, lockres, level); osb 1824 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 1829 fs/ocfs2/dlmglue.c if (ocfs2_is_hard_readonly(osb) || ocfs2_mount_local(osb)) osb 1834 fs/ocfs2/dlmglue.c status = ocfs2_cluster_lock(osb, lockres, DLM_LOCK_PR, 0, 0); osb 1846 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 1852 fs/ocfs2/dlmglue.c if (ocfs2_is_hard_readonly(osb)) { osb 1858 fs/ocfs2/dlmglue.c if (ocfs2_mount_local(osb)) osb 1871 fs/ocfs2/dlmglue.c status = ocfs2_cluster_lock(osb, lockres, level, DLM_LKF_NOQUEUE, 0); osb 1883 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 1888 fs/ocfs2/dlmglue.c if (ocfs2_mount_local(osb)) osb 1892 fs/ocfs2/dlmglue.c ocfs2_cluster_unlock(osb, lockres, DLM_LOCK_PR); osb 1894 fs/ocfs2/dlmglue.c ocfs2_cluster_unlock(osb, lockres, DLM_LOCK_EX); osb 1904 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = ocfs2_get_lockres_osb(lockres); osb 1913 fs/ocfs2/dlmglue.c ret = ocfs2_prepare_cancel_convert(osb, lockres); osb 1916 fs/ocfs2/dlmglue.c ret = ocfs2_cancel_convert(osb, lockres); osb 1975 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = OCFS2_SB(file->f_mapping->host->i_sb); osb 1998 fs/ocfs2/dlmglue.c ret = ocfs2_lock_create(osb, lockres, DLM_LOCK_NL, 0); osb 2020 fs/ocfs2/dlmglue.c ret = ocfs2_dlm_lock(osb->cconn, level, &lockres->l_lksb, lkm_flags, osb 2071 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = OCFS2_SB(file->f_mapping->host->i_sb); osb 2097 fs/ocfs2/dlmglue.c ret = ocfs2_downconvert_lock(osb, lockres, DLM_LOCK_NL, 0, gen); osb 2108 fs/ocfs2/dlmglue.c static void ocfs2_downconvert_on_unlock(struct ocfs2_super *osb, osb 2132 fs/ocfs2/dlmglue.c ocfs2_wake_downconvert_thread(osb); osb 2311 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 2313 fs/ocfs2/dlmglue.c if (ocfs2_mount_local(osb)) osb 2419 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 2430 fs/ocfs2/dlmglue.c if (ocfs2_is_hard_readonly(osb)) { osb 2437 fs/ocfs2/dlmglue.c ocfs2_mount_local(osb)) osb 2441 fs/ocfs2/dlmglue.c ocfs2_wait_for_recovery(osb); osb 2449 fs/ocfs2/dlmglue.c status = __ocfs2_cluster_lock(osb, lockres, level, dlm_flags, osb 2465 fs/ocfs2/dlmglue.c ocfs2_wait_for_recovery(osb); osb 2606 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 2612 fs/ocfs2/dlmglue.c if (!ocfs2_is_hard_readonly(osb) && osb 2613 fs/ocfs2/dlmglue.c !ocfs2_mount_local(osb)) osb 2614 fs/ocfs2/dlmglue.c ocfs2_cluster_unlock(osb, lockres, level); osb 2734 fs/ocfs2/dlmglue.c int ocfs2_orphan_scan_lock(struct ocfs2_super *osb, u32 *seqno) osb 2740 fs/ocfs2/dlmglue.c if (ocfs2_is_hard_readonly(osb)) osb 2743 fs/ocfs2/dlmglue.c if (ocfs2_mount_local(osb)) osb 2746 fs/ocfs2/dlmglue.c lockres = &osb->osb_orphan_scan.os_lockres; osb 2747 fs/ocfs2/dlmglue.c status = ocfs2_cluster_lock(osb, lockres, DLM_LOCK_EX, 0, 0); osb 2756 fs/ocfs2/dlmglue.c *seqno = osb->osb_orphan_scan.os_seqno + 1; osb 2761 fs/ocfs2/dlmglue.c void ocfs2_orphan_scan_unlock(struct ocfs2_super *osb, u32 seqno) osb 2766 fs/ocfs2/dlmglue.c if (!ocfs2_is_hard_readonly(osb) && !ocfs2_mount_local(osb)) { osb 2767 fs/ocfs2/dlmglue.c lockres = &osb->osb_orphan_scan.os_lockres; osb 2771 fs/ocfs2/dlmglue.c ocfs2_cluster_unlock(osb, lockres, DLM_LOCK_EX); osb 2775 fs/ocfs2/dlmglue.c int ocfs2_super_lock(struct ocfs2_super *osb, osb 2780 fs/ocfs2/dlmglue.c struct ocfs2_lock_res *lockres = &osb->osb_super_lockres; osb 2782 fs/ocfs2/dlmglue.c if (ocfs2_is_hard_readonly(osb)) osb 2785 fs/ocfs2/dlmglue.c if (ocfs2_mount_local(osb)) osb 2788 fs/ocfs2/dlmglue.c status = ocfs2_cluster_lock(osb, lockres, level, 0, 0); osb 2800 fs/ocfs2/dlmglue.c status = ocfs2_refresh_slot_info(osb); osb 2805 fs/ocfs2/dlmglue.c ocfs2_cluster_unlock(osb, lockres, level); osb 2814 fs/ocfs2/dlmglue.c void ocfs2_super_unlock(struct ocfs2_super *osb, osb 2818 fs/ocfs2/dlmglue.c struct ocfs2_lock_res *lockres = &osb->osb_super_lockres; osb 2820 fs/ocfs2/dlmglue.c if (!ocfs2_mount_local(osb)) osb 2821 fs/ocfs2/dlmglue.c ocfs2_cluster_unlock(osb, lockres, level); osb 2824 fs/ocfs2/dlmglue.c int ocfs2_rename_lock(struct ocfs2_super *osb) osb 2827 fs/ocfs2/dlmglue.c struct ocfs2_lock_res *lockres = &osb->osb_rename_lockres; osb 2829 fs/ocfs2/dlmglue.c if (ocfs2_is_hard_readonly(osb)) osb 2832 fs/ocfs2/dlmglue.c if (ocfs2_mount_local(osb)) osb 2835 fs/ocfs2/dlmglue.c status = ocfs2_cluster_lock(osb, lockres, DLM_LOCK_EX, 0, 0); osb 2842 fs/ocfs2/dlmglue.c void ocfs2_rename_unlock(struct ocfs2_super *osb) osb 2844 fs/ocfs2/dlmglue.c struct ocfs2_lock_res *lockres = &osb->osb_rename_lockres; osb 2846 fs/ocfs2/dlmglue.c if (!ocfs2_mount_local(osb)) osb 2847 fs/ocfs2/dlmglue.c ocfs2_cluster_unlock(osb, lockres, DLM_LOCK_EX); osb 2850 fs/ocfs2/dlmglue.c int ocfs2_nfs_sync_lock(struct ocfs2_super *osb, int ex) osb 2853 fs/ocfs2/dlmglue.c struct ocfs2_lock_res *lockres = &osb->osb_nfs_sync_lockres; osb 2855 fs/ocfs2/dlmglue.c if (ocfs2_is_hard_readonly(osb)) osb 2858 fs/ocfs2/dlmglue.c if (ocfs2_mount_local(osb)) osb 2861 fs/ocfs2/dlmglue.c status = ocfs2_cluster_lock(osb, lockres, ex ? LKM_EXMODE : LKM_PRMODE, osb 2869 fs/ocfs2/dlmglue.c void ocfs2_nfs_sync_unlock(struct ocfs2_super *osb, int ex) osb 2871 fs/ocfs2/dlmglue.c struct ocfs2_lock_res *lockres = &osb->osb_nfs_sync_lockres; osb 2873 fs/ocfs2/dlmglue.c if (!ocfs2_mount_local(osb)) osb 2874 fs/ocfs2/dlmglue.c ocfs2_cluster_unlock(osb, lockres, osb 2878 fs/ocfs2/dlmglue.c int ocfs2_trim_fs_lock(struct ocfs2_super *osb, osb 2883 fs/ocfs2/dlmglue.c struct ocfs2_lock_res *lockres = &osb->osb_trim_fs_lockres; osb 2888 fs/ocfs2/dlmglue.c if (ocfs2_is_hard_readonly(osb)) osb 2891 fs/ocfs2/dlmglue.c if (ocfs2_mount_local(osb)) osb 2894 fs/ocfs2/dlmglue.c status = ocfs2_cluster_lock(osb, lockres, DLM_LOCK_EX, osb 2919 fs/ocfs2/dlmglue.c void ocfs2_trim_fs_unlock(struct ocfs2_super *osb, osb 2923 fs/ocfs2/dlmglue.c struct ocfs2_lock_res *lockres = &osb->osb_trim_fs_lockres; osb 2925 fs/ocfs2/dlmglue.c if (ocfs2_mount_local(osb)) osb 2939 fs/ocfs2/dlmglue.c ocfs2_cluster_unlock(osb, lockres, DLM_LOCK_EX); osb 2947 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = OCFS2_SB(dentry->d_sb); osb 2951 fs/ocfs2/dlmglue.c if (ocfs2_is_hard_readonly(osb)) { osb 2957 fs/ocfs2/dlmglue.c if (ocfs2_mount_local(osb)) osb 2960 fs/ocfs2/dlmglue.c ret = ocfs2_cluster_lock(osb, &dl->dl_lockres, level, 0, 0); osb 2971 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = OCFS2_SB(dentry->d_sb); osb 2973 fs/ocfs2/dlmglue.c if (!ocfs2_is_hard_readonly(osb) && !ocfs2_mount_local(osb)) osb 2974 fs/ocfs2/dlmglue.c ocfs2_cluster_unlock(osb, &dl->dl_lockres, level); osb 3250 fs/ocfs2/dlmglue.c struct ocfs2_super *osb; osb 3258 fs/ocfs2/dlmglue.c osb = inode->i_private; osb 3259 fs/ocfs2/dlmglue.c ocfs2_get_dlm_debug(osb->osb_dlm_debug); osb 3260 fs/ocfs2/dlmglue.c priv->p_dlm_debug = osb->osb_dlm_debug; osb 3276 fs/ocfs2/dlmglue.c static void ocfs2_dlm_init_debug(struct ocfs2_super *osb) osb 3278 fs/ocfs2/dlmglue.c struct ocfs2_dlm_debug *dlm_debug = osb->osb_dlm_debug; osb 3281 fs/ocfs2/dlmglue.c osb->osb_debug_root, osb, &ocfs2_dlm_debug_fops); osb 3283 fs/ocfs2/dlmglue.c debugfs_create_u32("locking_filter", 0600, osb->osb_debug_root, osb 3288 fs/ocfs2/dlmglue.c static void ocfs2_dlm_shutdown_debug(struct ocfs2_super *osb) osb 3290 fs/ocfs2/dlmglue.c struct ocfs2_dlm_debug *dlm_debug = osb->osb_dlm_debug; osb 3296 fs/ocfs2/dlmglue.c int ocfs2_dlm_init(struct ocfs2_super *osb) osb 3301 fs/ocfs2/dlmglue.c if (ocfs2_mount_local(osb)) { osb 3302 fs/ocfs2/dlmglue.c osb->node_num = 0; osb 3306 fs/ocfs2/dlmglue.c ocfs2_dlm_init_debug(osb); osb 3309 fs/ocfs2/dlmglue.c osb->dc_task = kthread_run(ocfs2_downconvert_thread, osb, "ocfs2dc-%s", osb 3310 fs/ocfs2/dlmglue.c osb->uuid_str); osb 3311 fs/ocfs2/dlmglue.c if (IS_ERR(osb->dc_task)) { osb 3312 fs/ocfs2/dlmglue.c status = PTR_ERR(osb->dc_task); osb 3313 fs/ocfs2/dlmglue.c osb->dc_task = NULL; osb 3319 fs/ocfs2/dlmglue.c status = ocfs2_cluster_connect(osb->osb_cluster_stack, osb 3320 fs/ocfs2/dlmglue.c osb->osb_cluster_name, osb 3321 fs/ocfs2/dlmglue.c strlen(osb->osb_cluster_name), osb 3322 fs/ocfs2/dlmglue.c osb->uuid_str, osb 3323 fs/ocfs2/dlmglue.c strlen(osb->uuid_str), osb 3324 fs/ocfs2/dlmglue.c &lproto, ocfs2_do_node_down, osb, osb 3331 fs/ocfs2/dlmglue.c status = ocfs2_cluster_this_node(conn, &osb->node_num); osb 3341 fs/ocfs2/dlmglue.c ocfs2_super_lock_res_init(&osb->osb_super_lockres, osb); osb 3342 fs/ocfs2/dlmglue.c ocfs2_rename_lock_res_init(&osb->osb_rename_lockres, osb); osb 3343 fs/ocfs2/dlmglue.c ocfs2_nfs_sync_lock_res_init(&osb->osb_nfs_sync_lockres, osb); osb 3344 fs/ocfs2/dlmglue.c ocfs2_orphan_scan_lock_res_init(&osb->osb_orphan_scan.os_lockres, osb); osb 3346 fs/ocfs2/dlmglue.c osb->cconn = conn; osb 3349 fs/ocfs2/dlmglue.c ocfs2_dlm_shutdown_debug(osb); osb 3350 fs/ocfs2/dlmglue.c if (osb->dc_task) osb 3351 fs/ocfs2/dlmglue.c kthread_stop(osb->dc_task); osb 3357 fs/ocfs2/dlmglue.c void ocfs2_dlm_shutdown(struct ocfs2_super *osb, osb 3360 fs/ocfs2/dlmglue.c ocfs2_drop_osb_locks(osb); osb 3368 fs/ocfs2/dlmglue.c if (osb->dc_task) { osb 3369 fs/ocfs2/dlmglue.c kthread_stop(osb->dc_task); osb 3370 fs/ocfs2/dlmglue.c osb->dc_task = NULL; osb 3373 fs/ocfs2/dlmglue.c ocfs2_lock_res_free(&osb->osb_super_lockres); osb 3374 fs/ocfs2/dlmglue.c ocfs2_lock_res_free(&osb->osb_rename_lockres); osb 3375 fs/ocfs2/dlmglue.c ocfs2_lock_res_free(&osb->osb_nfs_sync_lockres); osb 3376 fs/ocfs2/dlmglue.c ocfs2_lock_res_free(&osb->osb_orphan_scan.os_lockres); osb 3378 fs/ocfs2/dlmglue.c ocfs2_cluster_disconnect(osb->cconn, hangup_pending); osb 3379 fs/ocfs2/dlmglue.c osb->cconn = NULL; osb 3381 fs/ocfs2/dlmglue.c ocfs2_dlm_shutdown_debug(osb); osb 3384 fs/ocfs2/dlmglue.c static int ocfs2_drop_lock(struct ocfs2_super *osb, osb 3451 fs/ocfs2/dlmglue.c ret = ocfs2_dlm_unlock(osb->cconn, &lockres->l_lksb, lkm_flags); osb 3466 fs/ocfs2/dlmglue.c static void ocfs2_process_blocked_lock(struct ocfs2_super *osb, osb 3475 fs/ocfs2/dlmglue.c void ocfs2_mark_lockres_freeing(struct ocfs2_super *osb, osb 3486 fs/ocfs2/dlmglue.c if (lockres->l_flags & OCFS2_LOCK_QUEUED && current == osb->dc_task) { osb 3505 fs/ocfs2/dlmglue.c spin_lock_irqsave(&osb->dc_task_lock, flags2); osb 3507 fs/ocfs2/dlmglue.c osb->blocked_lock_count--; osb 3508 fs/ocfs2/dlmglue.c spin_unlock_irqrestore(&osb->dc_task_lock, flags2); osb 3517 fs/ocfs2/dlmglue.c ocfs2_process_blocked_lock(osb, lockres); osb 3535 fs/ocfs2/dlmglue.c void ocfs2_simple_drop_lockres(struct ocfs2_super *osb, osb 3540 fs/ocfs2/dlmglue.c ocfs2_mark_lockres_freeing(osb, lockres); osb 3541 fs/ocfs2/dlmglue.c ret = ocfs2_drop_lock(osb, lockres); osb 3546 fs/ocfs2/dlmglue.c static void ocfs2_drop_osb_locks(struct ocfs2_super *osb) osb 3548 fs/ocfs2/dlmglue.c ocfs2_simple_drop_lockres(osb, &osb->osb_super_lockres); osb 3549 fs/ocfs2/dlmglue.c ocfs2_simple_drop_lockres(osb, &osb->osb_rename_lockres); osb 3550 fs/ocfs2/dlmglue.c ocfs2_simple_drop_lockres(osb, &osb->osb_nfs_sync_lockres); osb 3551 fs/ocfs2/dlmglue.c ocfs2_simple_drop_lockres(osb, &osb->osb_orphan_scan.os_lockres); osb 3614 fs/ocfs2/dlmglue.c static int ocfs2_downconvert_lock(struct ocfs2_super *osb, osb 3632 fs/ocfs2/dlmglue.c if (ocfs2_userspace_stack(osb) && osb 3639 fs/ocfs2/dlmglue.c ret = ocfs2_dlm_lock(osb->cconn, osb 3645 fs/ocfs2/dlmglue.c lockres_clear_pending(lockres, generation, osb); osb 3658 fs/ocfs2/dlmglue.c static int ocfs2_prepare_cancel_convert(struct ocfs2_super *osb, osb 3687 fs/ocfs2/dlmglue.c static int ocfs2_cancel_convert(struct ocfs2_super *osb, osb 3692 fs/ocfs2/dlmglue.c ret = ocfs2_dlm_unlock(osb->cconn, &lockres->l_lksb, osb 3704 fs/ocfs2/dlmglue.c static int ocfs2_unblock_lock(struct ocfs2_super *osb, osb 3760 fs/ocfs2/dlmglue.c ret = ocfs2_prepare_cancel_convert(osb, lockres); osb 3763 fs/ocfs2/dlmglue.c ret = ocfs2_cancel_convert(osb, lockres); osb 3886 fs/ocfs2/dlmglue.c ret = ocfs2_downconvert_lock(osb, lockres, new_level, set_lvb, osb 3988 fs/ocfs2/dlmglue.c static void ocfs2_dentry_post_unlock(struct ocfs2_super *osb, osb 3992 fs/ocfs2/dlmglue.c ocfs2_dentry_lock_put(osb, dl); osb 4147 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = OCFS2_SB(oinfo->dqi_gi.dqi_sb); osb 4150 fs/ocfs2/dlmglue.c if (!ocfs2_is_hard_readonly(osb) && !ocfs2_mount_local(osb)) osb 4151 fs/ocfs2/dlmglue.c ocfs2_cluster_unlock(osb, lockres, level); osb 4202 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = OCFS2_SB(oinfo->dqi_gi.dqi_sb); osb 4207 fs/ocfs2/dlmglue.c if (ocfs2_is_hard_readonly(osb)) { osb 4212 fs/ocfs2/dlmglue.c if (ocfs2_mount_local(osb)) osb 4215 fs/ocfs2/dlmglue.c status = ocfs2_cluster_lock(osb, lockres, level, 0, 0); osb 4236 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = lockres->l_priv; osb 4239 fs/ocfs2/dlmglue.c if (ocfs2_is_hard_readonly(osb)) osb 4242 fs/ocfs2/dlmglue.c if (ocfs2_mount_local(osb)) osb 4245 fs/ocfs2/dlmglue.c status = ocfs2_cluster_lock(osb, lockres, level, 0, 0); osb 4256 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = lockres->l_priv; osb 4258 fs/ocfs2/dlmglue.c if (!ocfs2_mount_local(osb)) osb 4259 fs/ocfs2/dlmglue.c ocfs2_cluster_unlock(osb, lockres, level); osb 4262 fs/ocfs2/dlmglue.c static void ocfs2_process_blocked_lock(struct ocfs2_super *osb, osb 4288 fs/ocfs2/dlmglue.c status = ocfs2_unblock_lock(osb, lockres, &ctl); osb 4297 fs/ocfs2/dlmglue.c ocfs2_schedule_blocked_lock(osb, lockres); osb 4305 fs/ocfs2/dlmglue.c lockres->l_ops->post_unlock(osb, lockres); osb 4308 fs/ocfs2/dlmglue.c static void ocfs2_schedule_blocked_lock(struct ocfs2_super *osb, osb 4326 fs/ocfs2/dlmglue.c spin_lock_irqsave(&osb->dc_task_lock, flags); osb 4329 fs/ocfs2/dlmglue.c &osb->blocked_lock_list); osb 4330 fs/ocfs2/dlmglue.c osb->blocked_lock_count++; osb 4332 fs/ocfs2/dlmglue.c spin_unlock_irqrestore(&osb->dc_task_lock, flags); osb 4335 fs/ocfs2/dlmglue.c static void ocfs2_downconvert_thread_do_work(struct ocfs2_super *osb) osb 4341 fs/ocfs2/dlmglue.c spin_lock_irqsave(&osb->dc_task_lock, flags); osb 4344 fs/ocfs2/dlmglue.c osb->dc_work_sequence = osb->dc_wake_sequence; osb 4346 fs/ocfs2/dlmglue.c processed = osb->blocked_lock_count; osb 4353 fs/ocfs2/dlmglue.c while (processed && !list_empty(&osb->blocked_lock_list)) { osb 4354 fs/ocfs2/dlmglue.c lockres = list_entry(osb->blocked_lock_list.next, osb 4357 fs/ocfs2/dlmglue.c osb->blocked_lock_count--; osb 4358 fs/ocfs2/dlmglue.c spin_unlock_irqrestore(&osb->dc_task_lock, flags); osb 4363 fs/ocfs2/dlmglue.c ocfs2_process_blocked_lock(osb, lockres); osb 4365 fs/ocfs2/dlmglue.c spin_lock_irqsave(&osb->dc_task_lock, flags); osb 4367 fs/ocfs2/dlmglue.c spin_unlock_irqrestore(&osb->dc_task_lock, flags); osb 4370 fs/ocfs2/dlmglue.c static int ocfs2_downconvert_thread_lists_empty(struct ocfs2_super *osb) osb 4375 fs/ocfs2/dlmglue.c spin_lock_irqsave(&osb->dc_task_lock, flags); osb 4376 fs/ocfs2/dlmglue.c if (list_empty(&osb->blocked_lock_list)) osb 4379 fs/ocfs2/dlmglue.c spin_unlock_irqrestore(&osb->dc_task_lock, flags); osb 4383 fs/ocfs2/dlmglue.c static int ocfs2_downconvert_thread_should_wake(struct ocfs2_super *osb) osb 4388 fs/ocfs2/dlmglue.c spin_lock_irqsave(&osb->dc_task_lock, flags); osb 4389 fs/ocfs2/dlmglue.c if (osb->dc_work_sequence != osb->dc_wake_sequence) osb 4391 fs/ocfs2/dlmglue.c spin_unlock_irqrestore(&osb->dc_task_lock, flags); osb 4398 fs/ocfs2/dlmglue.c struct ocfs2_super *osb = arg; osb 4403 fs/ocfs2/dlmglue.c ocfs2_downconvert_thread_lists_empty(osb))) { osb 4405 fs/ocfs2/dlmglue.c wait_event_interruptible(osb->dc_event, osb 4406 fs/ocfs2/dlmglue.c ocfs2_downconvert_thread_should_wake(osb) || osb 4411 fs/ocfs2/dlmglue.c ocfs2_downconvert_thread_do_work(osb); osb 4414 fs/ocfs2/dlmglue.c osb->dc_task = NULL; osb 4418 fs/ocfs2/dlmglue.c void ocfs2_wake_downconvert_thread(struct ocfs2_super *osb) osb 4422 fs/ocfs2/dlmglue.c spin_lock_irqsave(&osb->dc_task_lock, flags); osb 4425 fs/ocfs2/dlmglue.c osb->dc_wake_sequence++; osb 4426 fs/ocfs2/dlmglue.c spin_unlock_irqrestore(&osb->dc_task_lock, flags); osb 4427 fs/ocfs2/dlmglue.c wake_up(&osb->dc_event); osb 107 fs/ocfs2/dlmglue.h int ocfs2_dlm_init(struct ocfs2_super *osb); osb 108 fs/ocfs2/dlmglue.h void ocfs2_dlm_shutdown(struct ocfs2_super *osb, int hangup_pending); osb 123 fs/ocfs2/dlmglue.h struct ocfs2_super *osb, u64 ref_blkno, osb 159 fs/ocfs2/dlmglue.h int ocfs2_super_lock(struct ocfs2_super *osb, osb 161 fs/ocfs2/dlmglue.h void ocfs2_super_unlock(struct ocfs2_super *osb, osb 163 fs/ocfs2/dlmglue.h int ocfs2_orphan_scan_lock(struct ocfs2_super *osb, u32 *seqno); osb 164 fs/ocfs2/dlmglue.h void ocfs2_orphan_scan_unlock(struct ocfs2_super *osb, u32 seqno); osb 166 fs/ocfs2/dlmglue.h int ocfs2_rename_lock(struct ocfs2_super *osb); osb 167 fs/ocfs2/dlmglue.h void ocfs2_rename_unlock(struct ocfs2_super *osb); osb 168 fs/ocfs2/dlmglue.h int ocfs2_nfs_sync_lock(struct ocfs2_super *osb, int ex); osb 169 fs/ocfs2/dlmglue.h void ocfs2_nfs_sync_unlock(struct ocfs2_super *osb, int ex); osb 170 fs/ocfs2/dlmglue.h void ocfs2_trim_fs_lock_res_init(struct ocfs2_super *osb); osb 171 fs/ocfs2/dlmglue.h void ocfs2_trim_fs_lock_res_uninit(struct ocfs2_super *osb); osb 172 fs/ocfs2/dlmglue.h int ocfs2_trim_fs_lock(struct ocfs2_super *osb, osb 174 fs/ocfs2/dlmglue.h void ocfs2_trim_fs_unlock(struct ocfs2_super *osb, osb 187 fs/ocfs2/dlmglue.h void ocfs2_mark_lockres_freeing(struct ocfs2_super *osb, osb 189 fs/ocfs2/dlmglue.h void ocfs2_simple_drop_lockres(struct ocfs2_super *osb, osb 193 fs/ocfs2/dlmglue.h void ocfs2_wake_downconvert_thread(struct ocfs2_super *osb); osb 40 fs/ocfs2/export.c struct ocfs2_super *osb = OCFS2_SB(sb); osb 64 fs/ocfs2/export.c status = ocfs2_nfs_sync_lock(osb, 1); osb 70 fs/ocfs2/export.c status = ocfs2_test_inode_bit(osb, blkno, &set); osb 91 fs/ocfs2/export.c inode = ocfs2_iget(osb, blkno, 0, 0); osb 94 fs/ocfs2/export.c ocfs2_nfs_sync_unlock(osb, 1); osb 744 fs/ocfs2/extent_map.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 770 fs/ocfs2/extent_map.c cpos = map_start >> osb->s_clustersize_bits; osb 796 fs/ocfs2/extent_map.c len_bytes = (u64)le16_to_cpu(rec.e_leaf_clusters) << osb->s_clustersize_bits; osb 797 fs/ocfs2/extent_map.c phys_bytes = le64_to_cpu(rec.e_blkno) << osb->sb->s_blocksize_bits; osb 798 fs/ocfs2/extent_map.c virt_bytes = (u64)le32_to_cpu(rec.e_cpos) << osb->s_clustersize_bits; osb 828 fs/ocfs2/extent_map.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 838 fs/ocfs2/extent_map.c cpos = map_start >> osb->s_clustersize_bits; osb 73 fs/ocfs2/file.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 76 fs/ocfs2/file.c ocfs2_simple_drop_lockres(osb, &fp->fp_flock); osb 171 fs/ocfs2/file.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 173 fs/ocfs2/file.c journal_t *journal = osb->journal->j_journal; osb 184 fs/ocfs2/file.c if (ocfs2_is_hard_readonly(osb) || ocfs2_is_soft_readonly(osb)) osb 212 fs/ocfs2/file.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 214 fs/ocfs2/file.c if (ocfs2_is_hard_readonly(osb) || ocfs2_is_soft_readonly(osb)) osb 245 fs/ocfs2/file.c if ((now.tv_sec - inode->i_atime.tv_sec <= osb->s_atime_quantum)) osb 255 fs/ocfs2/file.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 259 fs/ocfs2/file.c handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); osb 285 fs/ocfs2/file.c ocfs2_commit_trans(osb, handle); osb 316 fs/ocfs2/file.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 319 fs/ocfs2/file.c handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); osb 332 fs/ocfs2/file.c ocfs2_commit_trans(osb, handle); osb 370 fs/ocfs2/file.c static int ocfs2_orphan_for_truncate(struct ocfs2_super *osb, osb 394 fs/ocfs2/file.c handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); osb 431 fs/ocfs2/file.c ocfs2_commit_trans(osb, handle); osb 442 fs/ocfs2/file.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 471 fs/ocfs2/file.c ocfs2_resv_discard(&osb->osb_la_resmap, osb 497 fs/ocfs2/file.c status = ocfs2_orphan_for_truncate(osb, inode, di_bh, new_i_size); osb 503 fs/ocfs2/file.c status = ocfs2_commit_truncate(osb, inode, di_bh); osb 530 fs/ocfs2/file.c int ocfs2_add_inode_data(struct ocfs2_super *osb, osb 565 fs/ocfs2/file.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 573 fs/ocfs2/file.c BUG_ON(mark_unwritten && !ocfs2_sparse_alloc(osb)); osb 593 fs/ocfs2/file.c credits = ocfs2_calc_extend_credits(osb->sb, &fe->id2.i_list); osb 594 fs/ocfs2/file.c handle = ocfs2_start_trans(osb, credits); osb 610 fs/ocfs2/file.c ocfs2_clusters_to_bytes(osb->sb, clusters_to_add)); osb 627 fs/ocfs2/file.c status = ocfs2_add_inode_data(osb, osb 650 fs/ocfs2/file.c ocfs2_clusters_to_bytes(osb->sb, clusters_to_add)); osb 681 fs/ocfs2/file.c ocfs2_clusters_to_bytes(osb->sb, clusters_to_add)); osb 683 fs/ocfs2/file.c ocfs2_commit_trans(osb, handle); osb 713 fs/ocfs2/file.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 720 fs/ocfs2/file.c handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); osb 742 fs/ocfs2/file.c ocfs2_commit_trans(osb, handle); osb 1121 fs/ocfs2/file.c struct ocfs2_super *osb = OCFS2_SB(sb); osb 1247 fs/ocfs2/file.c handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS + osb 1258 fs/ocfs2/file.c handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); osb 1274 fs/ocfs2/file.c ocfs2_commit_trans(osb, handle); osb 1306 fs/ocfs2/file.c struct ocfs2_super *osb = sb->s_fs_info; osb 1327 fs/ocfs2/file.c stat->blksize = osb->s_clustersize; osb 1370 fs/ocfs2/file.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 1377 fs/ocfs2/file.c handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); osb 1402 fs/ocfs2/file.c ocfs2_commit_trans(osb, handle); osb 1514 fs/ocfs2/file.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 1520 fs/ocfs2/file.c end = end & ~(osb->s_clustersize - 1); osb 1534 fs/ocfs2/file.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 1535 fs/ocfs2/file.c unsigned int csize = osb->s_clustersize; osb 1557 fs/ocfs2/file.c handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); osb 1576 fs/ocfs2/file.c tmpend = (u64)osb->s_clustersize + osb 1577 fs/ocfs2/file.c (start & ~(osb->s_clustersize - 1)); osb 1597 fs/ocfs2/file.c start = end & ~(osb->s_clustersize - 1); osb 1608 fs/ocfs2/file.c ocfs2_commit_trans(osb, handle); osb 1700 fs/ocfs2/file.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 1759 fs/ocfs2/file.c trunc_start = ocfs2_clusters_for_bytes(osb->sb, byte_start); osb 1760 fs/ocfs2/file.c trunc_end = (byte_start + byte_len) >> osb->s_clustersize_bits; osb 1848 fs/ocfs2/file.c ocfs2_schedule_truncate_log_flush(osb, 1); osb 1849 fs/ocfs2/file.c ocfs2_run_deallocs(osb, &dealloc); osb 1865 fs/ocfs2/file.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 1870 fs/ocfs2/file.c if (ocfs2_is_hard_readonly(osb) || ocfs2_is_soft_readonly(osb)) osb 1965 fs/ocfs2/file.c handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); osb 1983 fs/ocfs2/file.c ocfs2_commit_trans(osb, handle); osb 2000 fs/ocfs2/file.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 2004 fs/ocfs2/file.c !ocfs2_writes_unwritten_extents(osb)) osb 2007 fs/ocfs2/file.c !ocfs2_sparse_alloc(osb)) osb 2028 fs/ocfs2/file.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 2035 fs/ocfs2/file.c if (!ocfs2_writes_unwritten_extents(osb)) osb 2284 fs/ocfs2/file.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 2285 fs/ocfs2/file.c int full_coherency = !(osb->s_mount_opt & osb 2406 fs/ocfs2/file.c ret = jbd2_journal_force_commit(osb->journal->j_journal); osb 2569 fs/ocfs2/file.c struct ocfs2_super *osb = OCFS2_SB(inode_in->i_sb); osb 2577 fs/ocfs2/file.c if (!ocfs2_refcount_tree(osb)) osb 2579 fs/ocfs2/file.c if (ocfs2_is_hard_readonly(osb) || ocfs2_is_soft_readonly(osb)) osb 30 fs/ocfs2/file.h int ocfs2_add_inode_data(struct ocfs2_super *osb, osb 167 fs/ocfs2/filecheck.c int ocfs2_filecheck_create_sysfs(struct ocfs2_super *osb) osb 171 fs/ocfs2/filecheck.c struct ocfs2_filecheck_sysfs_entry *entry = &osb->osb_fc_ent; osb 183 fs/ocfs2/filecheck.c entry->fs_kobj.kset = osb->osb_dev_kset; osb 197 fs/ocfs2/filecheck.c void ocfs2_filecheck_remove_sysfs(struct ocfs2_super *osb) osb 199 fs/ocfs2/filecheck.c if (!osb->osb_fc_ent.fs_fcheck) osb 202 fs/ocfs2/filecheck.c kobject_del(&osb->osb_fc_ent.fs_kobj); osb 203 fs/ocfs2/filecheck.c kobject_put(&osb->osb_fc_ent.fs_kobj); osb 204 fs/ocfs2/filecheck.c wait_for_completion(&osb->osb_fc_ent.fs_kobj_unregister); osb 205 fs/ocfs2/filecheck.c ocfs2_filecheck_sysfs_free(&osb->osb_fc_ent); osb 411 fs/ocfs2/filecheck.c ocfs2_filecheck_handle(struct ocfs2_super *osb, osb 418 fs/ocfs2/filecheck.c inode = ocfs2_iget(osb, ino, flags, 0); osb 436 fs/ocfs2/filecheck.c struct ocfs2_super *osb = container_of(ent, struct ocfs2_super, osb 440 fs/ocfs2/filecheck.c entry->fe_status = ocfs2_filecheck_handle(osb, osb 443 fs/ocfs2/filecheck.c entry->fe_status = ocfs2_filecheck_handle(osb, osb 63 fs/ocfs2/filecheck.h int ocfs2_filecheck_create_sysfs(struct ocfs2_super *osb); osb 64 fs/ocfs2/filecheck.h void ocfs2_filecheck_remove_sysfs(struct ocfs2_super *osb); osb 43 fs/ocfs2/heartbeat.c void ocfs2_init_node_maps(struct ocfs2_super *osb) osb 45 fs/ocfs2/heartbeat.c spin_lock_init(&osb->node_map_lock); osb 46 fs/ocfs2/heartbeat.c ocfs2_node_map_init(&osb->osb_recovering_orphan_dirs); osb 51 fs/ocfs2/heartbeat.c struct ocfs2_super *osb = data; osb 53 fs/ocfs2/heartbeat.c BUG_ON(osb->node_num == node_num); osb 57 fs/ocfs2/heartbeat.c if (!osb->cconn) { osb 67 fs/ocfs2/heartbeat.c ocfs2_recovery_thread(osb, node_num); osb 76 fs/ocfs2/heartbeat.c void ocfs2_node_map_set_bit(struct ocfs2_super *osb, osb 83 fs/ocfs2/heartbeat.c spin_lock(&osb->node_map_lock); osb 85 fs/ocfs2/heartbeat.c spin_unlock(&osb->node_map_lock); osb 94 fs/ocfs2/heartbeat.c void ocfs2_node_map_clear_bit(struct ocfs2_super *osb, osb 101 fs/ocfs2/heartbeat.c spin_lock(&osb->node_map_lock); osb 103 fs/ocfs2/heartbeat.c spin_unlock(&osb->node_map_lock); osb 106 fs/ocfs2/heartbeat.c int ocfs2_node_map_test_bit(struct ocfs2_super *osb, osb 115 fs/ocfs2/heartbeat.c spin_lock(&osb->node_map_lock); osb 117 fs/ocfs2/heartbeat.c spin_unlock(&osb->node_map_lock); osb 15 fs/ocfs2/heartbeat.h void ocfs2_init_node_maps(struct ocfs2_super *osb); osb 21 fs/ocfs2/heartbeat.h void ocfs2_node_map_set_bit(struct ocfs2_super *osb, osb 24 fs/ocfs2/heartbeat.h void ocfs2_node_map_clear_bit(struct ocfs2_super *osb, osb 27 fs/ocfs2/heartbeat.h int ocfs2_node_map_test_bit(struct ocfs2_super *osb, osb 61 fs/ocfs2/inode.c static int ocfs2_truncate_for_delete(struct ocfs2_super *osb, osb 123 fs/ocfs2/inode.c struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno, unsigned flags, osb 128 fs/ocfs2/inode.c struct super_block *sb = osb->sb; osb 266 fs/ocfs2/inode.c struct ocfs2_super *osb; osb 270 fs/ocfs2/inode.c osb = OCFS2_SB(sb); osb 272 fs/ocfs2/inode.c if ((osb->s_mount_opt & OCFS2_MOUNT_LOCALFLOCKS) || osb 273 fs/ocfs2/inode.c ocfs2_mount_local(osb) || !ocfs2_stack_supports_plocks()) osb 285 fs/ocfs2/inode.c BUG_ON(le32_to_cpu(fe->i_fs_generation) != osb->fs_generation); osb 407 fs/ocfs2/inode.c struct ocfs2_super *osb; osb 415 fs/ocfs2/inode.c osb = OCFS2_SB(sb); osb 448 fs/ocfs2/inode.c && !ocfs2_mount_local(osb); osb 461 fs/ocfs2/inode.c generation = osb->fs_generation; osb 505 fs/ocfs2/inode.c status = ocfs2_read_blocks_sync(osb, args->fi_blkno, 1, &bh); osb 513 fs/ocfs2/inode.c osb->sb, bh); osb 516 fs/ocfs2/inode.c osb->sb, bh); osb 519 fs/ocfs2/inode.c osb->sb, bh); osb 554 fs/ocfs2/inode.c status = ocfs2_write_block(osb, bh, INODE_CACHE(inode)); osb 580 fs/ocfs2/inode.c static int ocfs2_truncate_for_delete(struct ocfs2_super *osb, osb 598 fs/ocfs2/inode.c handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); osb 622 fs/ocfs2/inode.c ocfs2_commit_trans(osb, handle); osb 625 fs/ocfs2/inode.c status = ocfs2_commit_truncate(osb, inode, fe_bh); osb 632 fs/ocfs2/inode.c ocfs2_commit_trans(osb, handle); osb 645 fs/ocfs2/inode.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 649 fs/ocfs2/inode.c ocfs2_get_system_file_inode(osb, INODE_ALLOC_SYSTEM_INODE, osb 666 fs/ocfs2/inode.c handle = ocfs2_start_trans(osb, OCFS2_DELETE_INODE_CREDITS + osb 675 fs/ocfs2/inode.c status = ocfs2_orphan_del(osb, handle, orphan_dir_inode, inode, osb 704 fs/ocfs2/inode.c ocfs2_commit_trans(osb, handle); osb 721 fs/ocfs2/inode.c static int ocfs2_check_orphan_recovery_state(struct ocfs2_super *osb, osb 726 fs/ocfs2/inode.c spin_lock(&osb->osb_lock); osb 727 fs/ocfs2/inode.c if (ocfs2_node_map_test_bit(osb, &osb->osb_recovering_orphan_dirs, slot)) { osb 733 fs/ocfs2/inode.c osb->osb_orphan_wipes[slot]++; osb 735 fs/ocfs2/inode.c spin_unlock(&osb->osb_lock); osb 740 fs/ocfs2/inode.c static void ocfs2_signal_wipe_completion(struct ocfs2_super *osb, osb 743 fs/ocfs2/inode.c spin_lock(&osb->osb_lock); osb 744 fs/ocfs2/inode.c osb->osb_orphan_wipes[slot]--; osb 745 fs/ocfs2/inode.c spin_unlock(&osb->osb_lock); osb 747 fs/ocfs2/inode.c wake_up(&osb->osb_wipe_event); osb 756 fs/ocfs2/inode.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 762 fs/ocfs2/inode.c status = ocfs2_check_orphan_recovery_state(osb, orphaned_slot); osb 766 fs/ocfs2/inode.c orphan_dir_inode = ocfs2_get_system_file_inode(osb, osb 792 fs/ocfs2/inode.c status = ocfs2_truncate_for_delete(osb, inode, di_bh); osb 834 fs/ocfs2/inode.c ocfs2_signal_wipe_completion(osb, orphaned_slot); osb 845 fs/ocfs2/inode.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 847 fs/ocfs2/inode.c trace_ocfs2_inode_is_valid_to_delete(current, osb->dc_task, osb 853 fs/ocfs2/inode.c if (inode == osb->root_inode) { osb 865 fs/ocfs2/inode.c if (current == osb->dc_task) osb 1116 fs/ocfs2/inode.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 1122 fs/ocfs2/inode.c mlog_bug_on_msg(osb == NULL, osb 1133 fs/ocfs2/inode.c ocfs2_mark_lockres_freeing(osb, &oi->ip_rw_lockres); osb 1134 fs/ocfs2/inode.c ocfs2_mark_lockres_freeing(osb, &oi->ip_inode_lockres); osb 1135 fs/ocfs2/inode.c ocfs2_mark_lockres_freeing(osb, &oi->ip_open_lockres); osb 1137 fs/ocfs2/inode.c ocfs2_resv_discard(&osb->osb_la_resmap, osb 1210 fs/ocfs2/inode.c jbd2_journal_release_jbd_inode(osb->journal->j_journal, osb 130 fs/ocfs2/inode.h struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 feoff, unsigned flags, osb 84 fs/ocfs2/ioctl.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 113 fs/ocfs2/ioctl.c handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); osb 127 fs/ocfs2/ioctl.c ocfs2_commit_trans(osb, handle); osb 161 fs/ocfs2/ioctl.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 166 fs/ocfs2/ioctl.c oic.ic_clustersize = osb->s_clustersize; osb 180 fs/ocfs2/ioctl.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 185 fs/ocfs2/ioctl.c oim.im_max_slots = osb->max_slots; osb 199 fs/ocfs2/ioctl.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 204 fs/ocfs2/ioctl.c memcpy(oil.il_label, osb->vol_label, OCFS2_MAX_VOL_LABEL_LEN); osb 218 fs/ocfs2/ioctl.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 223 fs/ocfs2/ioctl.c memcpy(oiu.iu_uuid_str, osb->uuid_str, OCFS2_TEXT_UUID_LEN + 1); osb 237 fs/ocfs2/ioctl.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 242 fs/ocfs2/ioctl.c oif.if_compat_features = osb->s_feature_compat; osb 243 fs/ocfs2/ioctl.c oif.if_incompat_features = osb->s_feature_incompat; osb 244 fs/ocfs2/ioctl.c oif.if_ro_compat_features = osb->s_feature_ro_compat; osb 258 fs/ocfs2/ioctl.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 263 fs/ocfs2/ioctl.c oij.ij_journal_size = i_size_read(osb->journal->j_inode); osb 273 fs/ocfs2/ioctl.c static int ocfs2_info_scan_inode_alloc(struct ocfs2_super *osb, osb 294 fs/ocfs2/ioctl.c status = ocfs2_read_blocks_sync(osb, blkno, 1, &bh); osb 329 fs/ocfs2/ioctl.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 344 fs/ocfs2/ioctl.c oifi->ifi_slotnum = osb->max_slots; osb 348 fs/ocfs2/ioctl.c inode_alloc = ocfs2_get_system_file_inode(osb, type, i); osb 359 fs/ocfs2/ioctl.c status = ocfs2_lookup_ino_from_name(osb->sys_root_inode, osb 369 fs/ocfs2/ioctl.c status = ocfs2_info_scan_inode_alloc(osb, inode_alloc, blkno, oifi, i); osb 428 fs/ocfs2/ioctl.c static int ocfs2_info_freefrag_scan_chain(struct ocfs2_super *osb, osb 464 fs/ocfs2/ioctl.c status = ocfs2_read_blocks_sync(osb, blkno, 1, &bh); osb 531 fs/ocfs2/ioctl.c static int ocfs2_info_freefrag_scan_bitmap(struct ocfs2_super *osb, osb 554 fs/ocfs2/ioctl.c status = ocfs2_read_blocks_sync(osb, blkno, 1, &bh); osb 585 fs/ocfs2/ioctl.c status = ocfs2_info_freefrag_scan_chain(osb, gb_inode, osb 617 fs/ocfs2/ioctl.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 641 fs/ocfs2/ioctl.c gb_inode = ocfs2_get_system_file_inode(osb, type, osb 651 fs/ocfs2/ioctl.c status = ocfs2_lookup_ino_from_name(osb->sys_root_inode, osb 661 fs/ocfs2/ioctl.c status = ocfs2_info_freefrag_scan_bitmap(osb, gb_inode, blkno, oiff); osb 50 fs/ocfs2/journal.c static int ocfs2_recover_node(struct ocfs2_super *osb, osb 53 fs/ocfs2/journal.c static int ocfs2_commit_cache(struct ocfs2_super *osb); osb 54 fs/ocfs2/journal.c static int __ocfs2_wait_on_mount(struct ocfs2_super *osb, int quota); osb 55 fs/ocfs2/journal.c static int ocfs2_journal_toggle_dirty(struct ocfs2_super *osb, osb 57 fs/ocfs2/journal.c static int ocfs2_trylock_journal(struct ocfs2_super *osb, osb 59 fs/ocfs2/journal.c static int ocfs2_recover_orphans(struct ocfs2_super *osb, osb 70 fs/ocfs2/journal.c static inline int ocfs2_wait_on_mount(struct ocfs2_super *osb) osb 72 fs/ocfs2/journal.c return __ocfs2_wait_on_mount(osb, 0); osb 75 fs/ocfs2/journal.c static inline int ocfs2_wait_on_quotas(struct ocfs2_super *osb) osb 77 fs/ocfs2/journal.c return __ocfs2_wait_on_mount(osb, 1); osb 97 fs/ocfs2/journal.c static void ocfs2_replay_map_set_state(struct ocfs2_super *osb, int state) osb 99 fs/ocfs2/journal.c if (!osb->replay_map) osb 103 fs/ocfs2/journal.c if (osb->replay_map->rm_state == REPLAY_DONE) osb 106 fs/ocfs2/journal.c osb->replay_map->rm_state = state; osb 109 fs/ocfs2/journal.c int ocfs2_compute_replay_slots(struct ocfs2_super *osb) osb 115 fs/ocfs2/journal.c if (osb->replay_map) osb 119 fs/ocfs2/journal.c (osb->max_slots * sizeof(char)), GFP_KERNEL); osb 126 fs/ocfs2/journal.c spin_lock(&osb->osb_lock); osb 128 fs/ocfs2/journal.c replay_map->rm_slots = osb->max_slots; osb 133 fs/ocfs2/journal.c if (ocfs2_slot_to_node_num_locked(osb, i, &node_num) == -ENOENT) osb 137 fs/ocfs2/journal.c osb->replay_map = replay_map; osb 138 fs/ocfs2/journal.c spin_unlock(&osb->osb_lock); osb 142 fs/ocfs2/journal.c static void ocfs2_queue_replay_slots(struct ocfs2_super *osb, osb 145 fs/ocfs2/journal.c struct ocfs2_replay_map *replay_map = osb->replay_map; osb 156 fs/ocfs2/journal.c ocfs2_queue_recovery_completion(osb->journal, i, NULL, osb 162 fs/ocfs2/journal.c static void ocfs2_free_replay_slots(struct ocfs2_super *osb) osb 164 fs/ocfs2/journal.c struct ocfs2_replay_map *replay_map = osb->replay_map; osb 166 fs/ocfs2/journal.c if (!osb->replay_map) osb 170 fs/ocfs2/journal.c osb->replay_map = NULL; osb 173 fs/ocfs2/journal.c int ocfs2_recovery_init(struct ocfs2_super *osb) osb 177 fs/ocfs2/journal.c mutex_init(&osb->recovery_lock); osb 178 fs/ocfs2/journal.c osb->disable_recovery = 0; osb 179 fs/ocfs2/journal.c osb->recovery_thread_task = NULL; osb 180 fs/ocfs2/journal.c init_waitqueue_head(&osb->recovery_event); osb 183 fs/ocfs2/journal.c osb->max_slots * sizeof(unsigned int), osb 192 fs/ocfs2/journal.c osb->recovery_map = rm; osb 200 fs/ocfs2/journal.c static int ocfs2_recovery_thread_running(struct ocfs2_super *osb) osb 203 fs/ocfs2/journal.c return osb->recovery_thread_task != NULL; osb 206 fs/ocfs2/journal.c void ocfs2_recovery_exit(struct ocfs2_super *osb) osb 212 fs/ocfs2/journal.c mutex_lock(&osb->recovery_lock); osb 213 fs/ocfs2/journal.c osb->disable_recovery = 1; osb 214 fs/ocfs2/journal.c mutex_unlock(&osb->recovery_lock); osb 215 fs/ocfs2/journal.c wait_event(osb->recovery_event, !ocfs2_recovery_thread_running(osb)); osb 220 fs/ocfs2/journal.c if (osb->ocfs2_wq) osb 221 fs/ocfs2/journal.c flush_workqueue(osb->ocfs2_wq); osb 227 fs/ocfs2/journal.c rm = osb->recovery_map; osb 233 fs/ocfs2/journal.c static int __ocfs2_recovery_map_test(struct ocfs2_super *osb, osb 237 fs/ocfs2/journal.c struct ocfs2_recovery_map *rm = osb->recovery_map; osb 239 fs/ocfs2/journal.c assert_spin_locked(&osb->osb_lock); osb 250 fs/ocfs2/journal.c static int ocfs2_recovery_map_set(struct ocfs2_super *osb, osb 253 fs/ocfs2/journal.c struct ocfs2_recovery_map *rm = osb->recovery_map; osb 255 fs/ocfs2/journal.c spin_lock(&osb->osb_lock); osb 256 fs/ocfs2/journal.c if (__ocfs2_recovery_map_test(osb, node_num)) { osb 257 fs/ocfs2/journal.c spin_unlock(&osb->osb_lock); osb 262 fs/ocfs2/journal.c BUG_ON(rm->rm_used >= osb->max_slots); osb 266 fs/ocfs2/journal.c spin_unlock(&osb->osb_lock); osb 271 fs/ocfs2/journal.c static void ocfs2_recovery_map_clear(struct ocfs2_super *osb, osb 275 fs/ocfs2/journal.c struct ocfs2_recovery_map *rm = osb->recovery_map; osb 277 fs/ocfs2/journal.c spin_lock(&osb->osb_lock); osb 291 fs/ocfs2/journal.c spin_unlock(&osb->osb_lock); osb 294 fs/ocfs2/journal.c static int ocfs2_commit_cache(struct ocfs2_super *osb) osb 300 fs/ocfs2/journal.c journal = osb->journal; osb 329 fs/ocfs2/journal.c ocfs2_wake_downconvert_thread(osb); osb 335 fs/ocfs2/journal.c handle_t *ocfs2_start_trans(struct ocfs2_super *osb, int max_buffs) osb 337 fs/ocfs2/journal.c journal_t *journal = osb->journal->j_journal; osb 340 fs/ocfs2/journal.c BUG_ON(!osb || !osb->journal->j_journal); osb 342 fs/ocfs2/journal.c if (ocfs2_is_hard_readonly(osb)) osb 345 fs/ocfs2/journal.c BUG_ON(osb->journal->j_state == OCFS2_JOURNAL_FREE); osb 352 fs/ocfs2/journal.c sb_start_intwrite(osb->sb); osb 354 fs/ocfs2/journal.c down_read(&osb->journal->j_trans_barrier); osb 358 fs/ocfs2/journal.c up_read(&osb->journal->j_trans_barrier); osb 359 fs/ocfs2/journal.c sb_end_intwrite(osb->sb); osb 364 fs/ocfs2/journal.c ocfs2_abort(osb->sb, "Detected aborted journal\n"); osb 368 fs/ocfs2/journal.c if (!ocfs2_mount_local(osb)) osb 369 fs/ocfs2/journal.c atomic_inc(&(osb->journal->j_num_trans)); osb 375 fs/ocfs2/journal.c int ocfs2_commit_trans(struct ocfs2_super *osb, osb 379 fs/ocfs2/journal.c struct ocfs2_journal *journal = osb->journal; osb 390 fs/ocfs2/journal.c sb_end_intwrite(osb->sb); osb 642 fs/ocfs2/journal.c struct ocfs2_super *osb = osb 672 fs/ocfs2/journal.c return ocfs2_error(osb->sb, "A previous attempt to " osb 684 fs/ocfs2/journal.c ocfs2_set_ci_lock_trans(osb->journal, ci); osb 701 fs/ocfs2/journal.c if (!status && ocfs2_meta_ecc(osb) && triggers) osb 798 fs/ocfs2/journal.c void ocfs2_set_journal_params(struct ocfs2_super *osb) osb 800 fs/ocfs2/journal.c journal_t *journal = osb->journal->j_journal; osb 803 fs/ocfs2/journal.c if (osb->osb_commit_interval) osb 804 fs/ocfs2/journal.c commit_interval = osb->osb_commit_interval; osb 808 fs/ocfs2/journal.c if (osb->s_mount_opt & OCFS2_MOUNT_BARRIER) osb 822 fs/ocfs2/journal.c struct ocfs2_super *osb; osb 827 fs/ocfs2/journal.c osb = journal->j_osb; osb 830 fs/ocfs2/journal.c inode = ocfs2_get_system_file_inode(osb, JOURNAL_SYSTEM_INODE, osb 831 fs/ocfs2/journal.c osb->slot_num); osb 889 fs/ocfs2/journal.c ocfs2_set_journal_params(osb); osb 918 fs/ocfs2/journal.c static int ocfs2_journal_toggle_dirty(struct ocfs2_super *osb, osb 923 fs/ocfs2/journal.c struct ocfs2_journal *journal = osb->journal; osb 944 fs/ocfs2/journal.c ocfs2_compute_meta_ecc(osb->sb, bh->b_data, &fe->i_check); osb 945 fs/ocfs2/journal.c status = ocfs2_write_block(osb, bh, INODE_CACHE(journal->j_inode)); osb 956 fs/ocfs2/journal.c void ocfs2_journal_shutdown(struct ocfs2_super *osb) osb 963 fs/ocfs2/journal.c BUG_ON(!osb); osb 965 fs/ocfs2/journal.c journal = osb->journal; osb 978 fs/ocfs2/journal.c num_running_trans = atomic_read(&(osb->journal->j_num_trans)); osb 990 fs/ocfs2/journal.c if (osb->commit_task) { osb 992 fs/ocfs2/journal.c trace_ocfs2_journal_shutdown_wait(osb->commit_task); osb 993 fs/ocfs2/journal.c kthread_stop(osb->commit_task); osb 994 fs/ocfs2/journal.c osb->commit_task = NULL; osb 997 fs/ocfs2/journal.c BUG_ON(atomic_read(&(osb->journal->j_num_trans)) != 0); osb 999 fs/ocfs2/journal.c if (ocfs2_mount_local(osb)) { osb 1013 fs/ocfs2/journal.c status = ocfs2_journal_toggle_dirty(osb, 0, 0); osb 1055 fs/ocfs2/journal.c struct ocfs2_super *osb; osb 1059 fs/ocfs2/journal.c osb = journal->j_osb; osb 1067 fs/ocfs2/journal.c ocfs2_clear_journal_error(osb->sb, journal->j_journal, osb->slot_num); osb 1077 fs/ocfs2/journal.c status = ocfs2_journal_toggle_dirty(osb, 1, replayed); osb 1085 fs/ocfs2/journal.c osb->commit_task = kthread_run(ocfs2_commit_thread, osb, osb 1086 fs/ocfs2/journal.c "ocfs2cmt-%s", osb->uuid_str); osb 1087 fs/ocfs2/journal.c if (IS_ERR(osb->commit_task)) { osb 1088 fs/ocfs2/journal.c status = PTR_ERR(osb->commit_task); osb 1089 fs/ocfs2/journal.c osb->commit_task = NULL; osb 1095 fs/ocfs2/journal.c osb->commit_task = NULL; osb 1124 fs/ocfs2/journal.c static int ocfs2_recovery_completed(struct ocfs2_super *osb) osb 1127 fs/ocfs2/journal.c struct ocfs2_recovery_map *rm = osb->recovery_map; osb 1129 fs/ocfs2/journal.c spin_lock(&osb->osb_lock); osb 1131 fs/ocfs2/journal.c spin_unlock(&osb->osb_lock); osb 1136 fs/ocfs2/journal.c void ocfs2_wait_for_recovery(struct ocfs2_super *osb) osb 1138 fs/ocfs2/journal.c wait_event(osb->recovery_event, ocfs2_recovery_completed(osb)); osb 1157 fs/ocfs2/journal.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 1170 fs/ocfs2/journal.c bh = __find_get_block(osb->sb->s_bdev, p_blkno, osb 1171 fs/ocfs2/journal.c osb->sb->s_blocksize); osb 1181 fs/ocfs2/journal.c status = ocfs2_read_blocks_sync(osb, p_blkno, 1, &bh); osb 1222 fs/ocfs2/journal.c struct ocfs2_super *osb = journal->j_osb; osb 1239 fs/ocfs2/journal.c ocfs2_wait_on_quotas(osb); osb 1252 fs/ocfs2/journal.c ret = ocfs2_complete_local_alloc_recovery(osb, osb 1261 fs/ocfs2/journal.c ret = ocfs2_complete_truncate_log_recovery(osb, osb 1269 fs/ocfs2/journal.c ret = ocfs2_recover_orphans(osb, item->lri_slot, osb 1275 fs/ocfs2/journal.c ret = ocfs2_finish_quota_recovery(osb, qrec, osb 1330 fs/ocfs2/journal.c void ocfs2_complete_mount_recovery(struct ocfs2_super *osb) osb 1332 fs/ocfs2/journal.c struct ocfs2_journal *journal = osb->journal; osb 1334 fs/ocfs2/journal.c if (ocfs2_is_hard_readonly(osb)) osb 1339 fs/ocfs2/journal.c ocfs2_queue_recovery_completion(journal, osb->slot_num, osb 1340 fs/ocfs2/journal.c osb->local_alloc_copy, NULL, NULL, osb 1342 fs/ocfs2/journal.c ocfs2_schedule_truncate_log_flush(osb, 0); osb 1344 fs/ocfs2/journal.c osb->local_alloc_copy = NULL; osb 1347 fs/ocfs2/journal.c ocfs2_replay_map_set_state(osb, REPLAY_NEEDED); osb 1348 fs/ocfs2/journal.c ocfs2_queue_replay_slots(osb, ORPHAN_NEED_TRUNCATE); osb 1349 fs/ocfs2/journal.c ocfs2_free_replay_slots(osb); osb 1352 fs/ocfs2/journal.c void ocfs2_complete_quota_recovery(struct ocfs2_super *osb) osb 1354 fs/ocfs2/journal.c if (osb->quota_rec) { osb 1355 fs/ocfs2/journal.c ocfs2_queue_recovery_completion(osb->journal, osb 1356 fs/ocfs2/journal.c osb->slot_num, osb 1359 fs/ocfs2/journal.c osb->quota_rec, osb 1361 fs/ocfs2/journal.c osb->quota_rec = NULL; osb 1368 fs/ocfs2/journal.c struct ocfs2_super *osb = arg; osb 1369 fs/ocfs2/journal.c struct ocfs2_recovery_map *rm = osb->recovery_map; osb 1375 fs/ocfs2/journal.c int quota_enabled = OCFS2_HAS_RO_COMPAT_FEATURE(osb->sb, osb 1377 fs/ocfs2/journal.c || OCFS2_HAS_RO_COMPAT_FEATURE(osb->sb, osb 1380 fs/ocfs2/journal.c status = ocfs2_wait_on_mount(osb); osb 1386 fs/ocfs2/journal.c rm_quota = kcalloc(osb->max_slots, sizeof(int), GFP_NOFS); osb 1393 fs/ocfs2/journal.c status = ocfs2_super_lock(osb, 1); osb 1399 fs/ocfs2/journal.c status = ocfs2_compute_replay_slots(osb); osb 1404 fs/ocfs2/journal.c ocfs2_queue_recovery_completion(osb->journal, osb->slot_num, NULL, osb 1407 fs/ocfs2/journal.c spin_lock(&osb->osb_lock); osb 1412 fs/ocfs2/journal.c spin_unlock(&osb->osb_lock); osb 1413 fs/ocfs2/journal.c slot_num = ocfs2_node_num_to_slot(osb, node_num); osb 1435 fs/ocfs2/journal.c status = ocfs2_recover_node(osb, node_num, slot_num); osb 1438 fs/ocfs2/journal.c ocfs2_recovery_map_clear(osb, node_num); osb 1443 fs/ocfs2/journal.c MAJOR(osb->sb->s_dev), MINOR(osb->sb->s_dev)); osb 1447 fs/ocfs2/journal.c spin_lock(&osb->osb_lock); osb 1449 fs/ocfs2/journal.c spin_unlock(&osb->osb_lock); osb 1453 fs/ocfs2/journal.c status = ocfs2_check_journals_nolocks(osb); osb 1463 fs/ocfs2/journal.c qrec = ocfs2_begin_quota_recovery(osb, rm_quota[i]); osb 1469 fs/ocfs2/journal.c ocfs2_queue_recovery_completion(osb->journal, osb 1476 fs/ocfs2/journal.c ocfs2_super_unlock(osb, 1); osb 1479 fs/ocfs2/journal.c ocfs2_queue_replay_slots(osb, ORPHAN_NEED_TRUNCATE); osb 1482 fs/ocfs2/journal.c mutex_lock(&osb->recovery_lock); osb 1483 fs/ocfs2/journal.c if (!status && !ocfs2_recovery_completed(osb)) { osb 1484 fs/ocfs2/journal.c mutex_unlock(&osb->recovery_lock); osb 1488 fs/ocfs2/journal.c ocfs2_free_replay_slots(osb); osb 1489 fs/ocfs2/journal.c osb->recovery_thread_task = NULL; osb 1491 fs/ocfs2/journal.c wake_up(&osb->recovery_event); osb 1493 fs/ocfs2/journal.c mutex_unlock(&osb->recovery_lock); osb 1504 fs/ocfs2/journal.c void ocfs2_recovery_thread(struct ocfs2_super *osb, int node_num) osb 1506 fs/ocfs2/journal.c mutex_lock(&osb->recovery_lock); osb 1508 fs/ocfs2/journal.c trace_ocfs2_recovery_thread(node_num, osb->node_num, osb 1509 fs/ocfs2/journal.c osb->disable_recovery, osb->recovery_thread_task, osb 1510 fs/ocfs2/journal.c osb->disable_recovery ? osb 1511 fs/ocfs2/journal.c -1 : ocfs2_recovery_map_set(osb, node_num)); osb 1513 fs/ocfs2/journal.c if (osb->disable_recovery) osb 1516 fs/ocfs2/journal.c if (osb->recovery_thread_task) osb 1519 fs/ocfs2/journal.c osb->recovery_thread_task = kthread_run(__ocfs2_recovery_thread, osb, osb 1520 fs/ocfs2/journal.c "ocfs2rec-%s", osb->uuid_str); osb 1521 fs/ocfs2/journal.c if (IS_ERR(osb->recovery_thread_task)) { osb 1522 fs/ocfs2/journal.c mlog_errno((int)PTR_ERR(osb->recovery_thread_task)); osb 1523 fs/ocfs2/journal.c osb->recovery_thread_task = NULL; osb 1527 fs/ocfs2/journal.c mutex_unlock(&osb->recovery_lock); osb 1528 fs/ocfs2/journal.c wake_up(&osb->recovery_event); osb 1531 fs/ocfs2/journal.c static int ocfs2_read_journal_inode(struct ocfs2_super *osb, osb 1539 fs/ocfs2/journal.c BUG_ON(slot_num >= osb->max_slots); osb 1541 fs/ocfs2/journal.c inode = ocfs2_get_system_file_inode(osb, JOURNAL_SYSTEM_INODE, osb 1569 fs/ocfs2/journal.c static int ocfs2_replay_journal(struct ocfs2_super *osb, osb 1582 fs/ocfs2/journal.c status = ocfs2_read_journal_inode(osb, slot_num, &bh, &inode); osb 1601 fs/ocfs2/journal.c if (osb->slot_recovery_generations[slot_num] != slot_reco_gen) { osb 1603 fs/ocfs2/journal.c osb->slot_recovery_generations[slot_num], slot_reco_gen); osb 1604 fs/ocfs2/journal.c osb->slot_recovery_generations[slot_num] = slot_reco_gen; osb 1628 fs/ocfs2/journal.c osb->slot_recovery_generations[slot_num] = slot_reco_gen; osb 1633 fs/ocfs2/journal.c ocfs2_replay_map_set_state(osb, REPLAY_NEEDED); osb 1636 fs/ocfs2/journal.c "device (%u,%u)\n", node_num, slot_num, MAJOR(osb->sb->s_dev), osb 1637 fs/ocfs2/journal.c MINOR(osb->sb->s_dev)); osb 1663 fs/ocfs2/journal.c ocfs2_clear_journal_error(osb->sb, journal, slot_num); osb 1679 fs/ocfs2/journal.c osb->slot_recovery_generations[slot_num] = osb 1682 fs/ocfs2/journal.c ocfs2_compute_meta_ecc(osb->sb, bh->b_data, &fe->i_check); osb 1683 fs/ocfs2/journal.c status = ocfs2_write_block(osb, bh, INODE_CACHE(inode)); osb 1693 fs/ocfs2/journal.c "device (%u,%u)\n", node_num, slot_num, MAJOR(osb->sb->s_dev), osb 1694 fs/ocfs2/journal.c MINOR(osb->sb->s_dev)); osb 1718 fs/ocfs2/journal.c static int ocfs2_recover_node(struct ocfs2_super *osb, osb 1725 fs/ocfs2/journal.c trace_ocfs2_recover_node(node_num, slot_num, osb->node_num); osb 1729 fs/ocfs2/journal.c BUG_ON(osb->node_num == node_num); osb 1731 fs/ocfs2/journal.c status = ocfs2_replay_journal(osb, node_num, slot_num); osb 1743 fs/ocfs2/journal.c status = ocfs2_begin_local_alloc_recovery(osb, slot_num, &la_copy); osb 1752 fs/ocfs2/journal.c status = ocfs2_begin_truncate_log_recovery(osb, slot_num, &tl_copy); osb 1758 fs/ocfs2/journal.c status = ocfs2_clear_slot(osb, slot_num); osb 1763 fs/ocfs2/journal.c ocfs2_queue_recovery_completion(osb->journal, slot_num, la_copy, osb 1775 fs/ocfs2/journal.c static int ocfs2_trylock_journal(struct ocfs2_super *osb, osb 1781 fs/ocfs2/journal.c inode = ocfs2_get_system_file_inode(osb, JOURNAL_SYSTEM_INODE, osb 1814 fs/ocfs2/journal.c int ocfs2_mark_dead_nodes(struct ocfs2_super *osb) osb 1825 fs/ocfs2/journal.c for (i = 0; i < osb->max_slots; i++) { osb 1827 fs/ocfs2/journal.c status = ocfs2_read_journal_inode(osb, i, &bh, NULL); osb 1837 fs/ocfs2/journal.c spin_lock(&osb->osb_lock); osb 1838 fs/ocfs2/journal.c osb->slot_recovery_generations[i] = gen; osb 1841 fs/ocfs2/journal.c osb->slot_recovery_generations[i]); osb 1843 fs/ocfs2/journal.c if (i == osb->slot_num) { osb 1844 fs/ocfs2/journal.c spin_unlock(&osb->osb_lock); osb 1848 fs/ocfs2/journal.c status = ocfs2_slot_to_node_num_locked(osb, i, &node_num); osb 1850 fs/ocfs2/journal.c spin_unlock(&osb->osb_lock); osb 1854 fs/ocfs2/journal.c if (__ocfs2_recovery_map_test(osb, node_num)) { osb 1855 fs/ocfs2/journal.c spin_unlock(&osb->osb_lock); osb 1858 fs/ocfs2/journal.c spin_unlock(&osb->osb_lock); osb 1863 fs/ocfs2/journal.c status = ocfs2_trylock_journal(osb, i); osb 1868 fs/ocfs2/journal.c ocfs2_recovery_thread(osb, node_num); osb 1921 fs/ocfs2/journal.c static void ocfs2_queue_orphan_scan(struct ocfs2_super *osb) osb 1927 fs/ocfs2/journal.c os = &osb->osb_orphan_scan; osb 1935 fs/ocfs2/journal.c status = ocfs2_orphan_scan_lock(osb, &seqno); osb 1951 fs/ocfs2/journal.c for (i = 0; i < osb->max_slots; i++) osb 1952 fs/ocfs2/journal.c ocfs2_queue_recovery_completion(osb->journal, i, NULL, NULL, osb 1962 fs/ocfs2/journal.c ocfs2_orphan_scan_unlock(osb, seqno); osb 1973 fs/ocfs2/journal.c struct ocfs2_super *osb; osb 1977 fs/ocfs2/journal.c osb = os->os_osb; osb 1980 fs/ocfs2/journal.c ocfs2_queue_orphan_scan(osb); osb 1982 fs/ocfs2/journal.c queue_delayed_work(osb->ocfs2_wq, &os->os_orphan_scan_work, osb 1987 fs/ocfs2/journal.c void ocfs2_orphan_scan_stop(struct ocfs2_super *osb) osb 1991 fs/ocfs2/journal.c os = &osb->osb_orphan_scan; osb 2000 fs/ocfs2/journal.c void ocfs2_orphan_scan_init(struct ocfs2_super *osb) osb 2004 fs/ocfs2/journal.c os = &osb->osb_orphan_scan; osb 2005 fs/ocfs2/journal.c os->os_osb = osb; osb 2012 fs/ocfs2/journal.c void ocfs2_orphan_scan_start(struct ocfs2_super *osb) osb 2016 fs/ocfs2/journal.c os = &osb->osb_orphan_scan; osb 2018 fs/ocfs2/journal.c if (ocfs2_is_hard_readonly(osb) || ocfs2_mount_local(osb)) osb 2022 fs/ocfs2/journal.c queue_delayed_work(osb->ocfs2_wq, &os->os_orphan_scan_work, osb 2030 fs/ocfs2/journal.c struct ocfs2_super *osb; osb 2054 fs/ocfs2/journal.c iter = ocfs2_iget(p->osb, ino, osb 2079 fs/ocfs2/journal.c static int ocfs2_queue_orphans(struct ocfs2_super *osb, osb 2088 fs/ocfs2/journal.c .osb = osb, osb 2093 fs/ocfs2/journal.c orphan_dir_inode = ocfs2_get_system_file_inode(osb, osb 2125 fs/ocfs2/journal.c static int ocfs2_orphan_recovery_can_continue(struct ocfs2_super *osb, osb 2130 fs/ocfs2/journal.c spin_lock(&osb->osb_lock); osb 2131 fs/ocfs2/journal.c ret = !osb->osb_orphan_wipes[slot]; osb 2132 fs/ocfs2/journal.c spin_unlock(&osb->osb_lock); osb 2136 fs/ocfs2/journal.c static void ocfs2_mark_recovering_orphan_dir(struct ocfs2_super *osb, osb 2139 fs/ocfs2/journal.c spin_lock(&osb->osb_lock); osb 2142 fs/ocfs2/journal.c ocfs2_node_map_set_bit(osb, &osb->osb_recovering_orphan_dirs, slot); osb 2143 fs/ocfs2/journal.c while (osb->osb_orphan_wipes[slot]) { osb 2147 fs/ocfs2/journal.c spin_unlock(&osb->osb_lock); osb 2148 fs/ocfs2/journal.c wait_event_interruptible(osb->osb_wipe_event, osb 2149 fs/ocfs2/journal.c ocfs2_orphan_recovery_can_continue(osb, slot)); osb 2150 fs/ocfs2/journal.c spin_lock(&osb->osb_lock); osb 2152 fs/ocfs2/journal.c spin_unlock(&osb->osb_lock); osb 2155 fs/ocfs2/journal.c static void ocfs2_clear_recovering_orphan_dir(struct ocfs2_super *osb, osb 2158 fs/ocfs2/journal.c ocfs2_node_map_clear_bit(osb, &osb->osb_recovering_orphan_dirs, slot); osb 2179 fs/ocfs2/journal.c static int ocfs2_recover_orphans(struct ocfs2_super *osb, osb 2192 fs/ocfs2/journal.c ocfs2_mark_recovering_orphan_dir(osb, slot); osb 2193 fs/ocfs2/journal.c ret = ocfs2_queue_orphans(osb, slot, &inode, orphan_reco_type); osb 2194 fs/ocfs2/journal.c ocfs2_clear_recovering_orphan_dir(osb, slot); osb 2237 fs/ocfs2/journal.c ret = ocfs2_del_inode_from_orphan(osb, inode, osb 2268 fs/ocfs2/journal.c static int __ocfs2_wait_on_mount(struct ocfs2_super *osb, int quota) osb 2273 fs/ocfs2/journal.c wait_event(osb->osb_mount_event, osb 2274 fs/ocfs2/journal.c (!quota && atomic_read(&osb->vol_state) == VOLUME_MOUNTED) || osb 2275 fs/ocfs2/journal.c atomic_read(&osb->vol_state) == VOLUME_MOUNTED_QUOTAS || osb 2276 fs/ocfs2/journal.c atomic_read(&osb->vol_state) == VOLUME_DISABLED); osb 2281 fs/ocfs2/journal.c if (atomic_read(&osb->vol_state) == VOLUME_DISABLED) { osb 2293 fs/ocfs2/journal.c struct ocfs2_super *osb = arg; osb 2294 fs/ocfs2/journal.c struct ocfs2_journal *journal = osb->journal; osb 2303 fs/ocfs2/journal.c wait_event_interruptible(osb->checkpoint_event, osb 2307 fs/ocfs2/journal.c status = ocfs2_commit_cache(osb); osb 2339 fs/ocfs2/journal.c int ocfs2_check_journals_nolocks(struct ocfs2_super *osb) osb 2347 fs/ocfs2/journal.c for(slot = 0; slot < osb->max_slots; slot++) { osb 2348 fs/ocfs2/journal.c ret = ocfs2_read_journal_inode(osb, slot, &di_bh, NULL); osb 2356 fs/ocfs2/journal.c osb->slot_recovery_generations[slot] = osb 135 fs/ocfs2/journal.h static inline void ocfs2_ci_set_new(struct ocfs2_super *osb, osb 139 fs/ocfs2/journal.h ci->ci_created_trans = osb->journal->j_trans_id; osb 144 fs/ocfs2/journal.h void ocfs2_orphan_scan_init(struct ocfs2_super *osb); osb 145 fs/ocfs2/journal.h void ocfs2_orphan_scan_start(struct ocfs2_super *osb); osb 146 fs/ocfs2/journal.h void ocfs2_orphan_scan_stop(struct ocfs2_super *osb); osb 149 fs/ocfs2/journal.h void ocfs2_wait_for_recovery(struct ocfs2_super *osb); osb 151 fs/ocfs2/journal.h int ocfs2_recovery_init(struct ocfs2_super *osb); osb 152 fs/ocfs2/journal.h void ocfs2_recovery_exit(struct ocfs2_super *osb); osb 154 fs/ocfs2/journal.h int ocfs2_compute_replay_slots(struct ocfs2_super *osb); osb 171 fs/ocfs2/journal.h void ocfs2_set_journal_params(struct ocfs2_super *osb); osb 174 fs/ocfs2/journal.h void ocfs2_journal_shutdown(struct ocfs2_super *osb); osb 179 fs/ocfs2/journal.h int ocfs2_check_journals_nolocks(struct ocfs2_super *osb); osb 180 fs/ocfs2/journal.h void ocfs2_recovery_thread(struct ocfs2_super *osb, osb 182 fs/ocfs2/journal.h int ocfs2_mark_dead_nodes(struct ocfs2_super *osb); osb 183 fs/ocfs2/journal.h void ocfs2_complete_mount_recovery(struct ocfs2_super *osb); osb 184 fs/ocfs2/journal.h void ocfs2_complete_quota_recovery(struct ocfs2_super *osb); osb 186 fs/ocfs2/journal.h static inline void ocfs2_start_checkpoint(struct ocfs2_super *osb) osb 188 fs/ocfs2/journal.h wake_up(&osb->checkpoint_event); osb 193 fs/ocfs2/journal.h struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 195 fs/ocfs2/journal.h if (ocfs2_mount_local(osb)) osb 205 fs/ocfs2/journal.h ocfs2_start_checkpoint(osb); osb 207 fs/ocfs2/journal.h wait_event(osb->journal->j_checkpointed, osb 241 fs/ocfs2/journal.h handle_t *ocfs2_start_trans(struct ocfs2_super *osb, osb 243 fs/ocfs2/journal.h int ocfs2_commit_trans(struct ocfs2_super *osb, osb 39 fs/ocfs2/localalloc.c static int ocfs2_local_alloc_find_clear_bits(struct ocfs2_super *osb, osb 46 fs/ocfs2/localalloc.c static int ocfs2_sync_local_to_main(struct ocfs2_super *osb, osb 52 fs/ocfs2/localalloc.c static int ocfs2_local_alloc_reserve_for_window(struct ocfs2_super *osb, osb 57 fs/ocfs2/localalloc.c static int ocfs2_local_alloc_new_window(struct ocfs2_super *osb, osb 61 fs/ocfs2/localalloc.c static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb, osb 103 fs/ocfs2/localalloc.c unsigned int ocfs2_la_default_mb(struct ocfs2_super *osb) osb 109 fs/ocfs2/localalloc.c struct super_block *sb = osb->sb; osb 111 fs/ocfs2/localalloc.c gd_mb = ocfs2_clusters_to_megabytes(osb->sb, osb 112 fs/ocfs2/localalloc.c 8 * ocfs2_group_bitmap_size(sb, 0, osb->s_feature_incompat)); osb 119 fs/ocfs2/localalloc.c if ((sb->s_blocksize == 512 && osb->s_clustersize <= 8192) osb 120 fs/ocfs2/localalloc.c || (sb->s_blocksize == 1024 && osb->s_clustersize == 4096)) osb 166 fs/ocfs2/localalloc.c megs_per_slot = osb->osb_clusters_at_boot / osb->max_slots; osb 167 fs/ocfs2/localalloc.c megs_per_slot = ocfs2_clusters_to_megabytes(osb->sb, megs_per_slot); osb 173 fs/ocfs2/localalloc.c la_max_mb = ocfs2_clusters_to_megabytes(osb->sb, osb 181 fs/ocfs2/localalloc.c void ocfs2_la_set_sizes(struct ocfs2_super *osb, int requested_mb) osb 183 fs/ocfs2/localalloc.c struct super_block *sb = osb->sb; osb 184 fs/ocfs2/localalloc.c unsigned int la_default_mb = ocfs2_la_default_mb(osb); osb 194 fs/ocfs2/localalloc.c osb->local_alloc_default_bits = osb 198 fs/ocfs2/localalloc.c osb->local_alloc_default_bits = osb 201 fs/ocfs2/localalloc.c osb->local_alloc_default_bits = osb 205 fs/ocfs2/localalloc.c osb->local_alloc_bits = osb->local_alloc_default_bits; osb 208 fs/ocfs2/localalloc.c static inline int ocfs2_la_state_enabled(struct ocfs2_super *osb) osb 210 fs/ocfs2/localalloc.c return (osb->local_alloc_state == OCFS2_LA_THROTTLED || osb 211 fs/ocfs2/localalloc.c osb->local_alloc_state == OCFS2_LA_ENABLED); osb 214 fs/ocfs2/localalloc.c void ocfs2_local_alloc_seen_free_bits(struct ocfs2_super *osb, osb 217 fs/ocfs2/localalloc.c spin_lock(&osb->osb_lock); osb 218 fs/ocfs2/localalloc.c if (osb->local_alloc_state == OCFS2_LA_DISABLED || osb 219 fs/ocfs2/localalloc.c osb->local_alloc_state == OCFS2_LA_THROTTLED) osb 220 fs/ocfs2/localalloc.c if (num_clusters >= osb->local_alloc_default_bits) { osb 221 fs/ocfs2/localalloc.c cancel_delayed_work(&osb->la_enable_wq); osb 222 fs/ocfs2/localalloc.c osb->local_alloc_state = OCFS2_LA_ENABLED; osb 224 fs/ocfs2/localalloc.c spin_unlock(&osb->osb_lock); osb 229 fs/ocfs2/localalloc.c struct ocfs2_super *osb = osb 232 fs/ocfs2/localalloc.c spin_lock(&osb->osb_lock); osb 233 fs/ocfs2/localalloc.c osb->local_alloc_state = OCFS2_LA_ENABLED; osb 234 fs/ocfs2/localalloc.c spin_unlock(&osb->osb_lock); osb 244 fs/ocfs2/localalloc.c int ocfs2_alloc_should_use_local(struct ocfs2_super *osb, u64 bits) osb 249 fs/ocfs2/localalloc.c spin_lock(&osb->osb_lock); osb 250 fs/ocfs2/localalloc.c la_bits = osb->local_alloc_bits; osb 252 fs/ocfs2/localalloc.c if (!ocfs2_la_state_enabled(osb)) osb 265 fs/ocfs2/localalloc.c (unsigned long long)bits, osb->local_alloc_state, la_bits, ret); osb 266 fs/ocfs2/localalloc.c spin_unlock(&osb->osb_lock); osb 270 fs/ocfs2/localalloc.c int ocfs2_load_local_alloc(struct ocfs2_super *osb) osb 279 fs/ocfs2/localalloc.c if (osb->local_alloc_bits == 0) osb 282 fs/ocfs2/localalloc.c if (osb->local_alloc_bits >= osb->bitmap_cpg) { osb 285 fs/ocfs2/localalloc.c osb->local_alloc_bits, (osb->bitmap_cpg - 1)); osb 286 fs/ocfs2/localalloc.c osb->local_alloc_bits = osb 287 fs/ocfs2/localalloc.c ocfs2_megabytes_to_clusters(osb->sb, osb 288 fs/ocfs2/localalloc.c ocfs2_la_default_mb(osb)); osb 292 fs/ocfs2/localalloc.c inode = ocfs2_get_system_file_inode(osb, LOCAL_ALLOC_SYSTEM_INODE, osb 293 fs/ocfs2/localalloc.c osb->slot_num); osb 346 fs/ocfs2/localalloc.c osb->local_alloc_bh = alloc_bh; osb 347 fs/ocfs2/localalloc.c osb->local_alloc_state = OCFS2_LA_ENABLED; osb 354 fs/ocfs2/localalloc.c trace_ocfs2_load_local_alloc(osb->local_alloc_bits); osb 368 fs/ocfs2/localalloc.c void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb) osb 379 fs/ocfs2/localalloc.c cancel_delayed_work(&osb->la_enable_wq); osb 380 fs/ocfs2/localalloc.c if (osb->ocfs2_wq) osb 381 fs/ocfs2/localalloc.c flush_workqueue(osb->ocfs2_wq); osb 383 fs/ocfs2/localalloc.c if (osb->local_alloc_state == OCFS2_LA_UNUSED) osb 387 fs/ocfs2/localalloc.c ocfs2_get_system_file_inode(osb, osb 389 fs/ocfs2/localalloc.c osb->slot_num); osb 396 fs/ocfs2/localalloc.c osb->local_alloc_state = OCFS2_LA_DISABLED; osb 398 fs/ocfs2/localalloc.c ocfs2_resmap_uninit(&osb->osb_la_resmap); osb 400 fs/ocfs2/localalloc.c main_bm_inode = ocfs2_get_system_file_inode(osb, osb 418 fs/ocfs2/localalloc.c handle = ocfs2_start_trans(osb, OCFS2_WINDOW_MOVE_CREDITS); osb 425 fs/ocfs2/localalloc.c bh = osb->local_alloc_bh; osb 445 fs/ocfs2/localalloc.c osb->local_alloc_bh = NULL; osb 446 fs/ocfs2/localalloc.c osb->local_alloc_state = OCFS2_LA_UNUSED; osb 448 fs/ocfs2/localalloc.c status = ocfs2_sync_local_to_main(osb, handle, alloc_copy, osb 454 fs/ocfs2/localalloc.c ocfs2_commit_trans(osb, handle); osb 478 fs/ocfs2/localalloc.c int ocfs2_begin_local_alloc_recovery(struct ocfs2_super *osb, osb 491 fs/ocfs2/localalloc.c inode = ocfs2_get_system_file_inode(osb, osb 519 fs/ocfs2/localalloc.c ocfs2_compute_meta_ecc(osb->sb, alloc_bh->b_data, &alloc->i_check); osb 520 fs/ocfs2/localalloc.c status = ocfs2_write_block(osb, alloc_bh, INODE_CACHE(inode)); osb 548 fs/ocfs2/localalloc.c int ocfs2_complete_local_alloc_recovery(struct ocfs2_super *osb, osb 556 fs/ocfs2/localalloc.c main_bm_inode = ocfs2_get_system_file_inode(osb, osb 573 fs/ocfs2/localalloc.c handle = ocfs2_start_trans(osb, OCFS2_WINDOW_MOVE_CREDITS); osb 584 fs/ocfs2/localalloc.c status = ocfs2_sync_local_to_main(osb, handle, alloc, osb 589 fs/ocfs2/localalloc.c ocfs2_commit_trans(osb, handle); osb 603 fs/ocfs2/localalloc.c ocfs2_init_steal_slots(osb); osb 616 fs/ocfs2/localalloc.c int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb, osb 628 fs/ocfs2/localalloc.c ocfs2_get_system_file_inode(osb, osb 630 fs/ocfs2/localalloc.c osb->slot_num); osb 643 fs/ocfs2/localalloc.c spin_lock(&osb->osb_lock); osb 644 fs/ocfs2/localalloc.c if (!ocfs2_la_state_enabled(osb) || osb 645 fs/ocfs2/localalloc.c (bits_wanted > osb->local_alloc_bits)) { osb 646 fs/ocfs2/localalloc.c spin_unlock(&osb->osb_lock); osb 650 fs/ocfs2/localalloc.c spin_unlock(&osb->osb_lock); osb 652 fs/ocfs2/localalloc.c alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data; osb 657 fs/ocfs2/localalloc.c status = ocfs2_error(osb->sb, "local alloc inode %llu says it has %u used bits, but a count shows %u\n", osb 670 fs/ocfs2/localalloc.c ocfs2_local_alloc_slide_window(osb, local_alloc_inode); osb 684 fs/ocfs2/localalloc.c if (!ocfs2_la_state_enabled(osb)) osb 695 fs/ocfs2/localalloc.c ac->ac_alloc_slot = osb->slot_num; osb 697 fs/ocfs2/localalloc.c get_bh(osb->local_alloc_bh); osb 698 fs/ocfs2/localalloc.c ac->ac_bh = osb->local_alloc_bh; osb 708 fs/ocfs2/localalloc.c bits_wanted, osb->slot_num, status); osb 715 fs/ocfs2/localalloc.c int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb, osb 731 fs/ocfs2/localalloc.c alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data; osb 734 fs/ocfs2/localalloc.c start = ocfs2_local_alloc_find_clear_bits(osb, alloc, &bits_wanted, osb 749 fs/ocfs2/localalloc.c osb->local_alloc_bh, osb 756 fs/ocfs2/localalloc.c ocfs2_resmap_claimed_bits(&osb->osb_la_resmap, ac->ac_resv, start, osb 763 fs/ocfs2/localalloc.c ocfs2_journal_dirty(handle, osb->local_alloc_bh); osb 771 fs/ocfs2/localalloc.c int ocfs2_free_local_alloc_bits(struct ocfs2_super *osb, osb 787 fs/ocfs2/localalloc.c alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data; osb 796 fs/ocfs2/localalloc.c osb->local_alloc_bh, osb 807 fs/ocfs2/localalloc.c ocfs2_journal_dirty(handle, osb->local_alloc_bh); osb 824 fs/ocfs2/localalloc.c static int ocfs2_local_alloc_find_clear_bits(struct ocfs2_super *osb, osb 833 fs/ocfs2/localalloc.c struct ocfs2_reservation_map *resmap = &osb->osb_la_resmap; osb 858 fs/ocfs2/localalloc.c BUG_ON(osb->osb_resv_level != 0); osb 949 fs/ocfs2/localalloc.c static int ocfs2_sync_local_to_main(struct ocfs2_super *osb, osb 975 fs/ocfs2/localalloc.c la_start_blk = ocfs2_clusters_to_blocks(osb->sb, osb 990 fs/ocfs2/localalloc.c ocfs2_clusters_to_blocks(osb->sb, osb 1041 fs/ocfs2/localalloc.c static int ocfs2_recalc_la_window(struct ocfs2_super *osb, osb 1047 fs/ocfs2/localalloc.c spin_lock(&osb->osb_lock); osb 1048 fs/ocfs2/localalloc.c if (osb->local_alloc_state == OCFS2_LA_DISABLED) { osb 1049 fs/ocfs2/localalloc.c WARN_ON_ONCE(osb->local_alloc_state == OCFS2_LA_DISABLED); osb 1063 fs/ocfs2/localalloc.c bits = osb->local_alloc_bits >> 1; osb 1064 fs/ocfs2/localalloc.c if (bits > ocfs2_megabytes_to_clusters(osb->sb, 1)) { osb 1072 fs/ocfs2/localalloc.c osb->local_alloc_state = OCFS2_LA_THROTTLED; osb 1073 fs/ocfs2/localalloc.c osb->local_alloc_bits = bits; osb 1075 fs/ocfs2/localalloc.c osb->local_alloc_state = OCFS2_LA_DISABLED; osb 1077 fs/ocfs2/localalloc.c queue_delayed_work(osb->ocfs2_wq, &osb->la_enable_wq, osb 1088 fs/ocfs2/localalloc.c if (osb->local_alloc_state != OCFS2_LA_THROTTLED) osb 1089 fs/ocfs2/localalloc.c osb->local_alloc_bits = osb->local_alloc_default_bits; osb 1092 fs/ocfs2/localalloc.c state = osb->local_alloc_state; osb 1093 fs/ocfs2/localalloc.c spin_unlock(&osb->osb_lock); osb 1098 fs/ocfs2/localalloc.c static int ocfs2_local_alloc_reserve_for_window(struct ocfs2_super *osb, osb 1113 fs/ocfs2/localalloc.c (*ac)->ac_bits_wanted = osb->local_alloc_bits; osb 1114 fs/ocfs2/localalloc.c status = ocfs2_reserve_cluster_bitmap_bits(osb, *ac); osb 1116 fs/ocfs2/localalloc.c if (ocfs2_recalc_la_window(osb, OCFS2_LA_EVENT_ENOSPC) == osb 1148 fs/ocfs2/localalloc.c static int ocfs2_local_alloc_new_window(struct ocfs2_super *osb, osb 1157 fs/ocfs2/localalloc.c alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data; osb 1162 fs/ocfs2/localalloc.c osb->local_alloc_bits); osb 1167 fs/ocfs2/localalloc.c ac->ac_last_group = osb->la_last_gd; osb 1172 fs/ocfs2/localalloc.c status = ocfs2_claim_clusters(handle, ac, osb->local_alloc_bits, osb 1181 fs/ocfs2/localalloc.c if (ocfs2_recalc_la_window(osb, OCFS2_LA_EVENT_FRAGMENTED) == osb 1185 fs/ocfs2/localalloc.c ac->ac_bits_wanted = osb->local_alloc_bits; osb 1187 fs/ocfs2/localalloc.c osb->local_alloc_bits, osb 1198 fs/ocfs2/localalloc.c spin_lock(&osb->osb_lock); osb 1199 fs/ocfs2/localalloc.c osb->local_alloc_bits = cluster_count; osb 1200 fs/ocfs2/localalloc.c spin_unlock(&osb->osb_lock); osb 1209 fs/ocfs2/localalloc.c osb->la_last_gd = ac->ac_last_group; osb 1221 fs/ocfs2/localalloc.c ocfs2_resmap_restart(&osb->osb_la_resmap, cluster_count, osb 1236 fs/ocfs2/localalloc.c static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb, osb 1247 fs/ocfs2/localalloc.c ocfs2_recalc_la_window(osb, OCFS2_LA_EVENT_SLIDE); osb 1250 fs/ocfs2/localalloc.c status = ocfs2_local_alloc_reserve_for_window(osb, osb 1260 fs/ocfs2/localalloc.c handle = ocfs2_start_trans(osb, OCFS2_WINDOW_MOVE_CREDITS); osb 1268 fs/ocfs2/localalloc.c alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data; osb 1275 fs/ocfs2/localalloc.c alloc_copy = kmemdup(alloc, osb->local_alloc_bh->b_size, GFP_NOFS); osb 1284 fs/ocfs2/localalloc.c osb->local_alloc_bh, osb 1292 fs/ocfs2/localalloc.c ocfs2_journal_dirty(handle, osb->local_alloc_bh); osb 1294 fs/ocfs2/localalloc.c status = ocfs2_sync_local_to_main(osb, handle, alloc_copy, osb 1301 fs/ocfs2/localalloc.c status = ocfs2_local_alloc_new_window(osb, handle, ac); osb 1308 fs/ocfs2/localalloc.c atomic_inc(&osb->alloc_stats.moves); osb 1312 fs/ocfs2/localalloc.c ocfs2_commit_trans(osb, handle); osb 15 fs/ocfs2/localalloc.h int ocfs2_load_local_alloc(struct ocfs2_super *osb); osb 17 fs/ocfs2/localalloc.h void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb); osb 19 fs/ocfs2/localalloc.h void ocfs2_la_set_sizes(struct ocfs2_super *osb, int requested_mb); osb 20 fs/ocfs2/localalloc.h unsigned int ocfs2_la_default_mb(struct ocfs2_super *osb); osb 22 fs/ocfs2/localalloc.h int ocfs2_begin_local_alloc_recovery(struct ocfs2_super *osb, osb 26 fs/ocfs2/localalloc.h int ocfs2_complete_local_alloc_recovery(struct ocfs2_super *osb, osb 29 fs/ocfs2/localalloc.h int ocfs2_alloc_should_use_local(struct ocfs2_super *osb, osb 33 fs/ocfs2/localalloc.h int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb, osb 37 fs/ocfs2/localalloc.h int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb, osb 44 fs/ocfs2/localalloc.h int ocfs2_free_local_alloc_bits(struct ocfs2_super *osb, osb 50 fs/ocfs2/localalloc.h void ocfs2_local_alloc_seen_free_bits(struct ocfs2_super *osb, osb 102 fs/ocfs2/locks.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 109 fs/ocfs2/locks.c if ((osb->s_mount_opt & OCFS2_MOUNT_LOCALFLOCKS) || osb 110 fs/ocfs2/locks.c ocfs2_mount_local(osb)) osb 122 fs/ocfs2/locks.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 129 fs/ocfs2/locks.c return ocfs2_plock(osb->cconn, OCFS2_I(inode)->ip_blkno, file, cmd, fl); osb 58 fs/ocfs2/move_extents.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 136 fs/ocfs2/move_extents.c ocfs2_blocks_to_clusters(osb->sb, osb 141 fs/ocfs2/move_extents.c ret = ocfs2_truncate_log_append(osb, handle, osb 165 fs/ocfs2/move_extents.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 175 fs/ocfs2/move_extents.c (ocfs2_sparse_alloc(osb) && num_free_extents < max_recs_needed)) osb 178 fs/ocfs2/move_extents.c ret = ocfs2_reserve_new_metadata_blocks(osb, extra_blocks, meta_ac); osb 185 fs/ocfs2/move_extents.c *credits += ocfs2_calc_extend_credits(osb->sb, et->et_root_el); osb 213 fs/ocfs2/move_extents.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 214 fs/ocfs2/move_extents.c struct inode *tl_inode = osb->osb_tl_inode; osb 224 fs/ocfs2/move_extents.c ret = ocfs2_lock_refcount_tree(osb, context->refcount_loc, 1, osb 261 fs/ocfs2/move_extents.c if (ocfs2_truncate_log_needs_flush(osb)) { osb 262 fs/ocfs2/move_extents.c ret = __ocfs2_flush_truncate_log(osb); osb 278 fs/ocfs2/move_extents.c ret = ocfs2_reserve_clusters(osb, *len, &context->data_ac); osb 284 fs/ocfs2/move_extents.c handle = ocfs2_start_trans(osb, credits); osb 338 fs/ocfs2/move_extents.c ocfs2_free_local_alloc_bits(osb, handle, data_ac, osb 344 fs/ocfs2/move_extents.c ocfs2_clusters_to_blocks(osb->sb, new_phys_cpos), osb 348 fs/ocfs2/move_extents.c ocfs2_commit_trans(osb, handle); osb 365 fs/ocfs2/move_extents.c ocfs2_unlock_refcount_tree(osb, ref_tree, 1); osb 383 fs/ocfs2/move_extents.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 391 fs/ocfs2/move_extents.c ret = ocfs2_lookup_ino_from_name(osb->sys_root_inode, namebuf, osb 398 fs/ocfs2/move_extents.c ret = ocfs2_read_blocks_sync(osb, blkno, 1, &ac_bh); osb 409 fs/ocfs2/move_extents.c bits_per_unit = osb->s_clustersize_bits - osb 440 fs/ocfs2/move_extents.c ret = ocfs2_read_blocks_sync(osb, blkno, 1, &gd_bh); osb 484 fs/ocfs2/move_extents.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 485 fs/ocfs2/move_extents.c int c_to_b = 1 << (osb->s_clustersize_bits - osb 516 fs/ocfs2/move_extents.c if ((le16_to_cpu(bg->bg_bits) - goal_bit) * osb->s_clustersize < osb 580 fs/ocfs2/move_extents.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 581 fs/ocfs2/move_extents.c struct inode *tl_inode = osb->osb_tl_inode; osb 597 fs/ocfs2/move_extents.c ret = ocfs2_lock_refcount_tree(osb, context->refcount_loc, 1, osb 635 fs/ocfs2/move_extents.c gb_inode = ocfs2_get_system_file_inode(osb, GLOBAL_BITMAP_SYSTEM_INODE, osb 653 fs/ocfs2/move_extents.c handle = ocfs2_start_trans(osb, credits); osb 715 fs/ocfs2/move_extents.c ocfs2_commit_trans(osb, handle); osb 734 fs/ocfs2/move_extents.c ocfs2_unlock_refcount_tree(osb, ref_tree, 1); osb 779 fs/ocfs2/move_extents.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 805 fs/ocfs2/move_extents.c move_start = ocfs2_clusters_for_bytes(osb->sb, range->me_start); osb 807 fs/ocfs2/move_extents.c osb->s_clustersize_bits; osb 814 fs/ocfs2/move_extents.c defrag_thresh = range->me_threshold >> osb->s_clustersize_bits; osb 893 fs/ocfs2/move_extents.c range->me_moved_len = ocfs2_clusters_to_bytes(osb->sb, osb 895 fs/ocfs2/move_extents.c range->me_new_offset = ocfs2_clusters_to_bytes(osb->sb, osb 898 fs/ocfs2/move_extents.c ocfs2_schedule_truncate_log_flush(osb, 1); osb 899 fs/ocfs2/move_extents.c ocfs2_run_deallocs(osb, &context->dealloc); osb 911 fs/ocfs2/move_extents.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 913 fs/ocfs2/move_extents.c if (ocfs2_is_hard_readonly(osb) || ocfs2_is_soft_readonly(osb)) osb 949 fs/ocfs2/move_extents.c handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); osb 972 fs/ocfs2/move_extents.c ocfs2_commit_trans(osb, handle); osb 56 fs/ocfs2/namei.c static int ocfs2_mknod_locked(struct ocfs2_super *osb, osb 65 fs/ocfs2/namei.c static int ocfs2_prepare_orphan_dir(struct ocfs2_super *osb, osb 72 fs/ocfs2/namei.c static int ocfs2_orphan_add(struct ocfs2_super *osb, osb 81 fs/ocfs2/namei.c static int ocfs2_create_symlink_data(struct ocfs2_super *osb, osb 86 fs/ocfs2/namei.c static int ocfs2_double_lock(struct ocfs2_super *osb, osb 209 fs/ocfs2/namei.c static void ocfs2_cleanup_add_entry_failure(struct ocfs2_super *osb, osb 214 fs/ocfs2/namei.c ocfs2_simple_drop_lockres(osb, &dl->dl_lockres); osb 232 fs/ocfs2/namei.c struct ocfs2_super *osb; osb 262 fs/ocfs2/namei.c osb = OCFS2_SB(dir->i_sb); osb 271 fs/ocfs2/namei.c if (S_ISDIR(mode) && (dir->i_nlink >= ocfs2_link_max(osb))) { osb 289 fs/ocfs2/namei.c status = ocfs2_prepare_dir_for_insert(osb, dir, parent_fe_bh, osb 298 fs/ocfs2/namei.c status = ocfs2_reserve_new_inode(osb, &inode_ac); osb 334 fs/ocfs2/namei.c if (S_ISDIR(mode) && !ocfs2_supports_inline_data(osb)) { osb 338 fs/ocfs2/namei.c if (ocfs2_supports_indexed_dirs(osb)) osb 342 fs/ocfs2/namei.c status = ocfs2_reserve_new_metadata_blocks(osb, want_meta, &meta_ac); osb 349 fs/ocfs2/namei.c status = ocfs2_reserve_clusters(osb, want_clusters, &data_ac); osb 356 fs/ocfs2/namei.c handle = ocfs2_start_trans(osb, ocfs2_mknod_credits(osb->sb, osb 376 fs/ocfs2/namei.c status = ocfs2_mknod_locked(osb, dir, inode, dev, osb 385 fs/ocfs2/namei.c status = ocfs2_fill_new_dir(osb, handle, dir, inode, osb 450 fs/ocfs2/namei.c ocfs2_commit_trans(osb, handle); osb 478 fs/ocfs2/namei.c ocfs2_cleanup_add_entry_failure(osb, dentry, inode); osb 501 fs/ocfs2/namei.c struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); osb 513 fs/ocfs2/namei.c inode->i_ino = ino_from_blkno(osb->sb, fe_blkno); osb 515 fs/ocfs2/namei.c spin_lock(&osb->osb_lock); osb 516 fs/ocfs2/namei.c inode->i_generation = osb->s_next_generation++; osb 517 fs/ocfs2/namei.c spin_unlock(&osb->osb_lock); osb 519 fs/ocfs2/namei.c *new_fe_bh = sb_getblk(osb->sb, fe_blkno); osb 536 fs/ocfs2/namei.c memset(fe, 0, osb->sb->s_blocksize); osb 539 fs/ocfs2/namei.c fe->i_fs_generation = cpu_to_le32(osb->fs_generation); osb 567 fs/ocfs2/namei.c if (S_ISDIR(inode->i_mode) && ocfs2_supports_inline_data(osb)) { osb 571 fs/ocfs2/namei.c ocfs2_max_inline_data_with_xattr(osb->sb, fe)); osb 576 fs/ocfs2/namei.c fel->l_count = cpu_to_le16(ocfs2_extent_recs_per_inode(osb->sb)); osb 582 fs/ocfs2/namei.c ocfs2_ci_set_new(osb, INODE_CACHE(inode)); osb 583 fs/ocfs2/namei.c if (!ocfs2_mount_local(osb)) { osb 605 fs/ocfs2/namei.c static int ocfs2_mknod_locked(struct ocfs2_super *osb, osb 685 fs/ocfs2/namei.c struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); osb 703 fs/ocfs2/namei.c err = ocfs2_double_lock(osb, &old_dir_bh, old_dir, osb 718 fs/ocfs2/namei.c mlog(ML_ERROR, "%s: no old_dir_bh!\n", osb->uuid_str); osb 750 fs/ocfs2/namei.c err = ocfs2_prepare_dir_for_insert(osb, dir, parent_fe_bh, osb 766 fs/ocfs2/namei.c if (ocfs2_read_links_count(fe) >= ocfs2_link_max(osb)) { osb 771 fs/ocfs2/namei.c handle = ocfs2_start_trans(osb, ocfs2_link_credits(osb->sb)); osb 816 fs/ocfs2/namei.c ocfs2_commit_trans(osb, handle); osb 874 fs/ocfs2/namei.c struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); osb 897 fs/ocfs2/namei.c if (inode == osb->root_inode) osb 951 fs/ocfs2/namei.c status = ocfs2_prepare_orphan_dir(osb, &orphan_dir, osb 962 fs/ocfs2/namei.c handle = ocfs2_start_trans(osb, ocfs2_unlink_credits(osb->sb)); osb 1005 fs/ocfs2/namei.c status = ocfs2_orphan_add(osb, handle, inode, fe_bh, osb 1013 fs/ocfs2/namei.c ocfs2_commit_trans(osb, handle); osb 1039 fs/ocfs2/namei.c static int ocfs2_check_if_ancestor(struct ocfs2_super *osb, osb 1049 fs/ocfs2/namei.c child_inode = ocfs2_iget(osb, child_inode_no, 0, 0); osb 1077 fs/ocfs2/namei.c if (parent_inode_no == osb->root_inode->i_ino) { osb 1102 fs/ocfs2/namei.c static int ocfs2_double_lock(struct ocfs2_super *osb, osb 1125 fs/ocfs2/namei.c inode1_is_ancestor = ocfs2_check_if_ancestor(osb, oi2->ip_blkno, osb 1132 fs/ocfs2/namei.c inode2_is_ancestor = ocfs2_check_if_ancestor(osb, oi1->ip_blkno, osb 1207 fs/ocfs2/namei.c struct ocfs2_super *osb = NULL; osb 1242 fs/ocfs2/namei.c osb = OCFS2_SB(old_dir->i_sb); osb 1261 fs/ocfs2/namei.c status = ocfs2_rename_lock(osb); osb 1270 fs/ocfs2/namei.c status = ocfs2_check_if_ancestor(osb, new_dir->i_ino, osb 1285 fs/ocfs2/namei.c status = ocfs2_double_lock(osb, &old_dir_bh, old_dir, osb 1350 fs/ocfs2/namei.c new_dir->i_nlink >= ocfs2_link_max(osb)) { osb 1450 fs/ocfs2/namei.c status = ocfs2_prepare_orphan_dir(osb, &orphan_dir, osb 1469 fs/ocfs2/namei.c status = ocfs2_prepare_dir_for_insert(osb, new_dir, new_dir_bh, osb 1479 fs/ocfs2/namei.c handle = ocfs2_start_trans(osb, ocfs2_rename_credits(osb->sb)); osb 1518 fs/ocfs2/namei.c status = ocfs2_orphan_add(osb, handle, new_inode, osb 1559 fs/ocfs2/namei.c if (!is_journal_aborted(osb->journal->j_journal)) { osb 1560 fs/ocfs2/namei.c ocfs2_error(osb->sb, "new entry %.*s is added, but old entry %.*s " osb 1571 fs/ocfs2/namei.c if (!is_journal_aborted(osb->journal->j_journal)) { osb 1572 fs/ocfs2/namei.c ocfs2_error(osb->sb, "new entry %.*s is added, but old entry %.*s " osb 1636 fs/ocfs2/namei.c ocfs2_commit_trans(osb, handle); osb 1655 fs/ocfs2/namei.c ocfs2_rename_unlock(osb); osb 1683 fs/ocfs2/namei.c static int ocfs2_create_symlink_data(struct ocfs2_super *osb, osb 1690 fs/ocfs2/namei.c struct super_block *sb = osb->sb; osb 1787 fs/ocfs2/namei.c struct ocfs2_super *osb = NULL; osb 1819 fs/ocfs2/namei.c osb = OCFS2_SB(sb); osb 1845 fs/ocfs2/namei.c status = ocfs2_prepare_dir_for_insert(osb, dir, parent_fe_bh, osb 1853 fs/ocfs2/namei.c status = ocfs2_reserve_new_inode(osb, &inode_ac); osb 1893 fs/ocfs2/namei.c status = ocfs2_reserve_clusters(osb, want_clusters, &data_ac); osb 1900 fs/ocfs2/namei.c handle = ocfs2_start_trans(osb, credits + xattr_credits); osb 1922 fs/ocfs2/namei.c status = ocfs2_mknod_locked(osb, dir, inode, osb 1939 fs/ocfs2/namei.c ocfs2_clusters_to_bytes(osb->sb, 1)); osb 1944 fs/ocfs2/namei.c status = ocfs2_add_inode_data(osb, inode, &offset, 1, 0, osb 1974 fs/ocfs2/namei.c status = ocfs2_create_symlink_data(osb, handle, inode, osb 2017 fs/ocfs2/namei.c ocfs2_clusters_to_bytes(osb->sb, 1)); osb 2021 fs/ocfs2/namei.c ocfs2_commit_trans(osb, handle); osb 2039 fs/ocfs2/namei.c ocfs2_cleanup_add_entry_failure(osb, dentry, inode); osb 2081 fs/ocfs2/namei.c static int ocfs2_lookup_lock_orphan_dir(struct ocfs2_super *osb, osb 2089 fs/ocfs2/namei.c orphan_dir_inode = ocfs2_get_system_file_inode(osb, osb 2091 fs/ocfs2/namei.c osb->slot_num); osb 2123 fs/ocfs2/namei.c struct ocfs2_super *osb = OCFS2_SB(orphan_dir_inode->i_sb); osb 2146 fs/ocfs2/namei.c ret = ocfs2_prepare_dir_for_insert(osb, orphan_dir_inode, osb 2171 fs/ocfs2/namei.c static int ocfs2_prepare_orphan_dir(struct ocfs2_super *osb, osb 2182 fs/ocfs2/namei.c ret = ocfs2_lookup_lock_orphan_dir(osb, &orphan_dir_inode, osb 2212 fs/ocfs2/namei.c static int ocfs2_orphan_add(struct ocfs2_super *osb, osb 2284 fs/ocfs2/namei.c fe->i_dio_orphaned_slot = cpu_to_le16(osb->slot_num); osb 2292 fs/ocfs2/namei.c fe->i_orphaned_slot = cpu_to_le16(osb->slot_num); osb 2298 fs/ocfs2/namei.c osb->slot_num); osb 2314 fs/ocfs2/namei.c int ocfs2_orphan_del(struct ocfs2_super *osb, osb 2422 fs/ocfs2/namei.c struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); osb 2427 fs/ocfs2/namei.c ret = ocfs2_lookup_lock_orphan_dir(osb, &orphan_dir, &orphan_dir_bh); osb 2434 fs/ocfs2/namei.c ret = ocfs2_reserve_new_inode(osb, &inode_ac); osb 2488 fs/ocfs2/namei.c struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); osb 2522 fs/ocfs2/namei.c handle = ocfs2_start_trans(osb, ocfs2_mknod_credits(osb->sb, 0, 0)); osb 2554 fs/ocfs2/namei.c status = ocfs2_orphan_add(osb, handle, inode, new_di_bh, orphan_name, osb 2571 fs/ocfs2/namei.c ocfs2_commit_trans(osb, handle); osb 2600 fs/ocfs2/namei.c int ocfs2_add_inode_to_orphan(struct ocfs2_super *osb, osb 2630 fs/ocfs2/namei.c status = ocfs2_del_inode_from_orphan(osb, inode, di_bh, 0, 0); osb 2637 fs/ocfs2/namei.c status = ocfs2_prepare_orphan_dir(osb, &orphan_dir_inode, osb 2647 fs/ocfs2/namei.c handle = ocfs2_start_trans(osb, osb 2654 fs/ocfs2/namei.c status = ocfs2_orphan_add(osb, handle, inode, di_bh, orphan_name, osb 2659 fs/ocfs2/namei.c ocfs2_commit_trans(osb, handle); osb 2676 fs/ocfs2/namei.c int ocfs2_del_inode_from_orphan(struct ocfs2_super *osb, osb 2686 fs/ocfs2/namei.c orphan_dir_inode = ocfs2_get_system_file_inode(osb, osb 2704 fs/ocfs2/namei.c handle = ocfs2_start_trans(osb, osb 2713 fs/ocfs2/namei.c status = ocfs2_orphan_del(osb, handle, orphan_dir_inode, osb 2740 fs/ocfs2/namei.c ocfs2_commit_trans(osb, handle); osb 2759 fs/ocfs2/namei.c struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); osb 2791 fs/ocfs2/namei.c status = ocfs2_prepare_dir_for_insert(osb, dir, parent_di_bh, osb 2799 fs/ocfs2/namei.c orphan_dir_inode = ocfs2_get_system_file_inode(osb, osb 2801 fs/ocfs2/namei.c osb->slot_num); osb 2824 fs/ocfs2/namei.c handle = ocfs2_start_trans(osb, ocfs2_rename_credits(osb->sb)); osb 2839 fs/ocfs2/namei.c status = ocfs2_orphan_del(osb, handle, orphan_dir_inode, inode, osb 2872 fs/ocfs2/namei.c ocfs2_commit_trans(osb, handle); osb 22 fs/ocfs2/namei.h int ocfs2_orphan_del(struct ocfs2_super *osb, osb 31 fs/ocfs2/namei.h int ocfs2_add_inode_to_orphan(struct ocfs2_super *osb, osb 33 fs/ocfs2/namei.h int ocfs2_del_inode_from_orphan(struct ocfs2_super *osb, osb 489 fs/ocfs2/ocfs2.h static inline int ocfs2_sparse_alloc(struct ocfs2_super *osb) osb 491 fs/ocfs2/ocfs2.h if (osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC) osb 496 fs/ocfs2/ocfs2.h static inline int ocfs2_writes_unwritten_extents(struct ocfs2_super *osb) osb 501 fs/ocfs2/ocfs2.h if (!ocfs2_sparse_alloc(osb)) osb 504 fs/ocfs2/ocfs2.h if (osb->s_feature_ro_compat & OCFS2_FEATURE_RO_COMPAT_UNWRITTEN) osb 509 fs/ocfs2/ocfs2.h static inline int ocfs2_supports_append_dio(struct ocfs2_super *osb) osb 511 fs/ocfs2/ocfs2.h if (osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_APPEND_DIO) osb 517 fs/ocfs2/ocfs2.h static inline int ocfs2_supports_inline_data(struct ocfs2_super *osb) osb 519 fs/ocfs2/ocfs2.h if (osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_INLINE_DATA) osb 524 fs/ocfs2/ocfs2.h static inline int ocfs2_supports_xattr(struct ocfs2_super *osb) osb 526 fs/ocfs2/ocfs2.h if (osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_XATTR) osb 531 fs/ocfs2/ocfs2.h static inline int ocfs2_meta_ecc(struct ocfs2_super *osb) osb 533 fs/ocfs2/ocfs2.h if (osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_META_ECC) osb 538 fs/ocfs2/ocfs2.h static inline int ocfs2_supports_indexed_dirs(struct ocfs2_super *osb) osb 540 fs/ocfs2/ocfs2.h if (osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_INDEXED_DIRS) osb 545 fs/ocfs2/ocfs2.h static inline int ocfs2_supports_discontig_bg(struct ocfs2_super *osb) osb 547 fs/ocfs2/ocfs2.h if (osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_DISCONTIG_BG) osb 552 fs/ocfs2/ocfs2.h static inline unsigned int ocfs2_link_max(struct ocfs2_super *osb) osb 554 fs/ocfs2/ocfs2.h if (ocfs2_supports_indexed_dirs(osb)) osb 590 fs/ocfs2/ocfs2.h static inline int ocfs2_refcount_tree(struct ocfs2_super *osb) osb 592 fs/ocfs2/ocfs2.h if (osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_REFCOUNT_TREE) osb 601 fs/ocfs2/ocfs2.h static inline void ocfs2_set_osb_flag(struct ocfs2_super *osb, osb 604 fs/ocfs2/ocfs2.h spin_lock(&osb->osb_lock); osb 605 fs/ocfs2/ocfs2.h osb->osb_flags |= flag; osb 606 fs/ocfs2/ocfs2.h spin_unlock(&osb->osb_lock); osb 609 fs/ocfs2/ocfs2.h static inline void ocfs2_set_ro_flag(struct ocfs2_super *osb, osb 612 fs/ocfs2/ocfs2.h spin_lock(&osb->osb_lock); osb 613 fs/ocfs2/ocfs2.h osb->osb_flags &= ~(OCFS2_OSB_SOFT_RO|OCFS2_OSB_HARD_RO); osb 615 fs/ocfs2/ocfs2.h osb->osb_flags |= OCFS2_OSB_HARD_RO; osb 617 fs/ocfs2/ocfs2.h osb->osb_flags |= OCFS2_OSB_SOFT_RO; osb 618 fs/ocfs2/ocfs2.h spin_unlock(&osb->osb_lock); osb 621 fs/ocfs2/ocfs2.h static inline int ocfs2_is_hard_readonly(struct ocfs2_super *osb) osb 625 fs/ocfs2/ocfs2.h spin_lock(&osb->osb_lock); osb 626 fs/ocfs2/ocfs2.h ret = osb->osb_flags & OCFS2_OSB_HARD_RO; osb 627 fs/ocfs2/ocfs2.h spin_unlock(&osb->osb_lock); osb 632 fs/ocfs2/ocfs2.h static inline int ocfs2_is_soft_readonly(struct ocfs2_super *osb) osb 636 fs/ocfs2/ocfs2.h spin_lock(&osb->osb_lock); osb 637 fs/ocfs2/ocfs2.h ret = osb->osb_flags & OCFS2_OSB_SOFT_RO; osb 638 fs/ocfs2/ocfs2.h spin_unlock(&osb->osb_lock); osb 643 fs/ocfs2/ocfs2.h static inline int ocfs2_clusterinfo_valid(struct ocfs2_super *osb) osb 645 fs/ocfs2/ocfs2.h return (osb->s_feature_incompat & osb 650 fs/ocfs2/ocfs2.h static inline int ocfs2_userspace_stack(struct ocfs2_super *osb) osb 652 fs/ocfs2/ocfs2.h if (ocfs2_clusterinfo_valid(osb) && osb 653 fs/ocfs2/ocfs2.h memcmp(osb->osb_cluster_stack, OCFS2_CLASSIC_CLUSTER_STACK, osb 659 fs/ocfs2/ocfs2.h static inline int ocfs2_o2cb_stack(struct ocfs2_super *osb) osb 661 fs/ocfs2/ocfs2.h if (ocfs2_clusterinfo_valid(osb) && osb 662 fs/ocfs2/ocfs2.h !memcmp(osb->osb_cluster_stack, OCFS2_CLASSIC_CLUSTER_STACK, osb 668 fs/ocfs2/ocfs2.h static inline int ocfs2_cluster_o2cb_global_heartbeat(struct ocfs2_super *osb) osb 670 fs/ocfs2/ocfs2.h return ocfs2_o2cb_stack(osb) && osb 671 fs/ocfs2/ocfs2.h (osb->osb_stackflags & OCFS2_CLUSTER_O2CB_GLOBAL_HEARTBEAT); osb 674 fs/ocfs2/ocfs2.h static inline int ocfs2_mount_local(struct ocfs2_super *osb) osb 676 fs/ocfs2/ocfs2.h return (osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_LOCAL_MOUNT); osb 679 fs/ocfs2/ocfs2.h static inline int ocfs2_uses_extended_slot_map(struct ocfs2_super *osb) osb 681 fs/ocfs2/ocfs2.h return (osb->s_feature_incompat & osb 89 fs/ocfs2/quota.h struct ocfs2_super *osb, int slot_num); osb 90 fs/ocfs2/quota.h int ocfs2_finish_quota_recovery(struct ocfs2_super *osb, osb 602 fs/ocfs2/quota_global.c struct ocfs2_super *osb = OCFS2_SB(sb); osb 614 fs/ocfs2/quota_global.c handle = ocfs2_start_trans(osb, OCFS2_QSYNC_CREDITS); osb 629 fs/ocfs2/quota_global.c ocfs2_commit_trans(osb, handle); osb 663 fs/ocfs2/quota_global.c struct ocfs2_super *osb = OCFS2_SB(dquot->dq_sb); osb 669 fs/ocfs2/quota_global.c handle = ocfs2_start_trans(osb, OCFS2_QWRITE_CREDITS); osb 678 fs/ocfs2/quota_global.c ocfs2_commit_trans(osb, handle); osb 699 fs/ocfs2/quota_global.c struct ocfs2_super *osb = container_of(work, struct ocfs2_super, osb 704 fs/ocfs2/quota_global.c list = llist_del_all(&osb->dquot_drop_list); osb 723 fs/ocfs2/quota_global.c struct ocfs2_super *osb = OCFS2_SB(dquot->dq_sb); osb 734 fs/ocfs2/quota_global.c if (current == osb->dc_task) { osb 742 fs/ocfs2/quota_global.c if (llist_add(&OCFS2_DQUOT(dquot)->list, &osb->dquot_drop_list)) osb 743 fs/ocfs2/quota_global.c queue_work(osb->ocfs2_wq, &osb->dquot_drop_work); osb 749 fs/ocfs2/quota_global.c handle = ocfs2_start_trans(osb, osb 777 fs/ocfs2/quota_global.c ocfs2_commit_trans(osb, handle); osb 797 fs/ocfs2/quota_global.c struct ocfs2_super *osb = OCFS2_SB(sb); osb 843 fs/ocfs2/quota_global.c handle = ocfs2_start_trans(osb, osb 860 fs/ocfs2/quota_global.c ocfs2_commit_trans(osb, handle); osb 922 fs/ocfs2/quota_global.c struct ocfs2_super *osb = OCFS2_SB(sb); osb 942 fs/ocfs2/quota_global.c handle = ocfs2_start_trans(osb, OCFS2_QSYNC_CREDITS); osb 958 fs/ocfs2/quota_global.c ocfs2_commit_trans(osb, handle); osb 385 fs/ocfs2/quota_local.c struct ocfs2_super *osb, osb 393 fs/ocfs2/quota_local.c struct super_block *sb = osb->sb; osb 402 fs/ocfs2/quota_local.c "slot %u\n", osb->dev_str, slot_num); osb 414 fs/ocfs2/quota_local.c lqinode = ocfs2_get_system_file_inode(osb, ino[type], slot_num); osb 582 fs/ocfs2/quota_local.c int ocfs2_finish_quota_recovery(struct ocfs2_super *osb, osb 588 fs/ocfs2/quota_local.c struct super_block *sb = osb->sb; osb 598 fs/ocfs2/quota_local.c "slot %u\n", osb->dev_str, slot_num); osb 605 fs/ocfs2/quota_local.c lqinode = ocfs2_get_system_file_inode(osb, ino[type], slot_num); osb 617 fs/ocfs2/quota_local.c "locked.\n", osb->dev_str, slot_num); osb 643 fs/ocfs2/quota_local.c if (slot_num == osb->slot_num) osb 647 fs/ocfs2/quota_local.c handle = ocfs2_start_trans(osb, osb 666 fs/ocfs2/quota_local.c ocfs2_commit_trans(osb, handle); osb 194 fs/ocfs2/refcounttree.c ocfs2_find_refcount_tree(struct ocfs2_super *osb, u64 blkno) osb 196 fs/ocfs2/refcounttree.c struct rb_node *n = osb->osb_rf_lock_tree.rb_node; osb 214 fs/ocfs2/refcounttree.c static void ocfs2_insert_refcount_tree(struct ocfs2_super *osb, osb 219 fs/ocfs2/refcounttree.c struct rb_node **p = &osb->osb_rf_lock_tree.rb_node; osb 241 fs/ocfs2/refcounttree.c rb_insert_color(&new->rf_node, &osb->osb_rf_lock_tree); osb 253 fs/ocfs2/refcounttree.c ocfs2_erase_refcount_tree_from_list_no_lock(struct ocfs2_super *osb, osb 256 fs/ocfs2/refcounttree.c rb_erase(&tree->rf_node, &osb->osb_rf_lock_tree); osb 257 fs/ocfs2/refcounttree.c if (osb->osb_ref_tree_lru && osb->osb_ref_tree_lru == tree) osb 258 fs/ocfs2/refcounttree.c osb->osb_ref_tree_lru = NULL; osb 261 fs/ocfs2/refcounttree.c static void ocfs2_erase_refcount_tree_from_list(struct ocfs2_super *osb, osb 264 fs/ocfs2/refcounttree.c spin_lock(&osb->osb_lock); osb 265 fs/ocfs2/refcounttree.c ocfs2_erase_refcount_tree_from_list_no_lock(osb, tree); osb 266 fs/ocfs2/refcounttree.c spin_unlock(&osb->osb_lock); osb 298 fs/ocfs2/refcounttree.c static inline void ocfs2_init_refcount_tree_lock(struct ocfs2_super *osb, osb 303 fs/ocfs2/refcounttree.c ocfs2_refcount_lock_res_init(&new->rf_lockres, osb, osb 308 fs/ocfs2/refcounttree.c ocfs2_allocate_refcount_tree(struct ocfs2_super *osb, u64 rf_blkno) osb 318 fs/ocfs2/refcounttree.c ocfs2_init_refcount_tree_ci(new, osb->sb); osb 323 fs/ocfs2/refcounttree.c static int ocfs2_get_refcount_tree(struct ocfs2_super *osb, u64 rf_blkno, osb 331 fs/ocfs2/refcounttree.c spin_lock(&osb->osb_lock); osb 332 fs/ocfs2/refcounttree.c if (osb->osb_ref_tree_lru && osb 333 fs/ocfs2/refcounttree.c osb->osb_ref_tree_lru->rf_blkno == rf_blkno) osb 334 fs/ocfs2/refcounttree.c tree = osb->osb_ref_tree_lru; osb 336 fs/ocfs2/refcounttree.c tree = ocfs2_find_refcount_tree(osb, rf_blkno); osb 340 fs/ocfs2/refcounttree.c spin_unlock(&osb->osb_lock); osb 342 fs/ocfs2/refcounttree.c new = ocfs2_allocate_refcount_tree(osb, rf_blkno); osb 366 fs/ocfs2/refcounttree.c ocfs2_init_refcount_tree_lock(osb, new, rf_blkno, osb 370 fs/ocfs2/refcounttree.c spin_lock(&osb->osb_lock); osb 371 fs/ocfs2/refcounttree.c tree = ocfs2_find_refcount_tree(osb, rf_blkno); osb 375 fs/ocfs2/refcounttree.c ocfs2_insert_refcount_tree(osb, new); osb 383 fs/ocfs2/refcounttree.c osb->osb_ref_tree_lru = tree; osb 385 fs/ocfs2/refcounttree.c spin_unlock(&osb->osb_lock); osb 415 fs/ocfs2/refcounttree.c static int __ocfs2_lock_refcount_tree(struct ocfs2_super *osb, osb 443 fs/ocfs2/refcounttree.c int ocfs2_lock_refcount_tree(struct ocfs2_super *osb, osb 454 fs/ocfs2/refcounttree.c ret = ocfs2_get_refcount_tree(osb, ref_blkno, &tree); osb 462 fs/ocfs2/refcounttree.c ret = __ocfs2_lock_refcount_tree(osb, tree, rw); osb 473 fs/ocfs2/refcounttree.c ocfs2_unlock_refcount_tree(osb, tree, rw); osb 489 fs/ocfs2/refcounttree.c ocfs2_erase_refcount_tree_from_list(osb, tree); osb 494 fs/ocfs2/refcounttree.c ocfs2_unlock_refcount_tree(osb, tree, rw); osb 516 fs/ocfs2/refcounttree.c void ocfs2_unlock_refcount_tree(struct ocfs2_super *osb, osb 528 fs/ocfs2/refcounttree.c void ocfs2_purge_refcount_trees(struct ocfs2_super *osb) osb 532 fs/ocfs2/refcounttree.c struct rb_root *root = &osb->osb_rf_lock_tree; osb 557 fs/ocfs2/refcounttree.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 570 fs/ocfs2/refcounttree.c ret = ocfs2_reserve_new_metadata_blocks(osb, 1, &meta_ac); osb 576 fs/ocfs2/refcounttree.c handle = ocfs2_start_trans(osb, OCFS2_REFCOUNT_TREE_CREATE_CREDITS); osb 598 fs/ocfs2/refcounttree.c new_tree = ocfs2_allocate_refcount_tree(osb, first_blkno); osb 627 fs/ocfs2/refcounttree.c rb->rf_fs_generation = cpu_to_le32(osb->fs_generation); osb 631 fs/ocfs2/refcounttree.c cpu_to_le16(ocfs2_refcount_recs_per_rb(osb->sb)); osb 632 fs/ocfs2/refcounttree.c spin_lock(&osb->osb_lock); osb 633 fs/ocfs2/refcounttree.c rb->rf_generation = osb->s_next_generation++; osb 634 fs/ocfs2/refcounttree.c spin_unlock(&osb->osb_lock); osb 653 fs/ocfs2/refcounttree.c ocfs2_init_refcount_tree_lock(osb, new_tree, first_blkno, osb 656 fs/ocfs2/refcounttree.c spin_lock(&osb->osb_lock); osb 657 fs/ocfs2/refcounttree.c tree = ocfs2_find_refcount_tree(osb, first_blkno); osb 667 fs/ocfs2/refcounttree.c ocfs2_erase_refcount_tree_from_list_no_lock(osb, tree); osb 668 fs/ocfs2/refcounttree.c ocfs2_insert_refcount_tree(osb, new_tree); osb 669 fs/ocfs2/refcounttree.c spin_unlock(&osb->osb_lock); osb 675 fs/ocfs2/refcounttree.c ocfs2_commit_trans(osb, handle); osb 698 fs/ocfs2/refcounttree.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 705 fs/ocfs2/refcounttree.c ret = ocfs2_lock_refcount_tree(osb, refcount_loc, 1, osb 712 fs/ocfs2/refcounttree.c handle = ocfs2_start_trans(osb, OCFS2_REFCOUNT_TREE_SET_CREDITS); osb 746 fs/ocfs2/refcounttree.c ocfs2_commit_trans(osb, handle); osb 748 fs/ocfs2/refcounttree.c ocfs2_unlock_refcount_tree(osb, ref_tree, 1); osb 760 fs/ocfs2/refcounttree.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 774 fs/ocfs2/refcounttree.c ret = ocfs2_lock_refcount_tree(osb, ref_blkno, 1, &ref_tree, &blk_bh); osb 794 fs/ocfs2/refcounttree.c alloc_inode = ocfs2_get_system_file_inode(osb, osb 813 fs/ocfs2/refcounttree.c handle = ocfs2_start_trans(osb, credits); osb 846 fs/ocfs2/refcounttree.c ocfs2_erase_refcount_tree_from_list(osb, ref_tree); osb 854 fs/ocfs2/refcounttree.c ocfs2_commit_trans(osb, handle); osb 866 fs/ocfs2/refcounttree.c ocfs2_unlock_refcount_tree(osb, ref_tree, 1); osb 3009 fs/ocfs2/refcounttree.c struct ocfs2_super *osb = OCFS2_SB(sb); osb 3017 fs/ocfs2/refcounttree.c new_bh = sb_getblk(osb->sb, new_block); osb 3210 fs/ocfs2/refcounttree.c struct ocfs2_super *osb = OCFS2_SB(sb); osb 3234 fs/ocfs2/refcounttree.c handle = ocfs2_start_trans(osb, credits); osb 3337 fs/ocfs2/refcounttree.c ocfs2_commit_trans(osb, handle); osb 3360 fs/ocfs2/refcounttree.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 3362 fs/ocfs2/refcounttree.c if (!ocfs2_refcount_tree(osb)) { osb 3395 fs/ocfs2/refcounttree.c ocfs2_schedule_truncate_log_flush(osb, 1); osb 3396 fs/ocfs2/refcounttree.c ocfs2_run_deallocs(osb, &context->dealloc); osb 3413 fs/ocfs2/refcounttree.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 3442 fs/ocfs2/refcounttree.c ret = ocfs2_lock_refcount_tree(osb, le64_to_cpu(di->i_refcount_loc), osb 3471 fs/ocfs2/refcounttree.c ocfs2_unlock_refcount_tree(osb, ref_tree, 1); osb 3692 fs/ocfs2/refcounttree.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 3710 fs/ocfs2/refcounttree.c ret = ocfs2_reserve_new_metadata_blocks(osb, osb 3721 fs/ocfs2/refcounttree.c handle = ocfs2_start_trans(osb, credits); osb 3751 fs/ocfs2/refcounttree.c ocfs2_commit_trans(osb, handle); osb 3799 fs/ocfs2/refcounttree.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 3818 fs/ocfs2/refcounttree.c ret = ocfs2_lock_refcount_tree(osb, osb 3877 fs/ocfs2/refcounttree.c ocfs2_unlock_refcount_tree(osb, ref_tree, 1); osb 3881 fs/ocfs2/refcounttree.c ocfs2_schedule_truncate_log_flush(osb, 1); osb 3882 fs/ocfs2/refcounttree.c ocfs2_run_deallocs(osb, &dealloc); osb 3905 fs/ocfs2/refcounttree.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 3918 fs/ocfs2/refcounttree.c handle = ocfs2_start_trans(osb, credits); osb 3942 fs/ocfs2/refcounttree.c ocfs2_clusters_to_bytes(osb->sb, num_clusters)); osb 3947 fs/ocfs2/refcounttree.c ocfs2_commit_trans(osb, handle); osb 3961 fs/ocfs2/refcounttree.c struct ocfs2_super *osb = OCFS2_SB(s_inode->i_sb); osb 3967 fs/ocfs2/refcounttree.c handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); osb 3992 fs/ocfs2/refcounttree.c ocfs2_commit_trans(osb, handle); osb 4129 fs/ocfs2/refcounttree.c struct ocfs2_super *osb = OCFS2_SB(s_inode->i_sb); osb 4150 fs/ocfs2/refcounttree.c ret = ocfs2_lock_refcount_tree(osb, le64_to_cpu(di->i_refcount_loc), osb 4166 fs/ocfs2/refcounttree.c ocfs2_unlock_refcount_tree(osb, ref_tree, 1); osb 4170 fs/ocfs2/refcounttree.c ocfs2_schedule_truncate_log_flush(osb, 1); osb 4171 fs/ocfs2/refcounttree.c ocfs2_run_deallocs(osb, &dealloc); osb 4514 fs/ocfs2/refcounttree.c struct ocfs2_super *osb; osb 4521 fs/ocfs2/refcounttree.c osb = OCFS2_SB(s_inode->i_sb); osb 4559 fs/ocfs2/refcounttree.c ret = ocfs2_lock_refcount_tree(osb, osb 4594 fs/ocfs2/refcounttree.c ocfs2_unlock_refcount_tree(osb, ref_tree, 1); osb 4604 fs/ocfs2/refcounttree.c ocfs2_unlock_refcount_tree(osb, ref_tree, 1); osb 4623 fs/ocfs2/refcounttree.c struct ocfs2_super *osb; osb 4628 fs/ocfs2/refcounttree.c osb = OCFS2_SB(s_inode->i_sb); osb 4705 fs/ocfs2/refcounttree.c ocfs2_schedule_truncate_log_flush(osb, 1); osb 4706 fs/ocfs2/refcounttree.c ocfs2_run_deallocs(osb, &dealloc); osb 28 fs/ocfs2/refcounttree.h void ocfs2_purge_refcount_trees(struct ocfs2_super *osb); osb 29 fs/ocfs2/refcounttree.h int ocfs2_lock_refcount_tree(struct ocfs2_super *osb, u64 ref_blkno, int rw, osb 32 fs/ocfs2/refcounttree.h void ocfs2_unlock_refcount_tree(struct ocfs2_super *osb, osb 39 fs/ocfs2/reservations.c int ocfs2_dir_resv_allowed(struct ocfs2_super *osb) osb 41 fs/ocfs2/reservations.c return (osb->osb_resv_level && osb->osb_dir_resv_level); osb 47 fs/ocfs2/reservations.c struct ocfs2_super *osb = resmap->m_osb; osb 52 fs/ocfs2/reservations.c bits = 4 << osb->osb_resv_level; osb 54 fs/ocfs2/reservations.c bits = 4 << osb->osb_dir_resv_level; osb 80 fs/ocfs2/reservations.c struct ocfs2_super *osb = resmap->m_osb; osb 86 fs/ocfs2/reservations.c osb->dev_str, resmap->m_bitmap_len); osb 206 fs/ocfs2/reservations.c int ocfs2_resmap_init(struct ocfs2_super *osb, osb 211 fs/ocfs2/reservations.c resmap->m_osb = osb; osb 62 fs/ocfs2/reservations.h int ocfs2_dir_resv_allowed(struct ocfs2_super *osb); osb 86 fs/ocfs2/reservations.h int ocfs2_resmap_init(struct ocfs2_super *osb, osb 87 fs/ocfs2/resize.c struct ocfs2_super *osb = OCFS2_SB(bm_inode->i_sb); osb 119 fs/ocfs2/resize.c if (OCFS2_HAS_COMPAT_FEATURE(osb->sb, osb 151 fs/ocfs2/resize.c le64_add_cpu(&fe->i_size, (u64)new_clusters << osb->s_clustersize_bits); osb 179 fs/ocfs2/resize.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 188 fs/ocfs2/resize.c ret = ocfs2_read_blocks_sync(osb, blkno, 1, &backup); osb 199 fs/ocfs2/resize.c ret = ocfs2_write_super_or_backup(osb, backup); osb 218 fs/ocfs2/resize.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 224 fs/ocfs2/resize.c ret = ocfs2_read_blocks_sync(osb, OCFS2_SUPER_BLOCK_BLKNO, 1, osb 235 fs/ocfs2/resize.c ret = ocfs2_write_super_or_backup(osb, super_bh); osb 241 fs/ocfs2/resize.c if (OCFS2_HAS_COMPAT_FEATURE(osb->sb, OCFS2_FEATURE_COMPAT_BACKUP_SB)) osb 250 fs/ocfs2/resize.c osb->dev_str); osb 268 fs/ocfs2/resize.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 273 fs/ocfs2/resize.c if (ocfs2_is_hard_readonly(osb) || ocfs2_is_soft_readonly(osb)) osb 281 fs/ocfs2/resize.c main_bm_inode = ocfs2_get_system_file_inode(osb, osb 305 fs/ocfs2/resize.c ocfs2_group_bitmap_size(osb->sb, 0, osb 306 fs/ocfs2/resize.c osb->s_feature_incompat) * 8) { osb 336 fs/ocfs2/resize.c handle = ocfs2_start_trans(osb, OCFS2_GROUP_EXTEND_CREDITS); osb 356 fs/ocfs2/resize.c ocfs2_commit_trans(osb, handle); osb 455 fs/ocfs2/resize.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 463 fs/ocfs2/resize.c if (ocfs2_is_hard_readonly(osb) || ocfs2_is_soft_readonly(osb)) osb 466 fs/ocfs2/resize.c main_bm_inode = ocfs2_get_system_file_inode(osb, osb 486 fs/ocfs2/resize.c ocfs2_group_bitmap_size(osb->sb, 0, osb 487 fs/ocfs2/resize.c osb->s_feature_incompat) * 8) { osb 494 fs/ocfs2/resize.c ret = ocfs2_read_blocks_sync(osb, input->group, 1, &group_bh); osb 512 fs/ocfs2/resize.c handle = ocfs2_start_trans(osb, OCFS2_GROUP_ADD_CREDITS); osb 561 fs/ocfs2/resize.c le64_add_cpu(&fe->i_size, (u64)input->clusters << osb->s_clustersize_bits); osb 568 fs/ocfs2/resize.c ocfs2_commit_trans(osb, handle); osb 118 fs/ocfs2/slot_map.c int ocfs2_refresh_slot_info(struct ocfs2_super *osb) osb 121 fs/ocfs2/slot_map.c struct ocfs2_slot_info *si = osb->slot_info; osb 139 fs/ocfs2/slot_map.c spin_lock(&osb->osb_lock); osb 141 fs/ocfs2/slot_map.c spin_unlock(&osb->osb_lock); osb 185 fs/ocfs2/slot_map.c static int ocfs2_update_disk_slot(struct ocfs2_super *osb, osb 192 fs/ocfs2/slot_map.c spin_lock(&osb->osb_lock); osb 197 fs/ocfs2/slot_map.c spin_unlock(&osb->osb_lock); osb 199 fs/ocfs2/slot_map.c status = ocfs2_write_block(osb, bh, INODE_CACHE(si->si_inode)); osb 210 fs/ocfs2/slot_map.c static int ocfs2_slot_map_physical_size(struct ocfs2_super *osb, osb 216 fs/ocfs2/slot_map.c if (ocfs2_uses_extended_slot_map(osb)) { osb 217 fs/ocfs2/slot_map.c bytes_needed = osb->max_slots * osb 220 fs/ocfs2/slot_map.c bytes_needed = osb->max_slots * sizeof(__le16); osb 273 fs/ocfs2/slot_map.c int ocfs2_node_num_to_slot(struct ocfs2_super *osb, unsigned int node_num) osb 276 fs/ocfs2/slot_map.c struct ocfs2_slot_info *si = osb->slot_info; osb 278 fs/ocfs2/slot_map.c spin_lock(&osb->osb_lock); osb 280 fs/ocfs2/slot_map.c spin_unlock(&osb->osb_lock); osb 285 fs/ocfs2/slot_map.c int ocfs2_slot_to_node_num_locked(struct ocfs2_super *osb, int slot_num, osb 288 fs/ocfs2/slot_map.c struct ocfs2_slot_info *si = osb->slot_info; osb 290 fs/ocfs2/slot_map.c assert_spin_locked(&osb->osb_lock); osb 293 fs/ocfs2/slot_map.c BUG_ON(slot_num >= osb->max_slots); osb 323 fs/ocfs2/slot_map.c int ocfs2_clear_slot(struct ocfs2_super *osb, int slot_num) osb 325 fs/ocfs2/slot_map.c struct ocfs2_slot_info *si = osb->slot_info; osb 330 fs/ocfs2/slot_map.c spin_lock(&osb->osb_lock); osb 332 fs/ocfs2/slot_map.c spin_unlock(&osb->osb_lock); osb 334 fs/ocfs2/slot_map.c return ocfs2_update_disk_slot(osb, osb->slot_info, slot_num); osb 337 fs/ocfs2/slot_map.c static int ocfs2_map_slot_buffers(struct ocfs2_super *osb, osb 346 fs/ocfs2/slot_map.c status = ocfs2_slot_map_physical_size(osb, si->si_inode, &bytes); osb 358 fs/ocfs2/slot_map.c (osb->sb->s_blocksize / osb 361 fs/ocfs2/slot_map.c si->si_slots_per_block = osb->sb->s_blocksize / sizeof(__le16); osb 364 fs/ocfs2/slot_map.c BUG_ON((osb->max_slots / si->si_slots_per_block) > blocks); osb 401 fs/ocfs2/slot_map.c int ocfs2_init_slot_info(struct ocfs2_super *osb) osb 407 fs/ocfs2/slot_map.c si = kzalloc(struct_size(si, si_slots, osb->max_slots), GFP_KERNEL); osb 414 fs/ocfs2/slot_map.c si->si_extended = ocfs2_uses_extended_slot_map(osb); osb 415 fs/ocfs2/slot_map.c si->si_num_slots = osb->max_slots; osb 417 fs/ocfs2/slot_map.c inode = ocfs2_get_system_file_inode(osb, SLOT_MAP_SYSTEM_INODE, osb 426 fs/ocfs2/slot_map.c status = ocfs2_map_slot_buffers(osb, si); osb 432 fs/ocfs2/slot_map.c osb->slot_info = (struct ocfs2_slot_info *)si; osb 440 fs/ocfs2/slot_map.c void ocfs2_free_slot_info(struct ocfs2_super *osb) osb 442 fs/ocfs2/slot_map.c struct ocfs2_slot_info *si = osb->slot_info; osb 444 fs/ocfs2/slot_map.c osb->slot_info = NULL; osb 448 fs/ocfs2/slot_map.c int ocfs2_find_slot(struct ocfs2_super *osb) osb 454 fs/ocfs2/slot_map.c si = osb->slot_info; osb 456 fs/ocfs2/slot_map.c spin_lock(&osb->osb_lock); osb 463 fs/ocfs2/slot_map.c slot = __ocfs2_node_num_to_slot(si, osb->node_num); osb 467 fs/ocfs2/slot_map.c slot = __ocfs2_find_empty_slot(si, osb->preferred_slot); osb 469 fs/ocfs2/slot_map.c spin_unlock(&osb->osb_lock); osb 476 fs/ocfs2/slot_map.c "allocated to this node!\n", slot, osb->dev_str); osb 478 fs/ocfs2/slot_map.c ocfs2_set_slot(si, slot, osb->node_num); osb 479 fs/ocfs2/slot_map.c osb->slot_num = slot; osb 480 fs/ocfs2/slot_map.c spin_unlock(&osb->osb_lock); osb 482 fs/ocfs2/slot_map.c trace_ocfs2_find_slot(osb->slot_num); osb 484 fs/ocfs2/slot_map.c status = ocfs2_update_disk_slot(osb, si, osb->slot_num); osb 491 fs/ocfs2/slot_map.c spin_lock(&osb->osb_lock); osb 492 fs/ocfs2/slot_map.c ocfs2_invalidate_slot(si, osb->slot_num); osb 493 fs/ocfs2/slot_map.c osb->slot_num = OCFS2_INVALID_SLOT; osb 494 fs/ocfs2/slot_map.c spin_unlock(&osb->osb_lock); osb 501 fs/ocfs2/slot_map.c void ocfs2_put_slot(struct ocfs2_super *osb) osb 504 fs/ocfs2/slot_map.c struct ocfs2_slot_info *si = osb->slot_info; osb 509 fs/ocfs2/slot_map.c spin_lock(&osb->osb_lock); osb 512 fs/ocfs2/slot_map.c slot_num = osb->slot_num; osb 513 fs/ocfs2/slot_map.c ocfs2_invalidate_slot(si, osb->slot_num); osb 514 fs/ocfs2/slot_map.c osb->slot_num = OCFS2_INVALID_SLOT; osb 515 fs/ocfs2/slot_map.c spin_unlock(&osb->osb_lock); osb 517 fs/ocfs2/slot_map.c status = ocfs2_update_disk_slot(osb, si, slot_num); osb 521 fs/ocfs2/slot_map.c ocfs2_free_slot_info(osb); osb 16 fs/ocfs2/slot_map.h int ocfs2_init_slot_info(struct ocfs2_super *osb); osb 17 fs/ocfs2/slot_map.h void ocfs2_free_slot_info(struct ocfs2_super *osb); osb 19 fs/ocfs2/slot_map.h int ocfs2_find_slot(struct ocfs2_super *osb); osb 20 fs/ocfs2/slot_map.h void ocfs2_put_slot(struct ocfs2_super *osb); osb 22 fs/ocfs2/slot_map.h int ocfs2_refresh_slot_info(struct ocfs2_super *osb); osb 24 fs/ocfs2/slot_map.h int ocfs2_node_num_to_slot(struct ocfs2_super *osb, unsigned int node_num); osb 25 fs/ocfs2/slot_map.h int ocfs2_slot_to_node_num_locked(struct ocfs2_super *osb, int slot_num, osb 28 fs/ocfs2/slot_map.h int ocfs2_clear_slot(struct ocfs2_super *osb, int slot_num); osb 76 fs/ocfs2/suballoc.c static int ocfs2_block_group_alloc(struct ocfs2_super *osb, osb 115 fs/ocfs2/suballoc.c static int ocfs2_reserve_clusters_with_limit(struct ocfs2_super *osb, osb 320 fs/ocfs2/suballoc.c static void ocfs2_bg_discontig_add_extent(struct ocfs2_super *osb, osb 328 fs/ocfs2/suballoc.c BUG_ON(!ocfs2_supports_discontig_bg(osb)); osb 330 fs/ocfs2/suballoc.c el->l_count = cpu_to_le16(ocfs2_extent_recs_per_gd(osb->sb)); osb 351 fs/ocfs2/suballoc.c struct ocfs2_super *osb = OCFS2_SB(alloc_inode->i_sb); osb 374 fs/ocfs2/suballoc.c bg->bg_generation = cpu_to_le32(osb->fs_generation); osb 376 fs/ocfs2/suballoc.c osb->s_feature_incompat)); osb 384 fs/ocfs2/suballoc.c ocfs2_bg_discontig_add_extent(osb, bg, cl, group_blkno, osb 419 fs/ocfs2/suballoc.c ocfs2_block_group_alloc_contig(struct ocfs2_super *osb, handle_t *handle, osb 440 fs/ocfs2/suballoc.c bg_blkno = ocfs2_clusters_to_blocks(osb->sb, bit_off); osb 444 fs/ocfs2/suballoc.c bg_bh = sb_getblk(osb->sb, bg_blkno); osb 463 fs/ocfs2/suballoc.c static int ocfs2_block_group_claim_bits(struct ocfs2_super *osb, osb 491 fs/ocfs2/suballoc.c struct ocfs2_super *osb = OCFS2_SB(alloc_inode->i_sb); osb 513 fs/ocfs2/suballoc.c status = ocfs2_block_group_claim_bits(osb, handle, ac, osb 521 fs/ocfs2/suballoc.c p_blkno = ocfs2_clusters_to_blocks(osb->sb, p_cpos); osb 522 fs/ocfs2/suballoc.c ocfs2_bg_discontig_add_extent(osb, bg, cl, p_blkno, osb 587 fs/ocfs2/suballoc.c struct ocfs2_super *osb = OCFS2_SB(alloc_inode->i_sb); osb 589 fs/ocfs2/suballoc.c if (!ocfs2_supports_discontig_bg(osb)) { osb 595 fs/ocfs2/suballoc.c ocfs2_calc_bg_discontig_credits(osb->sb)); osb 610 fs/ocfs2/suballoc.c status = ocfs2_block_group_claim_bits(osb, handle, ac, min_bits, osb 620 fs/ocfs2/suballoc.c bg_blkno = ocfs2_clusters_to_blocks(osb->sb, bit_off); osb 624 fs/ocfs2/suballoc.c bg_bh = sb_getblk(osb->sb, bg_blkno); osb 653 fs/ocfs2/suballoc.c static int ocfs2_block_group_alloc(struct ocfs2_super *osb, osb 672 fs/ocfs2/suballoc.c status = ocfs2_reserve_clusters_with_limit(osb, osb 681 fs/ocfs2/suballoc.c credits = ocfs2_calc_group_alloc_credits(osb->sb, osb 683 fs/ocfs2/suballoc.c handle = ocfs2_start_trans(osb, credits); osb 697 fs/ocfs2/suballoc.c bg_bh = ocfs2_block_group_alloc_contig(osb, handle, alloc_inode, osb 752 fs/ocfs2/suballoc.c ocfs2_commit_trans(osb, handle); osb 764 fs/ocfs2/suballoc.c static int ocfs2_reserve_suballoc_bits(struct ocfs2_super *osb, osb 778 fs/ocfs2/suballoc.c alloc_inode = ocfs2_get_system_file_inode(osb, type, slot); osb 830 fs/ocfs2/suballoc.c status = ocfs2_block_group_alloc(osb, alloc_inode, bh, osb 838 fs/ocfs2/suballoc.c atomic_inc(&osb->alloc_stats.bg_extends); osb 856 fs/ocfs2/suballoc.c static void ocfs2_init_inode_steal_slot(struct ocfs2_super *osb) osb 858 fs/ocfs2/suballoc.c spin_lock(&osb->osb_lock); osb 859 fs/ocfs2/suballoc.c osb->s_inode_steal_slot = OCFS2_INVALID_SLOT; osb 860 fs/ocfs2/suballoc.c spin_unlock(&osb->osb_lock); osb 861 fs/ocfs2/suballoc.c atomic_set(&osb->s_num_inodes_stolen, 0); osb 864 fs/ocfs2/suballoc.c static void ocfs2_init_meta_steal_slot(struct ocfs2_super *osb) osb 866 fs/ocfs2/suballoc.c spin_lock(&osb->osb_lock); osb 867 fs/ocfs2/suballoc.c osb->s_meta_steal_slot = OCFS2_INVALID_SLOT; osb 868 fs/ocfs2/suballoc.c spin_unlock(&osb->osb_lock); osb 869 fs/ocfs2/suballoc.c atomic_set(&osb->s_num_meta_stolen, 0); osb 872 fs/ocfs2/suballoc.c void ocfs2_init_steal_slots(struct ocfs2_super *osb) osb 874 fs/ocfs2/suballoc.c ocfs2_init_inode_steal_slot(osb); osb 875 fs/ocfs2/suballoc.c ocfs2_init_meta_steal_slot(osb); osb 878 fs/ocfs2/suballoc.c static void __ocfs2_set_steal_slot(struct ocfs2_super *osb, int slot, int type) osb 880 fs/ocfs2/suballoc.c spin_lock(&osb->osb_lock); osb 882 fs/ocfs2/suballoc.c osb->s_inode_steal_slot = slot; osb 884 fs/ocfs2/suballoc.c osb->s_meta_steal_slot = slot; osb 885 fs/ocfs2/suballoc.c spin_unlock(&osb->osb_lock); osb 888 fs/ocfs2/suballoc.c static int __ocfs2_get_steal_slot(struct ocfs2_super *osb, int type) osb 892 fs/ocfs2/suballoc.c spin_lock(&osb->osb_lock); osb 894 fs/ocfs2/suballoc.c slot = osb->s_inode_steal_slot; osb 896 fs/ocfs2/suballoc.c slot = osb->s_meta_steal_slot; osb 897 fs/ocfs2/suballoc.c spin_unlock(&osb->osb_lock); osb 902 fs/ocfs2/suballoc.c static int ocfs2_get_inode_steal_slot(struct ocfs2_super *osb) osb 904 fs/ocfs2/suballoc.c return __ocfs2_get_steal_slot(osb, INODE_ALLOC_SYSTEM_INODE); osb 907 fs/ocfs2/suballoc.c static int ocfs2_get_meta_steal_slot(struct ocfs2_super *osb) osb 909 fs/ocfs2/suballoc.c return __ocfs2_get_steal_slot(osb, EXTENT_ALLOC_SYSTEM_INODE); osb 912 fs/ocfs2/suballoc.c static int ocfs2_steal_resource(struct ocfs2_super *osb, osb 917 fs/ocfs2/suballoc.c int slot = __ocfs2_get_steal_slot(osb, type); osb 921 fs/ocfs2/suballoc.c slot = osb->slot_num + 1; osb 923 fs/ocfs2/suballoc.c for (i = 0; i < osb->max_slots; i++, slot++) { osb 924 fs/ocfs2/suballoc.c if (slot == osb->max_slots) osb 927 fs/ocfs2/suballoc.c if (slot == osb->slot_num) osb 930 fs/ocfs2/suballoc.c status = ocfs2_reserve_suballoc_bits(osb, ac, osb 935 fs/ocfs2/suballoc.c __ocfs2_set_steal_slot(osb, slot, type); osb 945 fs/ocfs2/suballoc.c static int ocfs2_steal_inode(struct ocfs2_super *osb, osb 948 fs/ocfs2/suballoc.c return ocfs2_steal_resource(osb, ac, INODE_ALLOC_SYSTEM_INODE); osb 951 fs/ocfs2/suballoc.c static int ocfs2_steal_meta(struct ocfs2_super *osb, osb 954 fs/ocfs2/suballoc.c return ocfs2_steal_resource(osb, ac, EXTENT_ALLOC_SYSTEM_INODE); osb 957 fs/ocfs2/suballoc.c int ocfs2_reserve_new_metadata_blocks(struct ocfs2_super *osb, osb 962 fs/ocfs2/suballoc.c int slot = ocfs2_get_meta_steal_slot(osb); osb 976 fs/ocfs2/suballoc.c atomic_read(&osb->s_num_meta_stolen) < OCFS2_MAX_TO_STEAL) osb 979 fs/ocfs2/suballoc.c atomic_set(&osb->s_num_meta_stolen, 0); osb 980 fs/ocfs2/suballoc.c status = ocfs2_reserve_suballoc_bits(osb, (*ac), osb 982 fs/ocfs2/suballoc.c (u32)osb->slot_num, NULL, osb 989 fs/ocfs2/suballoc.c ocfs2_init_meta_steal_slot(osb); osb 999 fs/ocfs2/suballoc.c status = ocfs2_steal_meta(osb, *ac); osb 1000 fs/ocfs2/suballoc.c atomic_inc(&osb->s_num_meta_stolen); osb 1019 fs/ocfs2/suballoc.c int ocfs2_reserve_new_metadata(struct ocfs2_super *osb, osb 1023 fs/ocfs2/suballoc.c return ocfs2_reserve_new_metadata_blocks(osb, osb 1028 fs/ocfs2/suballoc.c int ocfs2_reserve_new_inode(struct ocfs2_super *osb, osb 1032 fs/ocfs2/suballoc.c int slot = ocfs2_get_inode_steal_slot(osb); osb 1052 fs/ocfs2/suballoc.c if (!(osb->s_mount_opt & OCFS2_MOUNT_INODE64)) osb 1065 fs/ocfs2/suballoc.c atomic_read(&osb->s_num_inodes_stolen) < OCFS2_MAX_TO_STEAL) osb 1068 fs/ocfs2/suballoc.c atomic_set(&osb->s_num_inodes_stolen, 0); osb 1069 fs/ocfs2/suballoc.c alloc_group = osb->osb_inode_alloc_group; osb 1070 fs/ocfs2/suballoc.c status = ocfs2_reserve_suballoc_bits(osb, *ac, osb 1072 fs/ocfs2/suballoc.c (u32)osb->slot_num, osb 1079 fs/ocfs2/suballoc.c spin_lock(&osb->osb_lock); osb 1080 fs/ocfs2/suballoc.c osb->osb_inode_alloc_group = alloc_group; osb 1081 fs/ocfs2/suballoc.c spin_unlock(&osb->osb_lock); osb 1090 fs/ocfs2/suballoc.c ocfs2_init_inode_steal_slot(osb); osb 1100 fs/ocfs2/suballoc.c status = ocfs2_steal_inode(osb, *ac); osb 1101 fs/ocfs2/suballoc.c atomic_inc(&osb->s_num_inodes_stolen); osb 1122 fs/ocfs2/suballoc.c int ocfs2_reserve_cluster_bitmap_bits(struct ocfs2_super *osb, osb 1130 fs/ocfs2/suballoc.c status = ocfs2_reserve_suballoc_bits(osb, ac, osb 1143 fs/ocfs2/suballoc.c static int ocfs2_reserve_clusters_with_limit(struct ocfs2_super *osb, osb 1163 fs/ocfs2/suballoc.c ocfs2_alloc_should_use_local(osb, bits_wanted)) { osb 1164 fs/ocfs2/suballoc.c status = ocfs2_reserve_local_alloc_bits(osb, osb 1175 fs/ocfs2/suballoc.c status = ocfs2_reserve_cluster_bitmap_bits(osb, *ac); osb 1182 fs/ocfs2/suballoc.c ret = ocfs2_try_to_free_truncate_log(osb, bits_wanted); osb 1221 fs/ocfs2/suballoc.c int ocfs2_reserve_clusters(struct ocfs2_super *osb, osb 1225 fs/ocfs2/suballoc.c return ocfs2_reserve_clusters_with_limit(osb, bits_wanted, 0, osb 1274 fs/ocfs2/suballoc.c static int ocfs2_block_group_find_clear_bits(struct ocfs2_super *osb, osb 1483 fs/ocfs2/suballoc.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 1508 fs/ocfs2/suballoc.c ret = ocfs2_block_group_find_clear_bits(osb, osb 1537 fs/ocfs2/suballoc.c ocfs2_local_alloc_seen_free_bits(osb, res->sr_bits); osb 2240 fs/ocfs2/suballoc.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 2245 fs/ocfs2/suballoc.c if (bg_blkno != osb->first_cluster_group_blkno) osb 2255 fs/ocfs2/suballoc.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 2260 fs/ocfs2/suballoc.c group_no = cluster / osb->bitmap_cpg; osb 2262 fs/ocfs2/suballoc.c return osb->first_cluster_group_blkno; osb 2264 fs/ocfs2/suballoc.c group_no * osb->bitmap_cpg); osb 2274 fs/ocfs2/suballoc.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 2275 fs/ocfs2/suballoc.c u32 data_cluster = ocfs2_blocks_to_clusters(osb->sb, data_blkno); osb 2282 fs/ocfs2/suballoc.c if (*bg_blkno == osb->first_cluster_group_blkno) osb 2285 fs/ocfs2/suballoc.c *bg_bit_off = (u16) ocfs2_blocks_to_clusters(osb->sb, osb 2305 fs/ocfs2/suballoc.c struct ocfs2_super *osb = OCFS2_SB(ac->ac_inode->i_sb); osb 2315 fs/ocfs2/suballoc.c status = ocfs2_claim_local_alloc_bits(osb, osb 2322 fs/ocfs2/suballoc.c atomic_inc(&osb->alloc_stats.local_data); osb 2324 fs/ocfs2/suballoc.c if (min_clusters > (osb->bitmap_cpg - 1)) { osb 2329 fs/ocfs2/suballoc.c osb->bitmap_cpg); osb 2334 fs/ocfs2/suballoc.c if (bits_wanted > (osb->bitmap_cpg - 1)) osb 2335 fs/ocfs2/suballoc.c bits_wanted = osb->bitmap_cpg - 1; osb 2348 fs/ocfs2/suballoc.c atomic_inc(&osb->alloc_stats.bitmap_data); osb 2631 fs/ocfs2/suballoc.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 2660 fs/ocfs2/suballoc.c (ocfs2_sparse_alloc(osb) && num_free_extents < max_recs_needed)) { osb 2661 fs/ocfs2/suballoc.c ret = ocfs2_reserve_new_metadata(osb, et->et_root_el, meta_ac); osb 2672 fs/ocfs2/suballoc.c ret = ocfs2_reserve_clusters(osb, clusters_to_add, data_ac); osb 2698 fs/ocfs2/suballoc.c static int ocfs2_get_suballoc_slot_bit(struct ocfs2_super *osb, u64 blkno, osb 2709 fs/ocfs2/suballoc.c status = ocfs2_read_blocks_sync(osb, blkno, 1, &inode_bh); osb 2725 fs/ocfs2/suballoc.c (u32)le16_to_cpu(inode_fe->i_suballoc_slot) > osb->max_slots - 1) { osb 2755 fs/ocfs2/suballoc.c static int ocfs2_test_suballoc_bit(struct ocfs2_super *osb, osb 2813 fs/ocfs2/suballoc.c int ocfs2_test_inode_bit(struct ocfs2_super *osb, u64 blkno, int *res) osb 2823 fs/ocfs2/suballoc.c status = ocfs2_get_suballoc_slot_bit(osb, blkno, &suballoc_slot, osb 2831 fs/ocfs2/suballoc.c ocfs2_get_system_file_inode(osb, INODE_ALLOC_SYSTEM_INODE, osb 2852 fs/ocfs2/suballoc.c status = ocfs2_test_suballoc_bit(osb, inode_alloc_inode, alloc_bh, osb 51 fs/ocfs2/suballoc.h void ocfs2_init_steal_slots(struct ocfs2_super *osb); osb 63 fs/ocfs2/suballoc.h int ocfs2_reserve_new_metadata(struct ocfs2_super *osb, osb 66 fs/ocfs2/suballoc.h int ocfs2_reserve_new_metadata_blocks(struct ocfs2_super *osb, osb 69 fs/ocfs2/suballoc.h int ocfs2_reserve_new_inode(struct ocfs2_super *osb, osb 71 fs/ocfs2/suballoc.h int ocfs2_reserve_clusters(struct ocfs2_super *osb, osb 149 fs/ocfs2/suballoc.h static inline u32 ocfs2_cluster_from_desc(struct ocfs2_super *osb, osb 156 fs/ocfs2/suballoc.h if (bg_blkno == osb->first_cluster_group_blkno) osb 162 fs/ocfs2/suballoc.h return ocfs2_blocks_to_clusters(osb->sb, bg_blkno); osb 167 fs/ocfs2/suballoc.h struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 168 fs/ocfs2/suballoc.h return osb->bitmap_blkno == OCFS2_I(inode)->ip_blkno; osb 173 fs/ocfs2/suballoc.h int ocfs2_reserve_cluster_bitmap_bits(struct ocfs2_super *osb, osb 204 fs/ocfs2/suballoc.h int ocfs2_test_inode_bit(struct ocfs2_super *osb, u64 blkno, int *res); osb 100 fs/ocfs2/super.c static void ocfs2_delete_osb(struct ocfs2_super *osb); osb 106 fs/ocfs2/super.c static int ocfs2_init_global_system_inodes(struct ocfs2_super *osb); osb 107 fs/ocfs2/super.c static int ocfs2_init_local_system_inodes(struct ocfs2_super *osb); osb 108 fs/ocfs2/super.c static void ocfs2_release_system_inodes(struct ocfs2_super *osb); osb 109 fs/ocfs2/super.c static int ocfs2_check_volume(struct ocfs2_super *osb); osb 124 fs/ocfs2/super.c static int ocfs2_susp_quotas(struct ocfs2_super *osb, int unsuspend); osb 125 fs/ocfs2/super.c static int ocfs2_enable_quotas(struct ocfs2_super *osb); osb 126 fs/ocfs2/super.c static void ocfs2_disable_quotas(struct ocfs2_super *osb); osb 215 fs/ocfs2/super.c static int ocfs2_osb_dump(struct ocfs2_super *osb, char *buf, int len) osb 217 fs/ocfs2/super.c struct ocfs2_cluster_connection *cconn = osb->cconn; osb 218 fs/ocfs2/super.c struct ocfs2_recovery_map *rm = osb->recovery_map; osb 219 fs/ocfs2/super.c struct ocfs2_orphan_scan *os = &osb->osb_orphan_scan; osb 225 fs/ocfs2/super.c "Device", osb->dev_str, osb->uuid_str, osb 226 fs/ocfs2/super.c osb->fs_generation, osb->vol_label); osb 230 fs/ocfs2/super.c atomic_read(&osb->vol_state), osb->osb_flags); osb 234 fs/ocfs2/super.c osb->sb->s_blocksize, osb->s_clustersize); osb 239 fs/ocfs2/super.c "Features", osb->s_feature_compat, osb 240 fs/ocfs2/super.c osb->s_feature_incompat, osb->s_feature_ro_compat); osb 244 fs/ocfs2/super.c osb->s_mount_opt, osb->s_atime_quantum); osb 250 fs/ocfs2/super.c (*osb->osb_cluster_stack == '\0' ? osb 251 fs/ocfs2/super.c "o2cb" : osb->osb_cluster_stack), osb 257 fs/ocfs2/super.c spin_lock_irqsave(&osb->dc_task_lock, flags); osb 261 fs/ocfs2/super.c (osb->dc_task ? task_pid_nr(osb->dc_task) : -1), osb 262 fs/ocfs2/super.c osb->blocked_lock_count, osb->dc_wake_sequence, osb 263 fs/ocfs2/super.c osb->dc_work_sequence); osb 264 fs/ocfs2/super.c spin_unlock_irqrestore(&osb->dc_task_lock, flags); osb 266 fs/ocfs2/super.c spin_lock(&osb->osb_lock); osb 269 fs/ocfs2/super.c (osb->recovery_thread_task ? osb 270 fs/ocfs2/super.c task_pid_nr(osb->recovery_thread_task) : -1)); osb 279 fs/ocfs2/super.c spin_unlock(&osb->osb_lock); osb 283 fs/ocfs2/super.c (osb->commit_task ? task_pid_nr(osb->commit_task) : -1), osb 284 fs/ocfs2/super.c osb->osb_commit_interval); osb 288 fs/ocfs2/super.c "Journal", osb->journal->j_state, osb 289 fs/ocfs2/super.c osb->journal->j_trans_id, osb 290 fs/ocfs2/super.c atomic_read(&osb->journal->j_num_trans)); osb 296 fs/ocfs2/super.c atomic_read(&osb->alloc_stats.bitmap_data), osb 297 fs/ocfs2/super.c atomic_read(&osb->alloc_stats.local_data), osb 298 fs/ocfs2/super.c atomic_read(&osb->alloc_stats.bg_allocs), osb 299 fs/ocfs2/super.c atomic_read(&osb->alloc_stats.moves), osb 300 fs/ocfs2/super.c atomic_read(&osb->alloc_stats.bg_extends)); osb 305 fs/ocfs2/super.c "LocalAlloc", osb->local_alloc_state, osb 306 fs/ocfs2/super.c (unsigned long long)osb->la_last_gd, osb 307 fs/ocfs2/super.c osb->local_alloc_bits, osb->local_alloc_default_bits); osb 309 fs/ocfs2/super.c spin_lock(&osb->osb_lock); osb 313 fs/ocfs2/super.c osb->s_inode_steal_slot, osb 314 fs/ocfs2/super.c atomic_read(&osb->s_num_inodes_stolen), osb 315 fs/ocfs2/super.c osb->s_meta_steal_slot, osb 316 fs/ocfs2/super.c atomic_read(&osb->s_num_meta_stolen)); osb 317 fs/ocfs2/super.c spin_unlock(&osb->osb_lock); osb 331 fs/ocfs2/super.c for (i = 0; i < osb->max_slots; ++i) { osb 335 fs/ocfs2/super.c (i == osb->slot_num ? '*' : ' '), osb 336 fs/ocfs2/super.c i, osb->slot_recovery_generations[i]); osb 344 fs/ocfs2/super.c struct ocfs2_super *osb = inode->i_private; osb 351 fs/ocfs2/super.c i_size_write(inode, ocfs2_osb_dump(osb, buf, PAGE_SIZE)); osb 399 fs/ocfs2/super.c struct ocfs2_super *osb = OCFS2_SB(sb); osb 401 fs/ocfs2/super.c if (ocfs2_is_hard_readonly(osb)) osb 405 fs/ocfs2/super.c status = ocfs2_flush_truncate_log(osb); osb 409 fs/ocfs2/super.c ocfs2_schedule_truncate_log_flush(osb, 0); osb 412 fs/ocfs2/super.c if (jbd2_journal_start_commit(osb->journal->j_journal, osb 415 fs/ocfs2/super.c jbd2_log_wait_commit(osb->journal->j_journal, osb 421 fs/ocfs2/super.c static int ocfs2_need_system_inode(struct ocfs2_super *osb, int ino) osb 423 fs/ocfs2/super.c if (!OCFS2_HAS_RO_COMPAT_FEATURE(osb->sb, OCFS2_FEATURE_RO_COMPAT_USRQUOTA) osb 427 fs/ocfs2/super.c if (!OCFS2_HAS_RO_COMPAT_FEATURE(osb->sb, OCFS2_FEATURE_RO_COMPAT_GRPQUOTA) osb 434 fs/ocfs2/super.c static int ocfs2_init_global_system_inodes(struct ocfs2_super *osb) osb 440 fs/ocfs2/super.c new = ocfs2_iget(osb, osb->root_blkno, OCFS2_FI_FLAG_SYSFILE, 0); osb 446 fs/ocfs2/super.c osb->root_inode = new; osb 448 fs/ocfs2/super.c new = ocfs2_iget(osb, osb->system_dir_blkno, OCFS2_FI_FLAG_SYSFILE, 0); osb 454 fs/ocfs2/super.c osb->sys_root_inode = new; osb 458 fs/ocfs2/super.c if (!ocfs2_need_system_inode(osb, i)) osb 460 fs/ocfs2/super.c new = ocfs2_get_system_file_inode(osb, i, osb->slot_num); osb 462 fs/ocfs2/super.c ocfs2_release_system_inodes(osb); osb 463 fs/ocfs2/super.c status = ocfs2_is_soft_readonly(osb) ? -EROFS : -EINVAL; osb 479 fs/ocfs2/super.c static int ocfs2_init_local_system_inodes(struct ocfs2_super *osb) osb 488 fs/ocfs2/super.c if (!ocfs2_need_system_inode(osb, i)) osb 490 fs/ocfs2/super.c new = ocfs2_get_system_file_inode(osb, i, osb->slot_num); osb 492 fs/ocfs2/super.c ocfs2_release_system_inodes(osb); osb 493 fs/ocfs2/super.c status = ocfs2_is_soft_readonly(osb) ? -EROFS : -EINVAL; osb 495 fs/ocfs2/super.c status, i, osb->slot_num); osb 508 fs/ocfs2/super.c static void ocfs2_release_system_inodes(struct ocfs2_super *osb) osb 514 fs/ocfs2/super.c inode = osb->global_system_inodes[i]; osb 517 fs/ocfs2/super.c osb->global_system_inodes[i] = NULL; osb 521 fs/ocfs2/super.c inode = osb->sys_root_inode; osb 524 fs/ocfs2/super.c osb->sys_root_inode = NULL; osb 527 fs/ocfs2/super.c inode = osb->root_inode; osb 530 fs/ocfs2/super.c osb->root_inode = NULL; osb 533 fs/ocfs2/super.c if (!osb->local_system_inodes) osb 536 fs/ocfs2/super.c for (i = 0; i < NUM_LOCAL_SYSTEM_INODES * osb->max_slots; i++) { osb 537 fs/ocfs2/super.c if (osb->local_system_inodes[i]) { osb 538 fs/ocfs2/super.c iput(osb->local_system_inodes[i]); osb 539 fs/ocfs2/super.c osb->local_system_inodes[i] = NULL; osb 543 fs/ocfs2/super.c kfree(osb->local_system_inodes); osb 544 fs/ocfs2/super.c osb->local_system_inodes = NULL; osb 611 fs/ocfs2/super.c struct ocfs2_super *osb = OCFS2_SB(sb); osb 624 fs/ocfs2/super.c if ((osb->s_mount_opt & tmp) != (parsed_options.mount_opt & tmp)) { osb 630 fs/ocfs2/super.c if ((osb->s_mount_opt & OCFS2_MOUNT_DATA_WRITEBACK) != osb 639 fs/ocfs2/super.c if (!(osb->s_mount_opt & OCFS2_MOUNT_INODE64) && osb 650 fs/ocfs2/super.c ret = ocfs2_susp_quotas(osb, 0); osb 656 fs/ocfs2/super.c spin_lock(&osb->osb_lock); osb 657 fs/ocfs2/super.c if (osb->osb_flags & OCFS2_OSB_HARD_RO) { osb 665 fs/ocfs2/super.c osb->osb_flags |= OCFS2_OSB_SOFT_RO; osb 667 fs/ocfs2/super.c if (osb->osb_flags & OCFS2_OSB_ERROR_FS) { osb 682 fs/ocfs2/super.c osb->osb_flags &= ~OCFS2_OSB_SOFT_RO; osb 684 fs/ocfs2/super.c trace_ocfs2_remount(sb->s_flags, osb->osb_flags, *flags); osb 686 fs/ocfs2/super.c spin_unlock(&osb->osb_lock); osb 690 fs/ocfs2/super.c ret = ocfs2_susp_quotas(osb, 1); osb 692 fs/ocfs2/super.c ret = ocfs2_enable_quotas(osb); osb 695 fs/ocfs2/super.c spin_lock(&osb->osb_lock); osb 697 fs/ocfs2/super.c osb->osb_flags |= OCFS2_OSB_SOFT_RO; osb 698 fs/ocfs2/super.c spin_unlock(&osb->osb_lock); osb 707 fs/ocfs2/super.c osb->s_mount_opt = parsed_options.mount_opt; osb 708 fs/ocfs2/super.c osb->s_atime_quantum = parsed_options.atime_quantum; osb 709 fs/ocfs2/super.c osb->preferred_slot = parsed_options.slot; osb 711 fs/ocfs2/super.c osb->osb_commit_interval = parsed_options.commit_interval; osb 713 fs/ocfs2/super.c if (!ocfs2_is_hard_readonly(osb)) osb 714 fs/ocfs2/super.c ocfs2_set_journal_params(osb); osb 717 fs/ocfs2/super.c ((osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) ? osb 810 fs/ocfs2/super.c static int ocfs2_verify_heartbeat(struct ocfs2_super *osb) osb 814 fs/ocfs2/super.c if (osb->s_mount_opt & hb_enabled) { osb 815 fs/ocfs2/super.c if (ocfs2_mount_local(osb)) { osb 820 fs/ocfs2/super.c if (ocfs2_userspace_stack(osb)) { osb 825 fs/ocfs2/super.c if (((osb->s_mount_opt & OCFS2_MOUNT_HB_GLOBAL) && osb 826 fs/ocfs2/super.c !ocfs2_cluster_o2cb_global_heartbeat(osb)) || osb 827 fs/ocfs2/super.c ((osb->s_mount_opt & OCFS2_MOUNT_HB_LOCAL) && osb 828 fs/ocfs2/super.c ocfs2_cluster_o2cb_global_heartbeat(osb))) { osb 834 fs/ocfs2/super.c if (!(osb->s_mount_opt & hb_enabled)) { osb 835 fs/ocfs2/super.c if (!ocfs2_mount_local(osb) && !ocfs2_is_hard_readonly(osb) && osb 836 fs/ocfs2/super.c !ocfs2_userspace_stack(osb)) { osb 851 fs/ocfs2/super.c static int ocfs2_verify_userspace_stack(struct ocfs2_super *osb, osb 854 fs/ocfs2/super.c if (!ocfs2_userspace_stack(osb) && mopt->cluster_stack[0]) { osb 861 fs/ocfs2/super.c if (ocfs2_userspace_stack(osb) && osb 862 fs/ocfs2/super.c strncmp(osb->osb_cluster_stack, mopt->cluster_stack, osb 868 fs/ocfs2/super.c osb->osb_cluster_stack); osb 875 fs/ocfs2/super.c static int ocfs2_susp_quotas(struct ocfs2_super *osb, int unsuspend) osb 878 fs/ocfs2/super.c struct super_block *sb = osb->sb; osb 906 fs/ocfs2/super.c static int ocfs2_enable_quotas(struct ocfs2_super *osb) osb 909 fs/ocfs2/super.c struct super_block *sb = osb->sb; osb 923 fs/ocfs2/super.c inode[type] = ocfs2_get_system_file_inode(osb, ino[type], osb 924 fs/ocfs2/super.c osb->slot_num); osb 939 fs/ocfs2/super.c ocfs2_disable_quotas(osb); osb 946 fs/ocfs2/super.c static void ocfs2_disable_quotas(struct ocfs2_super *osb) osb 950 fs/ocfs2/super.c struct super_block *sb = osb->sb; osb 978 fs/ocfs2/super.c struct ocfs2_super *osb = NULL; osb 998 fs/ocfs2/super.c osb = OCFS2_SB(sb); osb 1010 fs/ocfs2/super.c osb->s_mount_opt = parsed_options.mount_opt; osb 1011 fs/ocfs2/super.c osb->s_atime_quantum = parsed_options.atime_quantum; osb 1012 fs/ocfs2/super.c osb->preferred_slot = parsed_options.slot; osb 1013 fs/ocfs2/super.c osb->osb_commit_interval = parsed_options.commit_interval; osb 1015 fs/ocfs2/super.c ocfs2_la_set_sizes(osb, parsed_options.localalloc_opt); osb 1016 fs/ocfs2/super.c osb->osb_resv_level = parsed_options.resv_level; osb 1017 fs/ocfs2/super.c osb->osb_dir_resv_level = parsed_options.resv_level; osb 1019 fs/ocfs2/super.c osb->osb_dir_resv_level = parsed_options.resv_level; osb 1021 fs/ocfs2/super.c osb->osb_dir_resv_level = parsed_options.dir_resv_level; osb 1023 fs/ocfs2/super.c status = ocfs2_verify_userspace_stack(osb, &parsed_options); osb 1030 fs/ocfs2/super.c ((osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) ? SB_POSIXACL : 0); osb 1044 fs/ocfs2/super.c if (osb->s_mount_opt & OCFS2_MOUNT_HB_LOCAL) { osb 1051 fs/ocfs2/super.c status = ocfs2_check_journals_nolocks(osb); osb 1062 fs/ocfs2/super.c ocfs2_set_ro_flag(osb, 1); osb 1066 fs/ocfs2/super.c "Recovery will be skipped.\n", osb->dev_str); osb 1069 fs/ocfs2/super.c if (!ocfs2_is_hard_readonly(osb)) { osb 1071 fs/ocfs2/super.c ocfs2_set_ro_flag(osb, 0); osb 1074 fs/ocfs2/super.c status = ocfs2_verify_heartbeat(osb); osb 1080 fs/ocfs2/super.c osb->osb_debug_root = debugfs_create_dir(osb->uuid_str, osb 1083 fs/ocfs2/super.c debugfs_create_file("fs_state", S_IFREG|S_IRUSR, osb->osb_debug_root, osb 1084 fs/ocfs2/super.c osb, &ocfs2_osb_debug_fops); osb 1086 fs/ocfs2/super.c if (ocfs2_meta_ecc(osb)) osb 1087 fs/ocfs2/super.c ocfs2_blockcheck_stats_debugfs_install( &osb->osb_ecc_stats, osb 1088 fs/ocfs2/super.c osb->osb_debug_root); osb 1094 fs/ocfs2/super.c if (osb->root_inode) osb 1095 fs/ocfs2/super.c inode = igrab(osb->root_inode); osb 1112 fs/ocfs2/super.c ocfs2_complete_mount_recovery(osb); osb 1114 fs/ocfs2/super.c osb->osb_dev_kset = kset_create_and_add(sb->s_id, NULL, osb 1116 fs/ocfs2/super.c if (!osb->osb_dev_kset) { osb 1124 fs/ocfs2/super.c if (ocfs2_filecheck_create_sysfs(osb)) { osb 1131 fs/ocfs2/super.c if (ocfs2_mount_local(osb)) osb 1134 fs/ocfs2/super.c snprintf(nodestr, sizeof(nodestr), "%u", osb->node_num); osb 1138 fs/ocfs2/super.c osb->dev_str, nodestr, osb->slot_num, osb 1139 fs/ocfs2/super.c osb->s_mount_opt & OCFS2_MOUNT_DATA_WRITEBACK ? "writeback" : osb 1142 fs/ocfs2/super.c atomic_set(&osb->vol_state, VOLUME_MOUNTED); osb 1143 fs/ocfs2/super.c wake_up(&osb->osb_mount_event); osb 1149 fs/ocfs2/super.c status = ocfs2_enable_quotas(osb); osb 1154 fs/ocfs2/super.c atomic_set(&osb->vol_state, VOLUME_DISABLED); osb 1155 fs/ocfs2/super.c wake_up(&osb->osb_mount_event); osb 1160 fs/ocfs2/super.c ocfs2_complete_quota_recovery(osb); osb 1163 fs/ocfs2/super.c atomic_set(&osb->vol_state, VOLUME_MOUNTED_QUOTAS); osb 1164 fs/ocfs2/super.c wake_up(&osb->osb_mount_event); osb 1167 fs/ocfs2/super.c ocfs2_orphan_scan_start(osb); osb 1177 fs/ocfs2/super.c if (osb) { osb 1178 fs/ocfs2/super.c atomic_set(&osb->vol_state, VOLUME_DISABLED); osb 1179 fs/ocfs2/super.c wake_up(&osb->osb_mount_event); osb 1477 fs/ocfs2/super.c struct ocfs2_super *osb = OCFS2_SB(root->d_sb); osb 1478 fs/ocfs2/super.c unsigned long opts = osb->s_mount_opt; osb 1508 fs/ocfs2/super.c if (osb->preferred_slot != OCFS2_INVALID_SLOT) osb 1509 fs/ocfs2/super.c seq_printf(s, ",preferred_slot=%d", osb->preferred_slot); osb 1511 fs/ocfs2/super.c seq_printf(s, ",atime_quantum=%u", osb->s_atime_quantum); osb 1513 fs/ocfs2/super.c if (osb->osb_commit_interval) osb 1515 fs/ocfs2/super.c (unsigned) (osb->osb_commit_interval / HZ)); osb 1517 fs/ocfs2/super.c local_alloc_megs = osb->local_alloc_bits >> (20 - osb->s_clustersize_bits); osb 1518 fs/ocfs2/super.c if (local_alloc_megs != ocfs2_la_default_mb(osb)) osb 1524 fs/ocfs2/super.c if (osb->osb_cluster_stack[0]) osb 1525 fs/ocfs2/super.c seq_show_option_n(s, "cluster_stack", osb->osb_cluster_stack, osb 1550 fs/ocfs2/super.c if (osb->osb_resv_level != OCFS2_DEFAULT_RESV_LEVEL) osb 1551 fs/ocfs2/super.c seq_printf(s, ",resv_level=%d", osb->osb_resv_level); osb 1553 fs/ocfs2/super.c if (osb->osb_dir_resv_level != osb->osb_resv_level) osb 1554 fs/ocfs2/super.c seq_printf(s, ",dir_resv_level=%d", osb->osb_resv_level); osb 1619 fs/ocfs2/super.c struct ocfs2_super *osb; osb 1628 fs/ocfs2/super.c osb = OCFS2_SB(dentry->d_sb); osb 1630 fs/ocfs2/super.c inode = ocfs2_get_system_file_inode(osb, osb 1654 fs/ocfs2/super.c (osb->s_clustersize >> osb->sb->s_blocksize_bits); osb 1656 fs/ocfs2/super.c (osb->s_clustersize >> osb->sb->s_blocksize_bits); osb 1660 fs/ocfs2/super.c buf->f_fsid.val[0] = crc32_le(0, osb->uuid_str, OCFS2_VOL_UUID_LEN) osb 1662 fs/ocfs2/super.c buf->f_fsid.val[1] = crc32_le(0, osb->uuid_str + OCFS2_VOL_UUID_LEN, osb 1790 fs/ocfs2/super.c struct ocfs2_super *osb = OCFS2_SB(sb); osb 1792 fs/ocfs2/super.c if (ocfs2_is_hard_readonly(osb)) osb 1795 fs/ocfs2/super.c mutex_init(&osb->obs_trim_fs_mutex); osb 1797 fs/ocfs2/super.c status = ocfs2_dlm_init(osb); osb 1800 fs/ocfs2/super.c if (status == -EBADR && ocfs2_userspace_stack(osb)) osb 1806 fs/ocfs2/super.c status = ocfs2_super_lock(osb, 1); osb 1814 fs/ocfs2/super.c status = ocfs2_find_slot(osb); osb 1821 fs/ocfs2/super.c status = ocfs2_init_local_system_inodes(osb); osb 1827 fs/ocfs2/super.c status = ocfs2_check_volume(osb); osb 1833 fs/ocfs2/super.c status = ocfs2_truncate_log_init(osb); osb 1839 fs/ocfs2/super.c ocfs2_super_unlock(osb, 1); osb 1847 fs/ocfs2/super.c struct ocfs2_super *osb = NULL; osb 1853 fs/ocfs2/super.c osb = OCFS2_SB(sb); osb 1854 fs/ocfs2/super.c BUG_ON(!osb); osb 1858 fs/ocfs2/super.c ocfs2_filecheck_remove_sysfs(osb); osb 1860 fs/ocfs2/super.c kset_unregister(osb->osb_dev_kset); osb 1863 fs/ocfs2/super.c ocfs2_orphan_scan_stop(osb); osb 1865 fs/ocfs2/super.c ocfs2_disable_quotas(osb); osb 1868 fs/ocfs2/super.c WARN_ON(!llist_empty(&osb->dquot_drop_list)); osb 1870 fs/ocfs2/super.c cancel_work_sync(&osb->dquot_drop_work); osb 1872 fs/ocfs2/super.c ocfs2_shutdown_local_alloc(osb); osb 1874 fs/ocfs2/super.c ocfs2_truncate_log_shutdown(osb); osb 1877 fs/ocfs2/super.c ocfs2_recovery_exit(osb); osb 1879 fs/ocfs2/super.c ocfs2_journal_shutdown(osb); osb 1883 fs/ocfs2/super.c ocfs2_purge_refcount_trees(osb); osb 1887 fs/ocfs2/super.c if (osb->cconn) { osb 1888 fs/ocfs2/super.c tmp = ocfs2_super_lock(osb, 1); osb 1895 fs/ocfs2/super.c if (osb->slot_num != OCFS2_INVALID_SLOT) osb 1896 fs/ocfs2/super.c ocfs2_put_slot(osb); osb 1898 fs/ocfs2/super.c if (osb->cconn) osb 1899 fs/ocfs2/super.c ocfs2_super_unlock(osb, 1); osb 1901 fs/ocfs2/super.c ocfs2_release_system_inodes(osb); osb 1909 fs/ocfs2/super.c if (!mnt_err && !ocfs2_mount_local(osb) && osb->uuid_str && osb 1910 fs/ocfs2/super.c !ocfs2_is_hard_readonly(osb)) osb 1913 fs/ocfs2/super.c if (osb->cconn) osb 1914 fs/ocfs2/super.c ocfs2_dlm_shutdown(osb, hangup_needed); osb 1916 fs/ocfs2/super.c ocfs2_blockcheck_stats_debugfs_remove(&osb->osb_ecc_stats); osb 1917 fs/ocfs2/super.c debugfs_remove_recursive(osb->osb_debug_root); osb 1920 fs/ocfs2/super.c ocfs2_cluster_hangup(osb->uuid_str, strlen(osb->uuid_str)); osb 1922 fs/ocfs2/super.c atomic_set(&osb->vol_state, VOLUME_DISMOUNTED); osb 1924 fs/ocfs2/super.c if (ocfs2_mount_local(osb)) osb 1927 fs/ocfs2/super.c snprintf(nodestr, sizeof(nodestr), "%u", osb->node_num); osb 1930 fs/ocfs2/super.c osb->dev_str, nodestr); osb 1932 fs/ocfs2/super.c ocfs2_delete_osb(osb); osb 1933 fs/ocfs2/super.c kfree(osb); osb 1938 fs/ocfs2/super.c static int ocfs2_setup_osb_uuid(struct ocfs2_super *osb, const unsigned char *uuid, osb 1946 fs/ocfs2/super.c osb->uuid_str = kzalloc(OCFS2_VOL_UUID_LEN * 2 + 1, GFP_KERNEL); osb 1947 fs/ocfs2/super.c if (osb->uuid_str == NULL) osb 1950 fs/ocfs2/super.c for (i = 0, ptr = osb->uuid_str; i < OCFS2_VOL_UUID_LEN; i++) { osb 1965 fs/ocfs2/super.c static int ocfs2_journal_addressable(struct ocfs2_super *osb) osb 1969 fs/ocfs2/super.c ocfs2_clusters_to_blocks(osb->sb, osb 1970 fs/ocfs2/super.c osb->osb_clusters_at_boot) - 1; osb 1978 fs/ocfs2/super.c if (!(OCFS2_HAS_COMPAT_FEATURE(osb->sb, osb 1980 fs/ocfs2/super.c jbd2_journal_check_used_features(osb->journal->j_journal, 0, 0, osb 2002 fs/ocfs2/super.c struct ocfs2_super *osb; osb 2005 fs/ocfs2/super.c osb = kzalloc(sizeof(struct ocfs2_super), GFP_KERNEL); osb 2006 fs/ocfs2/super.c if (!osb) { osb 2012 fs/ocfs2/super.c sb->s_fs_info = osb; osb 2029 fs/ocfs2/super.c osb->osb_dx_mask = (1 << (cbits - bbits)) - 1; osb 2032 fs/ocfs2/super.c osb->osb_dx_seed[i] = le32_to_cpu(di->id2.i_super.s_dx_seed[i]); osb 2033 fs/ocfs2/super.c osb->osb_dx_seed[3] = le32_to_cpu(di->id2.i_super.s_uuid_hash); osb 2035 fs/ocfs2/super.c osb->sb = sb; osb 2036 fs/ocfs2/super.c osb->s_sectsize_bits = blksize_bits(sector_size); osb 2037 fs/ocfs2/super.c BUG_ON(!osb->s_sectsize_bits); osb 2039 fs/ocfs2/super.c spin_lock_init(&osb->dc_task_lock); osb 2040 fs/ocfs2/super.c init_waitqueue_head(&osb->dc_event); osb 2041 fs/ocfs2/super.c osb->dc_work_sequence = 0; osb 2042 fs/ocfs2/super.c osb->dc_wake_sequence = 0; osb 2043 fs/ocfs2/super.c INIT_LIST_HEAD(&osb->blocked_lock_list); osb 2044 fs/ocfs2/super.c osb->blocked_lock_count = 0; osb 2045 fs/ocfs2/super.c spin_lock_init(&osb->osb_lock); osb 2046 fs/ocfs2/super.c spin_lock_init(&osb->osb_xattr_lock); osb 2047 fs/ocfs2/super.c ocfs2_init_steal_slots(osb); osb 2049 fs/ocfs2/super.c mutex_init(&osb->system_file_mutex); osb 2051 fs/ocfs2/super.c atomic_set(&osb->alloc_stats.moves, 0); osb 2052 fs/ocfs2/super.c atomic_set(&osb->alloc_stats.local_data, 0); osb 2053 fs/ocfs2/super.c atomic_set(&osb->alloc_stats.bitmap_data, 0); osb 2054 fs/ocfs2/super.c atomic_set(&osb->alloc_stats.bg_allocs, 0); osb 2055 fs/ocfs2/super.c atomic_set(&osb->alloc_stats.bg_extends, 0); osb 2058 fs/ocfs2/super.c osb->osb_ecc_stats = *stats; osb 2060 fs/ocfs2/super.c ocfs2_init_node_maps(osb); osb 2062 fs/ocfs2/super.c snprintf(osb->dev_str, sizeof(osb->dev_str), "%u,%u", osb 2063 fs/ocfs2/super.c MAJOR(osb->sb->s_dev), MINOR(osb->sb->s_dev)); osb 2065 fs/ocfs2/super.c osb->max_slots = le16_to_cpu(di->id2.i_super.s_max_slots); osb 2066 fs/ocfs2/super.c if (osb->max_slots > OCFS2_MAX_SLOTS || osb->max_slots == 0) { osb 2068 fs/ocfs2/super.c osb->max_slots); osb 2073 fs/ocfs2/super.c ocfs2_orphan_scan_init(osb); osb 2075 fs/ocfs2/super.c status = ocfs2_recovery_init(osb); osb 2082 fs/ocfs2/super.c init_waitqueue_head(&osb->checkpoint_event); osb 2084 fs/ocfs2/super.c osb->s_atime_quantum = OCFS2_DEFAULT_ATIME_QUANTUM; osb 2086 fs/ocfs2/super.c osb->slot_num = OCFS2_INVALID_SLOT; osb 2088 fs/ocfs2/super.c osb->s_xattr_inline_size = le16_to_cpu( osb 2091 fs/ocfs2/super.c osb->local_alloc_state = OCFS2_LA_UNUSED; osb 2092 fs/ocfs2/super.c osb->local_alloc_bh = NULL; osb 2093 fs/ocfs2/super.c INIT_DELAYED_WORK(&osb->la_enable_wq, ocfs2_la_enable_worker); osb 2095 fs/ocfs2/super.c init_waitqueue_head(&osb->osb_mount_event); osb 2097 fs/ocfs2/super.c status = ocfs2_resmap_init(osb, &osb->osb_la_resmap); osb 2103 fs/ocfs2/super.c osb->vol_label = kmalloc(OCFS2_MAX_VOL_LABEL_LEN, GFP_KERNEL); osb 2104 fs/ocfs2/super.c if (!osb->vol_label) { osb 2110 fs/ocfs2/super.c osb->slot_recovery_generations = osb 2111 fs/ocfs2/super.c kcalloc(osb->max_slots, sizeof(*osb->slot_recovery_generations), osb 2113 fs/ocfs2/super.c if (!osb->slot_recovery_generations) { osb 2119 fs/ocfs2/super.c init_waitqueue_head(&osb->osb_wipe_event); osb 2120 fs/ocfs2/super.c osb->osb_orphan_wipes = kcalloc(osb->max_slots, osb 2121 fs/ocfs2/super.c sizeof(*osb->osb_orphan_wipes), osb 2123 fs/ocfs2/super.c if (!osb->osb_orphan_wipes) { osb 2129 fs/ocfs2/super.c osb->osb_rf_lock_tree = RB_ROOT; osb 2131 fs/ocfs2/super.c osb->s_feature_compat = osb 2133 fs/ocfs2/super.c osb->s_feature_ro_compat = osb 2135 fs/ocfs2/super.c osb->s_feature_incompat = osb 2138 fs/ocfs2/super.c if ((i = OCFS2_HAS_INCOMPAT_FEATURE(osb->sb, ~OCFS2_FEATURE_INCOMPAT_SUPP))) { osb 2144 fs/ocfs2/super.c if (!sb_rdonly(osb->sb) && (i = OCFS2_HAS_RO_COMPAT_FEATURE(osb->sb, ~OCFS2_FEATURE_RO_COMPAT_SUPP))) { osb 2151 fs/ocfs2/super.c if (ocfs2_clusterinfo_valid(osb)) { osb 2152 fs/ocfs2/super.c osb->osb_stackflags = osb 2154 fs/ocfs2/super.c strlcpy(osb->osb_cluster_stack, osb 2157 fs/ocfs2/super.c if (strlen(osb->osb_cluster_stack) != OCFS2_STACK_LABEL_LEN) { osb 2161 fs/ocfs2/super.c osb->osb_cluster_stack); osb 2165 fs/ocfs2/super.c strlcpy(osb->osb_cluster_name, osb 2171 fs/ocfs2/super.c osb->osb_cluster_stack[0] = '\0'; osb 2174 fs/ocfs2/super.c get_random_bytes(&osb->s_next_generation, sizeof(u32)); osb 2191 fs/ocfs2/super.c osb->journal = journal; osb 2192 fs/ocfs2/super.c journal->j_osb = osb; osb 2203 fs/ocfs2/super.c INIT_WORK(&osb->dquot_drop_work, ocfs2_drop_dquot_refs); osb 2204 fs/ocfs2/super.c init_llist_head(&osb->dquot_drop_list); osb 2207 fs/ocfs2/super.c osb->s_clustersize_bits = osb 2209 fs/ocfs2/super.c osb->s_clustersize = 1 << osb->s_clustersize_bits; osb 2211 fs/ocfs2/super.c if (osb->s_clustersize < OCFS2_MIN_CLUSTERSIZE || osb 2212 fs/ocfs2/super.c osb->s_clustersize > OCFS2_MAX_CLUSTERSIZE) { osb 2214 fs/ocfs2/super.c osb->s_clustersize); osb 2219 fs/ocfs2/super.c total_blocks = ocfs2_clusters_to_blocks(osb->sb, osb 2222 fs/ocfs2/super.c status = generic_check_addressable(osb->sb->s_blocksize_bits, osb 2231 fs/ocfs2/super.c if (ocfs2_setup_osb_uuid(osb, di->id2.i_super.s_uuid, osb 2238 fs/ocfs2/super.c strlcpy(osb->vol_label, di->id2.i_super.s_label, osb 2240 fs/ocfs2/super.c osb->root_blkno = le64_to_cpu(di->id2.i_super.s_root_blkno); osb 2241 fs/ocfs2/super.c osb->system_dir_blkno = le64_to_cpu(di->id2.i_super.s_system_dir_blkno); osb 2242 fs/ocfs2/super.c osb->first_cluster_group_blkno = osb 2244 fs/ocfs2/super.c osb->fs_generation = le32_to_cpu(di->i_fs_generation); osb 2245 fs/ocfs2/super.c osb->uuid_hash = le32_to_cpu(di->id2.i_super.s_uuid_hash); osb 2246 fs/ocfs2/super.c trace_ocfs2_initialize_super(osb->vol_label, osb->uuid_str, osb 2247 fs/ocfs2/super.c (unsigned long long)osb->root_blkno, osb 2248 fs/ocfs2/super.c (unsigned long long)osb->system_dir_blkno, osb 2249 fs/ocfs2/super.c osb->s_clustersize_bits); osb 2251 fs/ocfs2/super.c osb->osb_dlm_debug = ocfs2_new_dlm_debug(); osb 2252 fs/ocfs2/super.c if (!osb->osb_dlm_debug) { osb 2258 fs/ocfs2/super.c atomic_set(&osb->vol_state, VOLUME_INIT); osb 2261 fs/ocfs2/super.c status = ocfs2_init_global_system_inodes(osb); osb 2270 fs/ocfs2/super.c inode = ocfs2_get_system_file_inode(osb, GLOBAL_BITMAP_SYSTEM_INODE, osb 2278 fs/ocfs2/super.c osb->bitmap_blkno = OCFS2_I(inode)->ip_blkno; osb 2279 fs/ocfs2/super.c osb->osb_clusters_at_boot = OCFS2_I(inode)->ip_clusters; osb 2282 fs/ocfs2/super.c osb->bitmap_cpg = ocfs2_group_bitmap_size(sb, 0, osb 2283 fs/ocfs2/super.c osb->s_feature_incompat) * 8; osb 2285 fs/ocfs2/super.c status = ocfs2_init_slot_info(osb); osb 2292 fs/ocfs2/super.c osb->ocfs2_wq = alloc_ordered_workqueue("ocfs2_wq", WQ_MEM_RECLAIM); osb 2293 fs/ocfs2/super.c if (!osb->ocfs2_wq) { osb 2373 fs/ocfs2/super.c static int ocfs2_check_volume(struct ocfs2_super *osb) osb 2383 fs/ocfs2/super.c status = ocfs2_journal_init(osb->journal, &dirty); osb 2391 fs/ocfs2/super.c status = ocfs2_journal_addressable(osb); osb 2399 fs/ocfs2/super.c status = ocfs2_journal_wipe(osb->journal, 0); osb 2406 fs/ocfs2/super.c "unmounted cleanly, recovering it.\n", osb->dev_str); osb 2409 fs/ocfs2/super.c local = ocfs2_mount_local(osb); osb 2412 fs/ocfs2/super.c status = ocfs2_journal_load(osb->journal, local, dirty); osb 2418 fs/ocfs2/super.c if (osb->s_mount_opt & OCFS2_MOUNT_JOURNAL_ASYNC_COMMIT) osb 2419 fs/ocfs2/super.c jbd2_journal_set_features(osb->journal->j_journal, osb 2423 fs/ocfs2/super.c jbd2_journal_clear_features(osb->journal->j_journal, osb 2429 fs/ocfs2/super.c status = ocfs2_begin_local_alloc_recovery(osb, osb 2430 fs/ocfs2/super.c osb->slot_num, osb 2440 fs/ocfs2/super.c status = ocfs2_load_local_alloc(osb); osb 2449 fs/ocfs2/super.c osb->local_alloc_copy = local_alloc; osb 2456 fs/ocfs2/super.c status = ocfs2_mark_dead_nodes(osb); osb 2462 fs/ocfs2/super.c status = ocfs2_compute_replay_slots(osb); osb 2480 fs/ocfs2/super.c static void ocfs2_delete_osb(struct ocfs2_super *osb) osb 2485 fs/ocfs2/super.c if (osb->ocfs2_wq) osb 2486 fs/ocfs2/super.c destroy_workqueue(osb->ocfs2_wq); osb 2488 fs/ocfs2/super.c ocfs2_free_slot_info(osb); osb 2490 fs/ocfs2/super.c kfree(osb->osb_orphan_wipes); osb 2491 fs/ocfs2/super.c kfree(osb->slot_recovery_generations); osb 2497 fs/ocfs2/super.c kfree(osb->journal); osb 2498 fs/ocfs2/super.c kfree(osb->local_alloc_copy); osb 2499 fs/ocfs2/super.c kfree(osb->uuid_str); osb 2500 fs/ocfs2/super.c kfree(osb->vol_label); osb 2501 fs/ocfs2/super.c ocfs2_put_dlm_debug(osb->osb_dlm_debug); osb 2502 fs/ocfs2/super.c memset(osb, 0, sizeof(struct ocfs2_super)); osb 2513 fs/ocfs2/super.c struct ocfs2_super *osb = OCFS2_SB(sb); osb 2516 fs/ocfs2/super.c ocfs2_set_osb_flag(osb, OCFS2_OSB_ERROR_FS); osb 2520 fs/ocfs2/super.c if (osb->s_mount_opt & OCFS2_MOUNT_ERRORS_PANIC) { osb 2523 fs/ocfs2/super.c } else if (osb->s_mount_opt & OCFS2_MOUNT_ERRORS_CONT) { osb 2528 fs/ocfs2/super.c if (sb_rdonly(sb) && (ocfs2_is_soft_readonly(osb) || ocfs2_is_hard_readonly(osb))) osb 2533 fs/ocfs2/super.c ocfs2_set_ro_flag(osb, 0); osb 28 fs/ocfs2/sysfile.c static struct inode * _ocfs2_get_system_file_inode(struct ocfs2_super *osb, osb 42 fs/ocfs2/sysfile.c static struct inode **get_local_system_inode(struct ocfs2_super *osb, osb 53 fs/ocfs2/sysfile.c spin_lock(&osb->osb_lock); osb 54 fs/ocfs2/sysfile.c local_system_inodes = osb->local_system_inodes; osb 55 fs/ocfs2/sysfile.c spin_unlock(&osb->osb_lock); osb 61 fs/ocfs2/sysfile.c osb->max_slots), osb 73 fs/ocfs2/sysfile.c spin_lock(&osb->osb_lock); osb 74 fs/ocfs2/sysfile.c if (osb->local_system_inodes) { osb 77 fs/ocfs2/sysfile.c local_system_inodes = osb->local_system_inodes; osb 79 fs/ocfs2/sysfile.c osb->local_system_inodes = local_system_inodes; osb 80 fs/ocfs2/sysfile.c spin_unlock(&osb->osb_lock); osb 90 fs/ocfs2/sysfile.c struct inode *ocfs2_get_system_file_inode(struct ocfs2_super *osb, osb 99 fs/ocfs2/sysfile.c arr = &(osb->global_system_inodes[type]); osb 101 fs/ocfs2/sysfile.c arr = get_local_system_inode(osb, type, slot); osb 103 fs/ocfs2/sysfile.c mutex_lock(&osb->system_file_mutex); osb 107 fs/ocfs2/sysfile.c mutex_unlock(&osb->system_file_mutex); osb 114 fs/ocfs2/sysfile.c inode = _ocfs2_get_system_file_inode(osb, type, slot); osb 121 fs/ocfs2/sysfile.c mutex_unlock(&osb->system_file_mutex); osb 125 fs/ocfs2/sysfile.c static struct inode * _ocfs2_get_system_file_inode(struct ocfs2_super *osb, osb 138 fs/ocfs2/sysfile.c status = ocfs2_lookup_ino_from_name(osb->sys_root_inode, namebuf, osb 144 fs/ocfs2/sysfile.c inode = ocfs2_iget(osb, blkno, OCFS2_FI_FLAG_SYSFILE, type); osb 15 fs/ocfs2/sysfile.h struct inode * ocfs2_get_system_file_inode(struct ocfs2_super *osb, osb 308 fs/ocfs2/xattr.c static inline u16 ocfs2_xattr_buckets_per_cluster(struct ocfs2_super *osb) osb 310 fs/ocfs2/xattr.c return (1 << osb->s_clustersize_bits) / OCFS2_XATTR_BUCKET_SIZE; osb 585 fs/ocfs2/xattr.c struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); osb 596 fs/ocfs2/xattr.c ret = ocfs2_reserve_new_metadata_blocks(osb, 1, xattr_ac); osb 625 fs/ocfs2/xattr.c struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); osb 632 fs/ocfs2/xattr.c if (osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) { osb 665 fs/ocfs2/xattr.c (S_ISDIR(mode) && ocfs2_supports_inline_data(osb)) || osb 688 fs/ocfs2/xattr.c if (osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL && osb 2369 fs/ocfs2/xattr.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 2391 fs/ocfs2/xattr.c ctxt.handle = ocfs2_start_trans(osb, ref_credits + osb 2392 fs/ocfs2/xattr.c ocfs2_remove_extent_credits(osb->sb)); osb 2401 fs/ocfs2/xattr.c ocfs2_commit_trans(osb, ctxt.handle); osb 2416 fs/ocfs2/xattr.c ocfs2_schedule_truncate_log_flush(osb, 1); osb 2417 fs/ocfs2/xattr.c ocfs2_run_deallocs(osb, &ctxt.dealloc); osb 2489 fs/ocfs2/xattr.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 2515 fs/ocfs2/xattr.c xb_alloc_inode = ocfs2_get_system_file_inode(osb, osb 2531 fs/ocfs2/xattr.c handle = ocfs2_start_trans(osb, OCFS2_SUBALLOC_FREE); osb 2543 fs/ocfs2/xattr.c ocfs2_commit_trans(osb, handle); osb 2723 fs/ocfs2/xattr.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 2724 fs/ocfs2/xattr.c unsigned int xattrsize = osb->s_xattr_inline_size; osb 3257 fs/ocfs2/xattr.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 3275 fs/ocfs2/xattr.c ret = ocfs2_reserve_new_metadata_blocks(osb, meta_add, osb 3284 fs/ocfs2/xattr.c ret = ocfs2_reserve_clusters(osb, clusters_add, &ctxt->data_ac); osb 3537 fs/ocfs2/xattr.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 3538 fs/ocfs2/xattr.c struct inode *tl_inode = osb->osb_tl_inode; osb 3559 fs/ocfs2/xattr.c if (!ocfs2_supports_xattr(osb)) osb 3622 fs/ocfs2/xattr.c if (ocfs2_truncate_log_needs_flush(osb)) { osb 3623 fs/ocfs2/xattr.c ret = __ocfs2_flush_truncate_log(osb); osb 3641 fs/ocfs2/xattr.c ctxt.handle = ocfs2_start_trans(osb, credits + ref_credits); osb 3651 fs/ocfs2/xattr.c ocfs2_commit_trans(osb, ctxt.handle); osb 3659 fs/ocfs2/xattr.c ocfs2_schedule_truncate_log_flush(osb, 1); osb 3660 fs/ocfs2/xattr.c ocfs2_run_deallocs(osb, &ctxt.dealloc); osb 3664 fs/ocfs2/xattr.c ocfs2_unlock_refcount_tree(osb, ref_tree, 1); osb 4882 fs/ocfs2/xattr.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 4884 fs/ocfs2/xattr.c int num_buckets = ocfs2_xattr_buckets_per_cluster(osb); osb 5110 fs/ocfs2/xattr.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 5137 fs/ocfs2/xattr.c block = ocfs2_clusters_to_blocks(osb->sb, bit_off); osb 5141 fs/ocfs2/xattr.c (prev_clusters + num_bits) << osb->s_clustersize_bits <= osb 5200 fs/ocfs2/xattr.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 5211 fs/ocfs2/xattr.c (num_clusters * ocfs2_xattr_buckets_per_cluster(osb))); osb 5280 fs/ocfs2/xattr.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 5311 fs/ocfs2/xattr.c num_buckets = ocfs2_xattr_buckets_per_cluster(osb) * num_clusters; osb 5425 fs/ocfs2/xattr.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 5426 fs/ocfs2/xattr.c struct inode *tl_inode = osb->osb_tl_inode; osb 5460 fs/ocfs2/xattr.c if (ocfs2_truncate_log_needs_flush(osb)) { osb 5461 fs/ocfs2/xattr.c ret = __ocfs2_flush_truncate_log(osb); osb 5468 fs/ocfs2/xattr.c handle = ocfs2_start_trans(osb, ocfs2_remove_extent_credits(osb->sb)); osb 5492 fs/ocfs2/xattr.c ret = ocfs2_truncate_log_append(osb, handle, blkno, len); osb 5498 fs/ocfs2/xattr.c ocfs2_commit_trans(osb, handle); osb 5500 fs/ocfs2/xattr.c ocfs2_schedule_truncate_log_flush(osb, 1); osb 5507 fs/ocfs2/xattr.c ocfs2_run_deallocs(osb, &dealloc); osb 5661 fs/ocfs2/xattr.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 5663 fs/ocfs2/xattr.c int credits = ocfs2_remove_extent_credits(osb->sb) + osb 5689 fs/ocfs2/xattr.c ctxt.handle = ocfs2_start_trans(osb, credits + ref_credits); osb 5699 fs/ocfs2/xattr.c ocfs2_commit_trans(osb, ctxt.handle); osb 5712 fs/ocfs2/xattr.c ocfs2_schedule_truncate_log_flush(osb, 1); osb 5713 fs/ocfs2/xattr.c ocfs2_run_deallocs(osb, &ctxt.dealloc); osb 5777 fs/ocfs2/xattr.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 5810 fs/ocfs2/xattr.c if (ocfs2_meta_ecc(osb)) { osb 5848 fs/ocfs2/xattr.c ret = ocfs2_lock_refcount_tree(osb, le64_to_cpu(di->i_refcount_loc), osb 6282 fs/ocfs2/xattr.c static int ocfs2_reflink_lock_xattr_allocators(struct ocfs2_super *osb, osb 6294 fs/ocfs2/xattr.c ret = ocfs2_value_metas_in_xattr_header(osb->sb, NULL, xh, osb 6310 fs/ocfs2/xattr.c num_recs = num_recs / ocfs2_refcount_recs_per_rb(osb->sb) * 2; osb 6319 fs/ocfs2/xattr.c ret = ocfs2_reserve_new_metadata_blocks(osb, meta_add, meta_ac); osb 6468 fs/ocfs2/xattr.c struct ocfs2_super *osb = OCFS2_SB(args->old_inode->i_sb); osb 6471 fs/ocfs2/xattr.c int header_off = osb->sb->s_blocksize - inline_size; osb 6484 fs/ocfs2/xattr.c ret = ocfs2_reflink_lock_xattr_allocators(osb, xh, args->ref_root_bh, osb 6491 fs/ocfs2/xattr.c handle = ocfs2_start_trans(osb, credits); osb 6538 fs/ocfs2/xattr.c ocfs2_commit_trans(osb, handle); osb 6552 fs/ocfs2/xattr.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 6556 fs/ocfs2/xattr.c ret = ocfs2_reserve_new_metadata_blocks(osb, 1, &ctxt.meta_ac); osb 6562 fs/ocfs2/xattr.c ctxt.handle = ocfs2_start_trans(osb, OCFS2_XATTR_BLOCK_CREATE_CREDITS); osb 6576 fs/ocfs2/xattr.c ocfs2_commit_trans(osb, ctxt.handle); osb 6590 fs/ocfs2/xattr.c struct ocfs2_super *osb = OCFS2_SB(args->new_inode->i_sb); osb 6604 fs/ocfs2/xattr.c ret = ocfs2_reflink_lock_xattr_allocators(osb, xh, args->ref_root_bh, osb 6612 fs/ocfs2/xattr.c handle = ocfs2_start_trans(osb, credits + 1); osb 6638 fs/ocfs2/xattr.c osb->sb->s_blocksize - header_off); osb 6661 fs/ocfs2/xattr.c ocfs2_commit_trans(osb, handle); osb 6756 fs/ocfs2/xattr.c struct ocfs2_super *osb = OCFS2_SB(args->reflink->old_inode->i_sb); osb 6783 fs/ocfs2/xattr.c (metas.num_recs + ocfs2_refcount_recs_per_rb(osb->sb) - 1) / osb 6784 fs/ocfs2/xattr.c ocfs2_refcount_recs_per_rb(osb->sb) * 2; osb 6805 fs/ocfs2/xattr.c *credits += ocfs2_calc_extend_credits(osb->sb, osb 6809 fs/ocfs2/xattr.c ret = ocfs2_reserve_new_metadata_blocks(osb, metas.num_metas, osb 6818 fs/ocfs2/xattr.c ret = ocfs2_reserve_clusters(osb, len, data_ac); osb 7006 fs/ocfs2/xattr.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 7025 fs/ocfs2/xattr.c handle = ocfs2_start_trans(osb, credits); osb 7038 fs/ocfs2/xattr.c ocfs2_commit_trans(osb, handle); osb 7345 fs/ocfs2/xattr.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 7347 fs/ocfs2/xattr.c if (osb->s_mount_opt & OCFS2_MOUNT_NOUSERXATTR) osb 7358 fs/ocfs2/xattr.c struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); osb 7360 fs/ocfs2/xattr.c if (osb->s_mount_opt & OCFS2_MOUNT_NOUSERXATTR)