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()
816 struct ocfs2_quota_chunk *chunk; in ocfs2_local_free_info() local
824 list_for_each_entry(chunk, &oinfo->dqi_chunk, qc_chunk) { in ocfs2_local_free_info()
826 (chunk->qc_headerbh->b_data); in ocfs2_local_free_info()
827 if (chunk->qc_num < oinfo->dqi_chunks - 1) { in ocfs2_local_free_info()
831 ol_quota_chunk_block(sb, chunk->qc_num) - 1) in ocfs2_local_free_info()
926 struct ocfs2_quota_chunk *chunk; in ocfs2_find_free_entry() local
930 list_for_each_entry(chunk, &oinfo->dqi_chunk, qc_chunk) { in ocfs2_find_free_entry()
932 chunk->qc_headerbh->b_data; in ocfs2_find_free_entry()
941 if (chunk->qc_num < oinfo->dqi_chunks - 1) { in ocfs2_find_free_entry()
945 ol_quota_chunk_block(sb, chunk->qc_num) - 1) in ocfs2_find_free_entry()
953 " entries free (type=%d)\n", chunk->qc_num, in ocfs2_find_free_entry()
958 return chunk; in ocfs2_find_free_entry()
970 struct ocfs2_quota_chunk *chunk = NULL; in ocfs2_local_quota_add_chunk() local
992 chunk = kmem_cache_alloc(ocfs2_qf_chunk_cachep, GFP_NOFS); in ocfs2_local_quota_add_chunk()
993 if (!chunk) { in ocfs2_local_quota_add_chunk()
1076 list_add_tail(&chunk->qc_chunk, &oinfo->dqi_chunk); in ocfs2_local_quota_add_chunk()
1077 chunk->qc_num = list_entry(chunk->qc_chunk.prev, in ocfs2_local_quota_add_chunk()
1080 chunk->qc_headerbh = bh; in ocfs2_local_quota_add_chunk()
1082 return chunk; in ocfs2_local_quota_add_chunk()
1088 kmem_cache_free(ocfs2_qf_chunk_cachep, chunk); in ocfs2_local_quota_add_chunk()
1100 struct ocfs2_quota_chunk *chunk; in ocfs2_extend_local_quota_file() local
1113 chunk = list_entry(oinfo->dqi_chunk.prev, in ocfs2_extend_local_quota_file()
1116 ol_quota_chunk_block(sb, chunk->qc_num) - 1; in ocfs2_extend_local_quota_file()
1173 chunk->qc_headerbh, in ocfs2_extend_local_quota_file()
1180 dchunk = (struct ocfs2_local_disk_chunk *)chunk->qc_headerbh->b_data; in ocfs2_extend_local_quota_file()
1181 lock_buffer(chunk->qc_headerbh); in ocfs2_extend_local_quota_file()
1183 unlock_buffer(chunk->qc_headerbh); in ocfs2_extend_local_quota_file()
1184 ocfs2_journal_dirty(handle, chunk->qc_headerbh); in ocfs2_extend_local_quota_file()
1200 return chunk; in ocfs2_extend_local_quota_file()
1223 struct ocfs2_quota_chunk *chunk; in ocfs2_create_local_dquot() local
1230 chunk = ocfs2_find_free_entry(sb, type, &offset); in ocfs2_create_local_dquot()
1231 if (!chunk) { in ocfs2_create_local_dquot()
1232 chunk = ocfs2_extend_local_quota_file(sb, type, &offset); in ocfs2_create_local_dquot()
1233 if (IS_ERR(chunk)) { in ocfs2_create_local_dquot()
1234 status = PTR_ERR(chunk); in ocfs2_create_local_dquot()
1237 } else if (IS_ERR(chunk)) { in ocfs2_create_local_dquot()
1238 status = PTR_ERR(chunk); in ocfs2_create_local_dquot()
1241 od->dq_local_off = ol_dqblk_off(sb, chunk->qc_num, offset); in ocfs2_create_local_dquot()
1242 od->dq_chunk = chunk; in ocfs2_create_local_dquot()
1244 ol_dqblk_block(sb, chunk->qc_num, offset), in ocfs2_create_local_dquot()
1257 status = ocfs2_modify_bh(lqinode, chunk->qc_headerbh, olq_alloc_dquot, in ocfs2_create_local_dquot()