From patchwork Tue Jun 9 12:04:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Bo X-Patchwork-Id: 6571991 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D7871C0020 for ; Tue, 9 Jun 2015 12:05:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 30C75204DF for ; Tue, 9 Jun 2015 12:04:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0922220480 for ; Tue, 9 Jun 2015 12:04:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753854AbbFIMEq (ORCPT ); Tue, 9 Jun 2015 08:04:46 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:42702 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753827AbbFIMEo (ORCPT ); Tue, 9 Jun 2015 08:04:44 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t59C4htr005641 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 9 Jun 2015 12:04:43 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t59C4gUZ023829 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 9 Jun 2015 12:04:43 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t59C4g1k026138 for ; Tue, 9 Jun 2015 12:04:42 GMT Received: from localhost.jp.oracle.com (/10.191.11.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 09 Jun 2015 05:04:41 -0700 From: Liu Bo To: linux-btrfs@vger.kernel.org Subject: [RFC PATCH 1/2] Btrfs: add noi_version option to disable MS_I_VERSION Date: Tue, 9 Jun 2015 20:04:30 +0800 Message-Id: <1433851471-11543-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=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index f2c9f9d..c81a3f1 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");