Lines Matching defs:chunk

35 /* Number of blocks with entries in one chunk */
43 /* Number of entries in a chunk bitmap */
49 /* Offset of the chunk in quota file */
52 /* 1 block for local quota file info, 1 block per chunk for chunk info */
82 /* Compute offset in the chunk of a structure with the given offset */
296 int chunk,
304 rc->rc_chunk = chunk;
470 int bit, chunk;
477 chunk = rchunk->rc_chunk;
480 ol_quota_chunk_block(sb, chunk),
490 ol_dqblk_block(sb, chunk, bit),
497 ol_dqblk_block_off(sb, chunk, bit));
811 struct ocfs2_quota_chunk *chunk;
819 list_for_each_entry(chunk, &oinfo->dqi_chunk, qc_chunk) {
821 (chunk->qc_headerbh->b_data);
822 if (chunk->qc_num < oinfo->dqi_chunks - 1) {
826 ol_quota_chunk_block(sb, chunk->qc_num) - 1)
924 struct ocfs2_quota_chunk *chunk;
928 list_for_each_entry(chunk, &oinfo->dqi_chunk, qc_chunk) {
930 chunk->qc_headerbh->b_data;
939 if (chunk->qc_num < oinfo->dqi_chunks - 1) {
943 ol_quota_chunk_block(sb, chunk->qc_num) - 1)
950 mlog(ML_ERROR, "Did not find empty entry in chunk %d with %u"
951 " entries free (type=%d)\n", chunk->qc_num,
956 return chunk;
959 /* Add new chunk to the local quota file */
968 struct ocfs2_quota_chunk *chunk = NULL;
990 chunk = kmem_cache_alloc(ocfs2_qf_chunk_cachep, GFP_NOFS);
991 if (!chunk) {
1006 /* Initialize chunk header */
1074 list_add_tail(&chunk->qc_chunk, &oinfo->dqi_chunk);
1075 chunk->qc_num = list_entry(chunk->qc_chunk.prev,
1078 chunk->qc_headerbh = bh;
1080 return chunk;
1086 kmem_cache_free(ocfs2_qf_chunk_cachep, chunk);
1098 struct ocfs2_quota_chunk *chunk;
1110 /* Is the last chunk full? */
1111 chunk = list_entry(oinfo->dqi_chunk.prev,
1114 ol_quota_chunk_block(sb, chunk->qc_num) - 1;
1148 /* Local quota info, chunk header and the new block we initialize */
1169 /* Update chunk header */
1171 chunk->qc_headerbh,
1178 dchunk = (struct ocfs2_local_disk_chunk *)chunk->qc_headerbh->b_data;
1179 lock_buffer(chunk->qc_headerbh);
1181 unlock_buffer(chunk->qc_headerbh);
1182 ocfs2_journal_dirty(handle, chunk->qc_headerbh);
1198 return chunk;
1221 struct ocfs2_quota_chunk *chunk;
1228 chunk = ocfs2_find_free_entry(sb, type, &offset);
1229 if (!chunk) {
1230 chunk = ocfs2_extend_local_quota_file(sb, type, &offset);
1231 if (IS_ERR(chunk)) {
1232 status = PTR_ERR(chunk);
1235 } else if (IS_ERR(chunk)) {
1236 status = PTR_ERR(chunk);
1239 od->dq_local_off = ol_dqblk_off(sb, chunk->qc_num, offset);
1240 od->dq_chunk = chunk;
1242 ol_dqblk_block(sb, chunk->qc_num, offset),
1255 status = ocfs2_modify_bh(lqinode, chunk->qc_headerbh, olq_alloc_dquot,