From patchwork Wed Aug 27 17:47:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 4790301 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6A28CC0338 for ; Wed, 27 Aug 2014 17:48:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B89C02017D for ; Wed, 27 Aug 2014 17:48:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E88C32017A for ; Wed, 27 Aug 2014 17:48:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935271AbaH0RsA (ORCPT ); Wed, 27 Aug 2014 13:48:00 -0400 Received: from cantor2.suse.de ([195.135.220.15]:40979 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756433AbaH0Rrs (ORCPT ); Wed, 27 Aug 2014 13:47:48 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D00E8AD0A for ; Wed, 27 Aug 2014 17:47:47 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 64575DAB0A; Wed, 27 Aug 2014 19:47:47 +0200 (CEST) From: David Sterba To: linux-btrfs@vger.kernel.org Cc: David Sterba Subject: [PATCH] btrfs-progs: readahead errors are not fatal Date: Wed, 27 Aug 2014 19:47:45 +0200 Message-Id: <1409161665-28234-1-git-send-email-dsterba@suse.cz> X-Mailer: git-send-email 1.9.0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Kill the BUG_ON. Signed-off-by: David Sterba --- disk-io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/disk-io.c b/disk-io.c index 8db0335bc81b..7ddd4b90836f 100644 --- a/disk-io.c +++ b/disk-io.c @@ -152,7 +152,8 @@ int readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize, length = blocksize; ret = btrfs_map_block(&root->fs_info->mapping_tree, READ, bytenr, &length, &multi, 0, NULL); - BUG_ON(ret); + if (ret) + return 0 device = multi->stripes[0].dev; device->total_ios++; blocksize = min(blocksize, (u32)(64 * 1024));