From patchwork Tue Sep 16 07:46:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Sherwood X-Patchwork-Id: 4915181 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 87CC19F2EC for ; Tue, 16 Sep 2014 07:44:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A14DA20142 for ; Tue, 16 Sep 2014 07:46:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1224420123 for ; Tue, 16 Sep 2014 07:46:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752948AbaIPHqT (ORCPT ); Tue, 16 Sep 2014 03:46:19 -0400 Received: from ducie-dc1.codethink.co.uk ([185.25.241.215]:43321 "EHLO ducie-dc1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752772AbaIPHqS (ORCPT ); Tue, 16 Sep 2014 03:46:18 -0400 Received: from localhost (localhost [127.0.0.1]) by ducie-dc1.codethink.co.uk (Postfix) with ESMTP id 1558D4631D2; Tue, 16 Sep 2014 08:46:16 +0100 (BST) X-Virus-Scanned: Debian amavisd-new at ducie-dc1.codethink.co.uk Received: from ducie-dc1.codethink.co.uk ([127.0.0.1]) by localhost (ducie-dc1.codethink.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bLDX4KCRg7Cr; Tue, 16 Sep 2014 08:46:08 +0100 (BST) Received: from psmba.dyn.ducie.codethink.co.uk (82-70-136-246.dsl.in-addr.zen.co.uk [82.70.136.246]) by ducie-dc1.codethink.co.uk (Postfix) with ESMTPSA id BE8E44663E7; Tue, 16 Sep 2014 08:46:07 +0100 (BST) Message-ID: <5417EAC2.80607@codethink.co.uk> Date: Tue, 16 Sep 2014 08:46:10 +0100 From: Paul Sherwood Organization: Codethink Limited User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Anand Jain , Sam Thursfield CC: Chris Mason , linux-btrfs@vger.kernel.org, baserock-dev@baserock.org Subject: Re: Unable to mount multiple subvolumes of a single disk References: <5417022A.5000101@codethink.co.uk> <54170BCA.7070900@fb.com> <54170F35.4040103@oracle.com> <54171E51.2020709@codethink.co.uk> <54172018.1050300@oracle.com> <5417250B.9030105@oracle.com> In-Reply-To: <5417250B.9030105@oracle.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Hi Anand On 15/09/2014 18:42, Anand Jain wrote: >>> The patch fixes the issue, although it took a little tweaking to get it >>> to apply cleanly. I'm working with Sam. This is what I applied, and it works: > Sam, > > In the above context, Can you pls share the btrfs fi show output ? btrfs fi show gives: Label: 'src2' uuid: c2fcd4f8-cc40-4fab-b13b-0d1268afb497 Total devices 1 FS bytes used 77.93GB devid 1 size 100.00GB used 100.00GB path /dev/sdb Label: 'baserock' uuid: 129aff8f-65d9-4a19-9e2e-c3826bf5087d Total devices 1 FS bytes used 3.11GB devid 1 size 4.00GB used 4.00GB path /dev/sda Btrfs v0.20-rc1-334-g304f215 br Paul --- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 340a92d..2c87b72 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -533,7 +533,7 @@ static noinline int device_list_add(const char *path, * the btrfs dev scan cli, after FS has been mounted. */ if (fs_devices->opened) { - return -EBUSY; + goto out; } else { /* * That is if the FS is _not_ mounted and if you @@ -570,6 +570,8 @@ static noinline int device_list_add(const char *path, fs_devices->latest_devid = devid; fs_devices->latest_trans = found_transid; } + +out: *fs_devices_ret = fs_devices; return ret;