From patchwork Tue Jun 7 17:30:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Rees X-Patchwork-Id: 858312 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p57HUsQn020397 for ; Tue, 7 Jun 2011 17:30:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757383Ab1FGRak (ORCPT ); Tue, 7 Jun 2011 13:30:40 -0400 Received: from int-mailstore01.merit.edu ([207.75.116.232]:50767 "EHLO int-mailstore01.merit.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756761Ab1FGRak (ORCPT ); Tue, 7 Jun 2011 13:30:40 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by int-mailstore01.merit.edu (Postfix) with ESMTP id B7633305A9CC; Tue, 7 Jun 2011 13:30:39 -0400 (EDT) X-Virus-Scanned: amavisd-new at int-mailstore01.merit.edu Received: from int-mailstore01.merit.edu ([127.0.0.1]) by localhost (int-mailstore01.merit.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Mr15oSimkWyV; Tue, 7 Jun 2011 13:30:39 -0400 (EDT) Received: from merit.edu (host-17.subnet-17.med.umich.edu [141.214.17.17]) by int-mailstore01.merit.edu (Postfix) with ESMTPSA id 32AC33055B74; Tue, 7 Jun 2011 13:30:39 -0400 (EDT) Date: Tue, 7 Jun 2011 13:30:38 -0400 From: Jim Rees To: Benny Halevy Cc: linux-nfs@vger.kernel.org, peter honeyman Subject: [PATCH 39/88] pnfsblock: debugging dprintks for clist info Message-ID: <993ea6b9602ce4fdc128ae2490277b9cb3023b9d.1307464382.git.rees@umich.edu> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 07 Jun 2011 17:30:55 +0000 (UTC) From: Fred Isaman Signed-off-by: Fred Isaman Signed-off-by: Benny Halevy --- fs/nfs/blocklayout/extents.c | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/fs/nfs/blocklayout/extents.c b/fs/nfs/blocklayout/extents.c index a05ee2a..98452ca 100644 --- a/fs/nfs/blocklayout/extents.c +++ b/fs/nfs/blocklayout/extents.c @@ -349,6 +349,31 @@ int mark_written_sectors(struct pnfs_inval_markings *marks, return status; } +static void print_short_extent(struct pnfs_block_short_extent *be) +{ + dprintk("PRINT SHORT EXTENT extent %p\n", be); + if (be) { + dprintk(" be_f_offset %llu\n", (u64)be->bse_f_offset); + dprintk(" be_length %llu\n", (u64)be->bse_length); + } +} + +void print_clist(struct list_head *list, unsigned int count) +{ + struct pnfs_block_short_extent *be; + unsigned int i = 0; + + dprintk("****************\n"); + dprintk("Extent list looks like:\n"); + list_for_each_entry(be, list, bse_node) { + i++; + print_short_extent(be); + } + if (i != count) + dprintk("\n\nExpected %u entries\n\n\n", count); + dprintk("****************\n"); +} + /* Note: In theory, we should do more checking that devid's match between * old and new, but if they don't, the lists are too corrupt to salvage anyway. */ @@ -360,6 +385,9 @@ static void add_to_commitlist(struct pnfs_block_layout *bl, struct pnfs_block_short_extent *old, *save; sector_t end = new->bse_f_offset + new->bse_length; + dprintk("%s enter\n", __func__); + print_short_extent(new); + print_clist(clist, bl->bl_count); bl->bl_count++; /* Scan for proper place to insert, extending new to the left * as much as possible. @@ -409,6 +437,8 @@ static void add_to_commitlist(struct pnfs_block_layout *bl, kfree(old); } } + dprintk("%s: after merging\n", __func__); + print_clist(clist, bl->bl_count); } /* Note the range described by offset, length is guaranteed to be contained