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)
921 struct ocfs2_quota_chunk *chunk = NULL, *iter;
929 chunk = iter;
933 if (!chunk)
936 if (chunk->qc_num < oinfo->dqi_chunks - 1) {
940 ol_quota_chunk_block(sb, chunk->qc_num) - 1)
947 mlog(ML_ERROR, "Did not find empty entry in chunk %d with %u"
948 " entries free (type=%d)\n", chunk->qc_num,
953 return chunk;
956 /* Add new chunk to the local quota file */
965 struct ocfs2_quota_chunk *chunk = NULL;
987 chunk = kmem_cache_alloc(ocfs2_qf_chunk_cachep, GFP_NOFS);
988 if (!chunk) {
1003 /* Initialize chunk header */
1071 list_add_tail(&chunk->qc_chunk, &oinfo->dqi_chunk);
1072 chunk->qc_num = list_entry(chunk->qc_chunk.prev,
1075 chunk->qc_headerbh = bh;
1077 return chunk;
1083 kmem_cache_free(ocfs2_qf_chunk_cachep, chunk);
1095 struct ocfs2_quota_chunk *chunk;
1107 /* Is the last chunk full? */
1108 chunk = list_entry(oinfo->dqi_chunk.prev,
1111 ol_quota_chunk_block(sb, chunk->qc_num) - 1;
1145 /* Local quota info, chunk header and the new block we initialize */
1166 /* Update chunk header */
1168 chunk->qc_headerbh,
1175 dchunk = (struct ocfs2_local_disk_chunk *)chunk->qc_headerbh->b_data;
1176 lock_buffer(chunk->qc_headerbh);
1178 unlock_buffer(chunk->qc_headerbh);
1179 ocfs2_journal_dirty(handle, chunk->qc_headerbh);
1195 return chunk;
1218 struct ocfs2_quota_chunk *chunk;
1225 chunk = ocfs2_find_free_entry(sb, type, &offset);
1226 if (!chunk) {
1227 chunk = ocfs2_extend_local_quota_file(sb, type, &offset);
1228 if (IS_ERR(chunk)) {
1229 status = PTR_ERR(chunk);
1232 } else if (IS_ERR(chunk)) {
1233 status = PTR_ERR(chunk);
1236 od->dq_local_off = ol_dqblk_off(sb, chunk->qc_num, offset);
1237 od->dq_chunk = chunk;
1239 ol_dqblk_block(sb, chunk->qc_num, offset),
1252 status = ocfs2_modify_bh(lqinode, chunk->qc_headerbh, olq_alloc_dquot,