From patchwork Wed Oct 7 12:06:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lakshmipathi.G" X-Patchwork-Id: 7344711 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AED85BEEA4 for ; Wed, 7 Oct 2015 12:14:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CDA8E2072E for ; Wed, 7 Oct 2015 12:14:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8BC5B2072B for ; Wed, 7 Oct 2015 12:14:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752839AbbJGMOQ (ORCPT ); Wed, 7 Oct 2015 08:14:16 -0400 Received: from p3nlsmtpcp01-04.prod.phx3.secureserver.net ([184.168.200.145]:56356 "EHLO p3nlsmtpcp01-04.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751850AbbJGMOP (ORCPT ); Wed, 7 Oct 2015 08:14:15 -0400 X-Greylist: delayed 450 seconds by postgrey-1.27 at vger.kernel.org; Wed, 07 Oct 2015 08:14:15 EDT Received: from p3plcpnl0639.prod.phx3.secureserver.net ([50.62.176.166]) by : HOSTING RELAY : with SMTP id jnUbZOGTQcY2ujnUbZoIOF; Wed, 07 Oct 2015 05:06:45 -0700 Received: from [223.231.216.195] (port=34333 helo=giis) by p3plcpnl0639.prod.phx3.secureserver.net with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.85) (envelope-from ) id 1ZjnUa-0002vc-9d for linux-btrfs@vger.kernel.org; Wed, 07 Oct 2015 05:06:45 -0700 Date: Wed, 7 Oct 2015 17:36:38 +0530 From: "Lakshmipathi.G" To: linux-btrfs@vger.kernel.org Subject: [PATCH] btrfs-progs: print root item's last_snapshot value. Message-ID: <20151007120638.GA24461@giis> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - p3plcpnl0639.prod.phx3.secureserver.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - giis.co.in X-Get-Message-Sender-Via: p3plcpnl0639.prod.phx3.secureserver.net: authenticated_id: lakshmipathi.g@giis.co.in X-Source: X-Source-Args: X-Source-Dir: X-CMAE-Envelope: MS4wfCqeDHx9GTkfidvK7gHoHXqBpbhmBGzKeX3jg+lGtHjafIWnwvy8gN2x82HRXDmi278o0/3xSf9QO4UPU/paUxjBaJzXtyP1F1oywkI7l3QkccpXoPVB/mdQwrcoW/FDhlHtvri2SrBSpJYwDHzYVLcTeawLhshW3LP9CJvy+JGVNKomuyN9ubuG8KAlpzGLvYLncvgm0y7IhaPY/yno2aJM55Stou5mGIxOCR63CG9p Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Include last_snapshot value in print_root(). With btrfs-debug-tree, it helps to identify whether its a snapshot-ed subvolume or not. Signed-off-by: Lakshmipathi.G --- print-tree.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/print-tree.c b/print-tree.c index dc1d276..7ddf400 100644 --- a/print-tree.c +++ b/print-tree.c @@ -481,12 +481,13 @@ static void print_root(struct extent_buffer *leaf, int slot) memset(&root_item, 0, sizeof(root_item)); read_extent_buffer(leaf, &root_item, (unsigned long)ri, len); - printf("\t\troot data bytenr %llu level %d dirid %llu refs %u gen %llu\n", + printf("\t\troot data bytenr %llu level %d dirid %llu refs %u gen %llu lastsnap %llu\n", (unsigned long long)btrfs_root_bytenr(&root_item), btrfs_root_level(&root_item), (unsigned long long)btrfs_root_dirid(&root_item), btrfs_root_refs(&root_item), - (unsigned long long)btrfs_root_generation(&root_item)); + (unsigned long long)btrfs_root_generation(&root_item), + (unsigned long long)btrfs_root_last_snapshot(&root_item)); if (root_item.generation == root_item.generation_v2) { uuid_unparse(root_item.uuid, uuid_str);