OpenVZ Forum - RDF feed
type: channel
items: [PATCH] More vzdquota debugging for #341, #116, #177

[PATCH] More vzdquota debugging for #341, #116, #177
type: item
description: * Extend ->origin into array for previous origin tracking. * Print last two origins in debugging message. * Also print i_mode, i_op, i_fop, ... of the offending inode. diff --git a/fs/vzdquot.c b/fs/vzdquot.c index e723ec7..c5148b8 100644 --- a/fs/vzdquot.c +++ b/fs/vzdquot.c @@ -549,10 +549,17 @@ static inline int vzquota_qlnk_is_empty( return qlnk->qmblk == __VZ_QUOTA_EMPTY; } +static inline void set_qlnk_origin(struct vz_quota_ilink *qlnk, + unsigned char origin) +{ + qlnk->origin[0] = qlnk->origin[1]; + qlnk->origin[1] = origin; +} + static inline void vzquota_qlnk_set_empty(struct vz_quota_ilink *qlnk) { qlnk->qmblk = __VZ_QUOTA_EMPTY; - qlnk->origin = VZ_QUOTAO_SETE; + set_qlnk_origin(qlnk, VZ_QUOTAO_SETE); } void vzquota_qlnk_init(struct vz_quota_ilink *qlnk) @@ -560,7 +567,7 @@ void vzquota_qlnk_init(struct vz_quota_i memset(qlnk, 0, sizeof(*qlnk)); INIT_LIST_HEAD(&qlnk->list); vzquota_qlnk_set_empty(qlnk); - qlnk->origin = VZ_QUOTAO_INIT; + set_qlnk_origin(qlnk, VZ_QUOTAO_INIT); } void vzquota_qlnk_destroy(struct vz_quota_ilink *qlnk) @@ -587,7 +594,7 @@ #if defined(CONFIG_VZ_QUOTA_UGID) #endif if (qlnk->qmblk != NULL && qlnk->qmblk != VZ_QUOTA_BAD) qmblk_put(qlnk->qmblk); - qlnk->origin = VZ_QUOTAO_DESTR; + set_qlnk_origin(qlnk, VZ_QUOTAO_DESTR); } /** @@ -613,7 +620,7 @@ static void vzquota_qlnk_swap(struct vz_ if (qb != __VZ_QUOTA_EMPTY && qb != VZ_QUOTA_BAD) list_add(&qli->list, &qb->dq_ilink_list); INIT_LIST_HEAD(&qlt->list); - qli->origin = VZ_QUOTAO_SWAP; + set_qlnk_origin(qli, VZ_QUOTAO_SWAP); for (i = 0; i < MAXQUOTAS; i++) { qu = qlt->qugid[i]; @@ -774,7 +781,7 @@ static void __vzquota_inode_init(struct vzquota_qlnk_init(INODE_QLNK(inode)); inode->i_dquot[USRQUOTA] = (void *)~(unsigned long)NODQUOT; } - INODE_QLNK(inode)->origin = origin; + set_qlnk_origin(INODE_QLNK(inode), origin); } /** @@ -789,7 +796,7 @@ static void vzquota_inode_drop(struct in vzquota_qlnk_init(&qlnk); inode_qmblk_lock(inode->i_sb); vzquota_qlnk_swap(&qlnk, INODE_QLNK(inode)…
creator: Alexey Dobriyan
date: 2006-11-13T16:22:06-00:00