From patchwork Thu Jan 17 08:22:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Jansen X-Patchwork-Id: 1995391 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id B744D3FC85 for ; Thu, 17 Jan 2013 08:28:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759280Ab3AQI2r (ORCPT ); Thu, 17 Jan 2013 03:28:47 -0500 Received: from mort.rzone.de ([81.169.144.234]:48022 "EHLO mort.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759235Ab3AQI2q (ORCPT ); Thu, 17 Jan 2013 03:28:46 -0500 Received: from gargravarr.store (gargravarr.store [192.168.42.236]) by mort.rzone.de (Postfix) with ESMTP id EC5DA1A7; Thu, 17 Jan 2013 09:22:09 +0100 (MET) Received: by gargravarr.store (Postfix, from userid 32466) id 9E09744BF4; Thu, 17 Jan 2013 09:22:09 +0100 (CET) From: Arne Jansen To: chris.mason@fusionio.com, linux-btrfs@vger.kernel.org Subject: [PATCH 1/2] Btrfs: ignore orphan qgroup relations Date: Thu, 17 Jan 2013 09:22:08 +0100 Message-Id: <97374a54586a5a6adabbc491f79f4f863ca8e9f7.1358410295.git.sensille@gmx.net> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org If a qgroup that has still assignments is deleted by the user, the corresponding relations are left in the tree. This leads to an unmountable filesystem. With this patch, those relations are simple ignored. Reported-by: Eric Hopper Signed-off-by: Arne Jansen --- fs/btrfs/qgroup.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index fe9d02c..28f2b39 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -379,6 +379,13 @@ next1: ret = add_relation_rb(fs_info, found_key.objectid, found_key.offset); + if (ret == -ENOENT) { + printk(KERN_WARNING + "btrfs: orphan qgroup relation 0x%llx->0x%llx\n", + (unsigned long long)found_key.objectid, + (unsigned long long)found_key.offset); + ret = 0; /* ignore the error */ + } if (ret) goto out; next2: