From patchwork Wed Jun 17 07:54:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Bo X-Patchwork-Id: 6622671 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5404A9F1C1 for ; Wed, 17 Jun 2015 07:56:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7600920804 for ; Wed, 17 Jun 2015 07:56:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7BAD7207E5 for ; Wed, 17 Jun 2015 07:56:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932194AbbFQHzT (ORCPT ); Wed, 17 Jun 2015 03:55:19 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:24445 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932112AbbFQHzR (ORCPT ); Wed, 17 Jun 2015 03:55:17 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t5H7tDdN027221 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 17 Jun 2015 07:55:14 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t5H7tDXe001457 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 17 Jun 2015 07:55:13 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t5H7tDVS019759; Wed, 17 Jun 2015 07:55:13 GMT Received: from localhost.localdomain.localdomain (/10.191.8.81) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 17 Jun 2015 00:55:12 -0700 From: Liu Bo To: linux-btrfs@vger.kernel.org Cc: fdmanana@suse.com Subject: [RFC PATCH v2 1/2] Btrfs: add noi_version option to disable MS_I_VERSION Date: Wed, 17 Jun 2015 15:54:31 +0800 Message-Id: <1434527672-5762-1-git-send-email-bo.li.liu@oracle.com> X-Mailer: git-send-email 2.1.0 X-Source-IP: aserv0022.oracle.com [141.146.126.234] 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.5 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 MS_I_VERSION is enabled by default for btrfs, this adds an alternative option to toggle it off. Signed-off-by: Liu Bo --- fs/btrfs/super.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 05fef19..e610e3e 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -324,7 +324,7 @@ enum { Opt_check_integrity_print_mask, Opt_fatal_errors, Opt_rescan_uuid_tree, Opt_commit_interval, Opt_barrier, Opt_nodefrag, Opt_nodiscard, Opt_noenospc_debug, Opt_noflushoncommit, Opt_acl, Opt_datacow, - Opt_datasum, Opt_treelog, Opt_noinode_cache, + Opt_datasum, Opt_treelog, Opt_noinode_cache, Opt_noi_version, Opt_err, }; @@ -351,6 +351,7 @@ static match_table_t tokens = { {Opt_nossd, "nossd"}, {Opt_acl, "acl"}, {Opt_noacl, "noacl"}, + {Opt_noi_version, "noi_version"}, {Opt_notreelog, "notreelog"}, {Opt_treelog, "treelog"}, {Opt_flushoncommit, "flushoncommit"}, @@ -593,6 +594,10 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) case Opt_noacl: root->fs_info->sb->s_flags &= ~MS_POSIXACL; break; + case Opt_noi_version: + root->fs_info->sb->s_flags &= ~MS_I_VERSION; + btrfs_info(root->fs_info, "disable i_version"); + break; case Opt_notreelog: btrfs_set_and_info(root, NOTREELOG, "disabling tree log");