From patchwork Mon Jun 28 16:55:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 108403 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o5SGtJgk000739 for ; Mon, 28 Jun 2010 16:55:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752244Ab0F1QzK (ORCPT ); Mon, 28 Jun 2010 12:55:10 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:35030 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751811Ab0F1QzH (ORCPT ); Mon, 28 Jun 2010 12:55:07 -0400 Received: by wyb38 with SMTP id 38so1993476wyb.19 for ; Mon, 28 Jun 2010 09:55:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:x-mailer-version:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=AkPnoPv9ugTlQ8nzrGviPxFyJVhnqVxhm0fTj7TEdU8=; b=AKe7yv0RyjE1DbkRF6KcWTDLNOd/9/1l8E96szaXzWEmiSzyDGkBMW+aagnqLWksOj IFeES+B9oA2HT9clT2a75anF0lKKy3dSCppZTGO/SYrW0/JPMYJmW2h72B53PdMiJHJ+ 7sZAfis1+/idUsP8Gap8CLuadxyeTAJQwI9PE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:x-mailer-version :in-reply-to:references:mime-version:content-type :content-transfer-encoding; b=YiGd2dvBYaCq0N8wcKjjPxp9nf3OlkoO9yLe/YWLL7YiBqrlRlw+jL98zfVrmEr4Kq DzstLefPa5oxdE28sWZ0ioIz48OwvVE7Cza3CExKT4WRcBiVJ8s8mRQ2EEmxPoi6ThLo DIVXWwtRCEExZhs4zGHp8235dwDzJv4i9FWbc= Received: by 10.216.155.77 with SMTP id i55mr8377500wek.65.1277744106031; Mon, 28 Jun 2010 09:55:06 -0700 (PDT) Received: from localhost.localdomain (ADijon-551-1-97-133.w92-138.abo.wanadoo.fr [92.138.8.133]) by mx.google.com with ESMTPS id n52sm2481010wee.31.2010.06.28.09.55.04 (version=SSLv3 cipher=RC4-MD5); Mon, 28 Jun 2010 09:55:05 -0700 (PDT) From: Frederic Weisbecker To: Chris Mason Cc: The development of BTRFS , Frederic Weisbecker Subject: [PATCH] Btrfs-progs: Handle bad extent type case Date: Mon, 28 Jun 2010 18:55:16 +0200 Message-Id: <1277744116-7805-2-git-send-regression-fweisbec@gmail.com> X-Mailer: git-send-regression X-Mailer-version: 0.1, "The maintainer couldn't reproduce after one week full time debugging" special version. In-Reply-To: <1277744116-7805-1-git-send-regression-fweisbec@gmail.com> References: <1277744116-7805-1-git-send-regression-fweisbec@gmail.com> MIME-Version: 1.0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 28 Jun 2010 16:55:19 +0000 (UTC) diff --git a/btrfs-list.c b/btrfs-list.c index 9dedb5d..c90a1e6 100644 --- a/btrfs-list.c +++ b/btrfs-list.c @@ -698,6 +698,15 @@ static int print_one_extent(int fd, struct btrfs_ioctl_search_header *sh, disk_start = 0; disk_offset = 0; len = btrfs_stack_file_extent_ram_bytes(item); + } else { + printf("unhandled extent type %d for inode %llu " + "file offset %llu gen %llu\n", + type, + (unsigned long long)sh->objectid, + (unsigned long long)sh->offset, + (unsigned long long)found_gen); + + return -EIO; } printf("inode %llu file offset %llu len %llu disk start %llu " "offset %llu gen %llu flags ",