Commit 6ffc2881 authored by Jan Kara's avatar Jan Kara Committed by Linus Torvalds

[PATCH] Fix reiserfs quota debug messages

Attached patch fixes debug messages of quota code in reiserfs so that they
compile.  Chris Mason agreed the patch.
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3bc5bf4e
...@@ -956,14 +956,14 @@ static inline int blocknrs_and_prealloc_arrays_from_search_start ...@@ -956,14 +956,14 @@ static inline int blocknrs_and_prealloc_arrays_from_search_start
if (!hint->formatted_node) { if (!hint->formatted_node) {
int quota_ret; int quota_ret;
#ifdef REISERQUOTA_DEBUG #ifdef REISERQUOTA_DEBUG
reiserfs_debug (s, "reiserquota: allocating %d blocks id=%u", amount_needed, hint->inode->i_uid); reiserfs_debug (s, REISERFS_DEBUG_CODE, "reiserquota: allocating %d blocks id=%u", amount_needed, hint->inode->i_uid);
#endif #endif
quota_ret = DQUOT_ALLOC_BLOCK_NODIRTY(hint->inode, amount_needed); quota_ret = DQUOT_ALLOC_BLOCK_NODIRTY(hint->inode, amount_needed);
if (quota_ret) /* Quota exceeded? */ if (quota_ret) /* Quota exceeded? */
return QUOTA_EXCEEDED; return QUOTA_EXCEEDED;
if (hint->preallocate && hint->prealloc_size ) { if (hint->preallocate && hint->prealloc_size ) {
#ifdef REISERQUOTA_DEBUG #ifdef REISERQUOTA_DEBUG
reiserfs_debug (s, "reiserquota: allocating (prealloc) %d blocks id=%u", hint->prealloc_size, hint->inode->i_uid); reiserfs_debug (s, REISERFS_DEBUG_CODE, "reiserquota: allocating (prealloc) %d blocks id=%u", hint->prealloc_size, hint->inode->i_uid);
#endif #endif
quota_ret = DQUOT_PREALLOC_BLOCK_NODIRTY(hint->inode, hint->prealloc_size); quota_ret = DQUOT_PREALLOC_BLOCK_NODIRTY(hint->inode, hint->prealloc_size);
if (quota_ret) if (quota_ret)
...@@ -1009,7 +1009,7 @@ static inline int blocknrs_and_prealloc_arrays_from_search_start ...@@ -1009,7 +1009,7 @@ static inline int blocknrs_and_prealloc_arrays_from_search_start
/* Free the blocks */ /* Free the blocks */
if (!hint->formatted_node) { if (!hint->formatted_node) {
#ifdef REISERQUOTA_DEBUG #ifdef REISERQUOTA_DEBUG
reiserfs_debug (s, "reiserquota: freeing (nospace) %d blocks id=%u", amount_needed + hint->prealloc_size - nr_allocated, hint->inode->i_uid); reiserfs_debug (s, REISERFS_DEBUG_CODE, "reiserquota: freeing (nospace) %d blocks id=%u", amount_needed + hint->prealloc_size - nr_allocated, hint->inode->i_uid);
#endif #endif
DQUOT_FREE_BLOCK_NODIRTY(hint->inode, amount_needed + hint->prealloc_size - nr_allocated); /* Free not allocated blocks */ DQUOT_FREE_BLOCK_NODIRTY(hint->inode, amount_needed + hint->prealloc_size - nr_allocated); /* Free not allocated blocks */
} }
...@@ -1029,7 +1029,7 @@ static inline int blocknrs_and_prealloc_arrays_from_search_start ...@@ -1029,7 +1029,7 @@ static inline int blocknrs_and_prealloc_arrays_from_search_start
nr_allocated + REISERFS_I(hint->inode)->i_prealloc_count) { nr_allocated + REISERFS_I(hint->inode)->i_prealloc_count) {
/* Some of preallocation blocks were not allocated */ /* Some of preallocation blocks were not allocated */
#ifdef REISERQUOTA_DEBUG #ifdef REISERQUOTA_DEBUG
reiserfs_debug (s, "reiserquota: freeing (failed prealloc) %d blocks id=%u", amount_needed + hint->prealloc_size - nr_allocated - INODE_INFO(hint->inode)->i_prealloc_count, hint->inode->i_uid); reiserfs_debug (s, REISERFS_DEBUG_CODE, "reiserquota: freeing (failed prealloc) %d blocks id=%u", amount_needed + hint->prealloc_size - nr_allocated - REISERFS_I(hint->inode)->i_prealloc_count, hint->inode->i_uid);
#endif #endif
DQUOT_FREE_BLOCK_NODIRTY(hint->inode, amount_needed + DQUOT_FREE_BLOCK_NODIRTY(hint->inode, amount_needed +
hint->prealloc_size - nr_allocated - hint->prealloc_size - nr_allocated -
......
...@@ -1388,7 +1388,7 @@ int reiserfs_delete_item (struct reiserfs_transaction_handle *th, ...@@ -1388,7 +1388,7 @@ int reiserfs_delete_item (struct reiserfs_transaction_handle *th,
do_balance(&s_del_balance, NULL, NULL, M_DELETE); do_balance(&s_del_balance, NULL, NULL, M_DELETE);
#ifdef REISERQUOTA_DEBUG #ifdef REISERQUOTA_DEBUG
reiserfs_debug (p_s_sb, "reiserquota delete_item(): freeing %u, id=%u type=%c", quota_cut_bytes, p_s_inode->i_uid, head2type(&s_ih)); reiserfs_debug (p_s_sb, REISERFS_DEBUG_CODE, "reiserquota delete_item(): freeing %u, id=%u type=%c", quota_cut_bytes, p_s_inode->i_uid, head2type(&s_ih));
#endif #endif
DQUOT_FREE_SPACE_NODIRTY(p_s_inode, quota_cut_bytes); DQUOT_FREE_SPACE_NODIRTY(p_s_inode, quota_cut_bytes);
...@@ -1465,7 +1465,7 @@ void reiserfs_delete_solid_item (struct reiserfs_transaction_handle *th, ...@@ -1465,7 +1465,7 @@ void reiserfs_delete_solid_item (struct reiserfs_transaction_handle *th,
do_balance (&tb, NULL, NULL, M_DELETE); do_balance (&tb, NULL, NULL, M_DELETE);
if (inode) { /* Should we count quota for item? (we don't count quotas for save-links) */ if (inode) { /* Should we count quota for item? (we don't count quotas for save-links) */
#ifdef REISERQUOTA_DEBUG #ifdef REISERQUOTA_DEBUG
reiserfs_debug (th->t_super, "reiserquota delete_solid_item(): freeing %u id=%u type=%c", quota_cut_bytes, inode->i_uid, key2type(key)); reiserfs_debug (th->t_super, REISERFS_DEBUG_CODE, "reiserquota delete_solid_item(): freeing %u id=%u type=%c", quota_cut_bytes, inode->i_uid, key2type(key));
#endif #endif
DQUOT_FREE_SPACE_NODIRTY(inode, quota_cut_bytes); DQUOT_FREE_SPACE_NODIRTY(inode, quota_cut_bytes);
} }
...@@ -1786,7 +1786,7 @@ int reiserfs_cut_from_item (struct reiserfs_transaction_handle *th, ...@@ -1786,7 +1786,7 @@ int reiserfs_cut_from_item (struct reiserfs_transaction_handle *th,
REISERFS_I(p_s_inode)->i_flags &= ~i_pack_on_close_mask ; REISERFS_I(p_s_inode)->i_flags &= ~i_pack_on_close_mask ;
} }
#ifdef REISERQUOTA_DEBUG #ifdef REISERQUOTA_DEBUG
reiserfs_debug (p_s_inode->i_sb, "reiserquota cut_from_item(): freeing %u id=%u type=%c", quota_cut_bytes, p_s_inode->i_uid, '?'); reiserfs_debug (p_s_inode->i_sb, REISERFS_DEBUG_CODE, "reiserquota cut_from_item(): freeing %u id=%u type=%c", quota_cut_bytes, p_s_inode->i_uid, '?');
#endif #endif
DQUOT_FREE_SPACE_NODIRTY(p_s_inode, quota_cut_bytes); DQUOT_FREE_SPACE_NODIRTY(p_s_inode, quota_cut_bytes);
return n_ret_value; return n_ret_value;
...@@ -1999,7 +1999,7 @@ int reiserfs_paste_into_item (struct reiserfs_transaction_handle *th, ...@@ -1999,7 +1999,7 @@ int reiserfs_paste_into_item (struct reiserfs_transaction_handle *th,
fs_gen = get_generation(inode->i_sb) ; fs_gen = get_generation(inode->i_sb) ;
#ifdef REISERQUOTA_DEBUG #ifdef REISERQUOTA_DEBUG
reiserfs_debug (inode->i_sb, "reiserquota paste_into_item(): allocating %u id=%u type=%c", n_pasted_size, inode->i_uid, key2type(&(p_s_key->on_disk_key))); reiserfs_debug (inode->i_sb, REISERFS_DEBUG_CODE, "reiserquota paste_into_item(): allocating %u id=%u type=%c", n_pasted_size, inode->i_uid, key2type(&(p_s_key->on_disk_key)));
#endif #endif
if (DQUOT_ALLOC_SPACE_NODIRTY(inode, n_pasted_size)) { if (DQUOT_ALLOC_SPACE_NODIRTY(inode, n_pasted_size)) {
...@@ -2048,7 +2048,7 @@ REPEAT_SEARCH ) { ...@@ -2048,7 +2048,7 @@ REPEAT_SEARCH ) {
/* this also releases the path */ /* this also releases the path */
unfix_nodes(&s_paste_balance); unfix_nodes(&s_paste_balance);
#ifdef REISERQUOTA_DEBUG #ifdef REISERQUOTA_DEBUG
reiserfs_debug (inode->i_sb, "reiserquota paste_into_item(): freeing %u id=%u type=%c", n_pasted_size, inode->i_uid, key2type(&(p_s_key->on_disk_key))); reiserfs_debug (inode->i_sb, REISERFS_DEBUG_CODE, "reiserquota paste_into_item(): freeing %u id=%u type=%c", n_pasted_size, inode->i_uid, key2type(&(p_s_key->on_disk_key)));
#endif #endif
DQUOT_FREE_SPACE_NODIRTY(inode, n_pasted_size); DQUOT_FREE_SPACE_NODIRTY(inode, n_pasted_size);
return retval ; return retval ;
...@@ -2081,7 +2081,7 @@ int reiserfs_insert_item(struct reiserfs_transaction_handle *th, ...@@ -2081,7 +2081,7 @@ int reiserfs_insert_item(struct reiserfs_transaction_handle *th,
quota_bytes = inode->i_sb->s_blocksize + UNFM_P_SIZE ; quota_bytes = inode->i_sb->s_blocksize + UNFM_P_SIZE ;
} }
#ifdef REISERQUOTA_DEBUG #ifdef REISERQUOTA_DEBUG
reiserfs_debug (inode->i_sb, "reiserquota insert_item(): allocating %u id=%u type=%c", quota_bytes, inode->i_uid, head2type(p_s_ih)); reiserfs_debug (inode->i_sb, REISERFS_DEBUG_CODE, "reiserquota insert_item(): allocating %u id=%u type=%c", quota_bytes, inode->i_uid, head2type(p_s_ih));
#endif #endif
/* We can't dirty inode here. It would be immediately written but /* We can't dirty inode here. It would be immediately written but
* appropriate stat item isn't inserted yet... */ * appropriate stat item isn't inserted yet... */
...@@ -2127,7 +2127,7 @@ int reiserfs_insert_item(struct reiserfs_transaction_handle *th, ...@@ -2127,7 +2127,7 @@ int reiserfs_insert_item(struct reiserfs_transaction_handle *th,
/* also releases the path */ /* also releases the path */
unfix_nodes(&s_ins_balance); unfix_nodes(&s_ins_balance);
#ifdef REISERQUOTA_DEBUG #ifdef REISERQUOTA_DEBUG
reiserfs_debug (th->t_super, "reiserquota insert_item(): freeing %u id=%u type=%c", quota_bytes, inode->i_uid, head2type(p_s_ih)); reiserfs_debug (th->t_super, REISERFS_DEBUG_CODE, "reiserquota insert_item(): freeing %u id=%u type=%c", quota_bytes, inode->i_uid, head2type(p_s_ih));
#endif #endif
if (inode) if (inode)
DQUOT_FREE_SPACE_NODIRTY(inode, quota_bytes) ; DQUOT_FREE_SPACE_NODIRTY(inode, quota_bytes) ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment