From 009f78a91cb19c248a22eff6070aa4403123ec0f Mon Sep 17 00:00:00 2001 From: wangdi Date: Sat, 2 Dec 2006 05:57:03 +0000 Subject: [PATCH] Branch:b_new_cmd add debug_info for debuging LASSERT when test17 --- lustre/llite/llite_close.c | 8 ++++++-- lustre/llite/llite_lib.c | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lustre/llite/llite_close.c b/lustre/llite/llite_close.c index f39f91b..4947776 100644 --- a/lustre/llite/llite_close.c +++ b/lustre/llite/llite_close.c @@ -74,6 +74,9 @@ void ll_queue_done_writing(struct inode *inode, unsigned long flags) list_empty(&lli->lli_pending_write_llaps)) { struct ll_close_queue *lcq = ll_i2sbi(inode)->ll_lcq; + LASSERTF(!(lli->lli_flags & LLIF_MDS_SIZE_LOCK), + "inode ino %lu/%u lli_flags %lu\n", inode->i_ino, + inode->i_generation, lli->lli_flags); /* DONE_WRITING is allowed and inode has no dirty page. */ spin_lock(&lcq->lcq_lock); @@ -146,12 +149,13 @@ void ll_epoch_close(struct inode *inode, struct md_op_data *op_data, GOTO(out, 0); } } - + spin_unlock(&lli->lli_lock); op_data->op_flags |= MF_SOM_CHANGE; /* Check if Size-on-MDS attributes are valid. */ - LASSERT(!(lli->lli_flags & LLIF_MDS_SIZE_LOCK)); + LASSERTF(!(lli->lli_flags & LLIF_MDS_SIZE_LOCK), + "inode %lu flags %lu \n", inode->i_ino, lli->lli_flags); if (!ll_local_size(inode)) { /* Send Size-on-MDS Attributes if valid. */ op_data->op_attr.ia_valid |= ATTR_MTIME_SET | ATTR_CTIME_SET | diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 6283137..e8ef86d 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -1818,6 +1818,11 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md) if (body->valid & OBD_MD_FLSIZE) { inode->i_size = body->size; + LASSERTF(!(lli->lli_flags & + (LLIF_DONE_WRITING | LLIF_EPOCH_PENDING)), + "ino %lu flags %lu has size authority!\n", + inode->i_ino, lli->lli_flags); + if (body->valid & OBD_MD_FLBLOCKS) inode->i_blocks = body->blocks; -- 1.8.3.1