From patchwork Mon Sep 15 16:09:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 4906771 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 7C36FBEEA5 for ; Mon, 15 Sep 2014 16:10:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 47B9D20166 for ; Mon, 15 Sep 2014 16:10:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 66FC520222 for ; Mon, 15 Sep 2014 16:10:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752892AbaIOQKP (ORCPT ); Mon, 15 Sep 2014 12:10:15 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:34011 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752512AbaIOQKO (ORCPT ); Mon, 15 Sep 2014 12:10:14 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s8FG9lI5009796 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 15 Sep 2014 16:09:48 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s8FG9kfg021075 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 15 Sep 2014 16:09:46 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id s8FG9joq002016; Mon, 15 Sep 2014 16:09:45 GMT Received: from [192.168.1.1] (/220.255.112.121) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 15 Sep 2014 09:09:43 -0700 Message-ID: <54170F35.4040103@oracle.com> Date: Tue, 16 Sep 2014 00:09:25 +0800 From: Anand Jain User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: 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> In-Reply-To: <54170BCA.7070900@fb.com> X-Source-IP: acsinet22.oracle.com [141.146.126.238] 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=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 Sam, Thanks for reporting. Can you apply the following diff on top of 3.17rc5 and check if it helps. ------- ------- Anand On 15/09/2014 23:54, Chris Mason wrote: > On 09/15/2014 11:13 AM, Sam Thursfield wro: >> Hi! >> >> I'm having an issue with the 3.17rc5 kernel which prevents having >> multiple subvolumes of the same disk mounted. >> >> I'm not sure exactly the cause. I thought it might be because in my >> system the root file system is itself a subvolume of the disk I'm trying >> to mount. But if I create a second disk image with two subvolumes, the >> same thing occurs -- I can only mount one of them at a time. >> >> I've attached the output of a few commands, please let me know if you >> want more info (I'm not subscribed to the list, please keep me in To:). >> >> We've bisected and found that the exact commit that changed the >> behaviour is this one: >> https://urldefense.proofpoint.com/v1/url?u=https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id%3Db96de000bc8bc9688b3a2abea4332bd57648a49f&k=ZVNjlDMF0FElm4dQtryO4A%3D%3D%0A&r=6%2FL0lzzDhu0Y1hL9xm%2BQyA%3D%3D%0A&m=qVtp3yxxUd8uElAkp118K4Bd0oZfeUOC%2BKUy3e6rRlA%3D%0A&s=0d2623956de100adc1185d2b75e9114384572b88c0330e74924baa1a2bce8d02 >> >> >> I'm afraid I'm not familiar with the Btrfs code base and so I don't >> understand the exact meaning of the comments in that commit. > > Anand Jain is working on this in a separate thread. I'll make sure the > fix goes into the next rc, thanks for all the time spent bisecting. > > -chris > > -- > 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 > --- 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 e9676a4..1224b61 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 @@ -566,6 +566,7 @@ static noinline int device_list_add(const char *path, if (!fs_devices->opened) device->generation = found_transid; +out: *fs_devices_ret = fs_devices; return ret;