Lines Matching refs:chunk
296 int chunk, in ocfs2_add_recovery_chunk() argument
304 rc->rc_chunk = chunk; in ocfs2_add_recovery_chunk()
470 int bit, chunk; in ocfs2_recover_local_quota_file() local
477 chunk = rchunk->rc_chunk; in ocfs2_recover_local_quota_file()
480 ol_quota_chunk_block(sb, chunk), in ocfs2_recover_local_quota_file()
490 ol_dqblk_block(sb, chunk, bit), in ocfs2_recover_local_quota_file()
497 ol_dqblk_block_off(sb, chunk, bit)); in ocfs2_recover_local_quota_file()
811 struct ocfs2_quota_chunk *chunk; in ocfs2_local_free_info() local
819 list_for_each_entry(chunk, &oinfo->dqi_chunk, qc_chunk) { in ocfs2_local_free_info()
821 (chunk->qc_headerbh->b_data); in ocfs2_local_free_info()
822 if (chunk->qc_num < oinfo->dqi_chunks - 1) { in ocfs2_local_free_info()
826 ol_quota_chunk_block(sb, chunk->qc_num) - 1) in ocfs2_local_free_info()
924 struct ocfs2_quota_chunk *chunk; in ocfs2_find_free_entry() local
928 list_for_each_entry(chunk, &oinfo->dqi_chunk, qc_chunk) { in ocfs2_find_free_entry()
930 chunk->qc_headerbh->b_data; in ocfs2_find_free_entry()
939 if (chunk->qc_num < oinfo->dqi_chunks - 1) { in ocfs2_find_free_entry()
943 ol_quota_chunk_block(sb, chunk->qc_num) - 1) in ocfs2_find_free_entry()
951 " entries free (type=%d)\n", chunk->qc_num, in ocfs2_find_free_entry()
956 return chunk; in ocfs2_find_free_entry()
968 struct ocfs2_quota_chunk *chunk = NULL; in ocfs2_local_quota_add_chunk() local
990 chunk = kmem_cache_alloc(ocfs2_qf_chunk_cachep, GFP_NOFS); in ocfs2_local_quota_add_chunk()
991 if (!chunk) { in ocfs2_local_quota_add_chunk()
1074 list_add_tail(&chunk->qc_chunk, &oinfo->dqi_chunk); in ocfs2_local_quota_add_chunk()
1075 chunk->qc_num = list_entry(chunk->qc_chunk.prev, in ocfs2_local_quota_add_chunk()
1078 chunk->qc_headerbh = bh; in ocfs2_local_quota_add_chunk()
1080 return chunk; in ocfs2_local_quota_add_chunk()
1086 kmem_cache_free(ocfs2_qf_chunk_cachep, chunk); in ocfs2_local_quota_add_chunk()
1098 struct ocfs2_quota_chunk *chunk; in ocfs2_extend_local_quota_file() local
1111 chunk = list_entry(oinfo->dqi_chunk.prev, in ocfs2_extend_local_quota_file()
1114 ol_quota_chunk_block(sb, chunk->qc_num) - 1; in ocfs2_extend_local_quota_file()
1171 chunk->qc_headerbh, in ocfs2_extend_local_quota_file()
1178 dchunk = (struct ocfs2_local_disk_chunk *)chunk->qc_headerbh->b_data; in ocfs2_extend_local_quota_file()
1179 lock_buffer(chunk->qc_headerbh); in ocfs2_extend_local_quota_file()
1181 unlock_buffer(chunk->qc_headerbh); in ocfs2_extend_local_quota_file()
1182 ocfs2_journal_dirty(handle, chunk->qc_headerbh); in ocfs2_extend_local_quota_file()
1198 return chunk; in ocfs2_extend_local_quota_file()
1221 struct ocfs2_quota_chunk *chunk; in ocfs2_create_local_dquot() local
1228 chunk = ocfs2_find_free_entry(sb, type, &offset); in ocfs2_create_local_dquot()
1229 if (!chunk) { in ocfs2_create_local_dquot()
1230 chunk = ocfs2_extend_local_quota_file(sb, type, &offset); in ocfs2_create_local_dquot()
1231 if (IS_ERR(chunk)) { in ocfs2_create_local_dquot()
1232 status = PTR_ERR(chunk); in ocfs2_create_local_dquot()
1235 } else if (IS_ERR(chunk)) { in ocfs2_create_local_dquot()
1236 status = PTR_ERR(chunk); in ocfs2_create_local_dquot()
1239 od->dq_local_off = ol_dqblk_off(sb, chunk->qc_num, offset); in ocfs2_create_local_dquot()
1240 od->dq_chunk = chunk; in ocfs2_create_local_dquot()
1242 ol_dqblk_block(sb, chunk->qc_num, offset), in ocfs2_create_local_dquot()
1255 status = ocfs2_modify_bh(lqinode, chunk->qc_headerbh, olq_alloc_dquot, in ocfs2_create_local_dquot()