From patchwork Fri Mar 31 15:19:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Borowski X-Patchwork-Id: 9656593 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5103460351 for ; Fri, 31 Mar 2017 15:18:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42D97286C8 for ; Fri, 31 Mar 2017 15:18:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 35898286DC; Fri, 31 Mar 2017 15:18:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 83AC2286C8 for ; Fri, 31 Mar 2017 15:18:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933119AbdCaPSo (ORCPT ); Fri, 31 Mar 2017 11:18:44 -0400 Received: from tartarus.angband.pl ([89.206.35.136]:46370 "EHLO tartarus.angband.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933035AbdCaPSn (ORCPT ); Fri, 31 Mar 2017 11:18:43 -0400 Received: from umbar.angband.pl ([2001:6a0:118::6]) by tartarus.angband.pl with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.88) (envelope-from ) id 1ctyJs-00032f-7m; Fri, 31 Mar 2017 17:18:34 +0200 Received: from kilobyte by umbar.angband.pl with local (Exim 4.89) (envelope-from ) id 1ctyKT-00017f-Ui; Fri, 31 Mar 2017 17:19:09 +0200 From: Adam Borowski To: David Sterba , Chris Mason , Josef Bacik , linux-btrfs@vger.kernel.org Cc: Adam Borowski Date: Fri, 31 Mar 2017 17:19:04 +0200 Message-Id: <20170331151904.4091-1-kilobyte@angband.pl> X-Mailer: git-send-email 2.11.0 In-Reply-To: <0939c5df-3abd-ec68-16ef-538ad04251aa@mendix.com> References: <0939c5df-3abd-ec68-16ef-538ad04251aa@mendix.com> X-SA-Exim-Connect-IP: 2001:6a0:118::6 X-SA-Exim-Mail-From: kilobyte@angband.pl Subject: [PATCH] btrfs: drop the nossd flag when remounting with -o ssd X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on tartarus.angband.pl) Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The opposite case was already handled right in the very next switch entry. Reported-by: Hans van Kranenburg Signed-off-by: Adam Borowski --- Not sure if setting NOSSD should also disable SSD_SPREAD, there's currently no way to disable that option once set. fs/btrfs/super.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 06bd9b332e18..7342399951ad 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -549,11 +549,13 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options, case Opt_ssd: btrfs_set_and_info(info, SSD, "use ssd allocation scheme"); + btrfs_clear_opt(info->mount_opt, NOSSD); break; case Opt_ssd_spread: btrfs_set_and_info(info, SSD_SPREAD, "use spread ssd allocation scheme"); btrfs_set_opt(info->mount_opt, SSD); + btrfs_clear_opt(info->mount_opt, NOSSD); break; case Opt_nossd: btrfs_set_and_info(info, NOSSD,