From patchwork Tue Jun 28 15:10:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 924942 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5SFMIR6028468 for ; Tue, 28 Jun 2011 15:22:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754755Ab1F1PL2 (ORCPT ); Tue, 28 Jun 2011 11:11:28 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55258 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757634Ab1F1PKk (ORCPT ); Tue, 28 Jun 2011 11:10:40 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 55F0689B67; Tue, 28 Jun 2011 17:10:39 +0200 (CEST) Received: by ds.suse.cz (Postfix, from userid 10065) id D976F746E6; Tue, 28 Jun 2011 17:10:38 +0200 (CEST) From: David Sterba To: chris.mason@oracle.com Cc: linux-btrfs@vger.kernel.org, David Sterba Subject: [PATCH for -rc6] btrfs: add missing options displayed in mount output Date: Tue, 28 Jun 2011 17:10:37 +0200 Message-Id: <1309273837-27595-1-git-send-email-dsterba@suse.cz> X-Mailer: git-send-email 1.7.5.2.353.g5df3e Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 28 Jun 2011 15:22:20 +0000 (UTC) Hi Chris, I think this is patch should go into -rc6 series, it fixes a user-visible bug. I was confused when I did not see the inode_cache in mount output although I was sure (and verified in my script) that I had passed it to mount. thanks, david --- From: David Sterba There are three missed mount options settable by user which are not currently displayed in mount output. Signed-off-by: David Sterba --- fs/btrfs/ctree.h | 5 +++++ fs/btrfs/super.c | 6 ++++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 3006287..4c840b5 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -1336,6 +1336,11 @@ struct btrfs_ioctl_defrag_range_args { */ #define BTRFS_STRING_ITEM_KEY 253 +/* + * Flags for mount options. + * + * Note: don't forget to add new options to btrfs_show_options() + */ #define BTRFS_MOUNT_NODATASUM (1 << 0) #define BTRFS_MOUNT_NODATACOW (1 << 1) #define BTRFS_MOUNT_NOBARRIER (1 << 2) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 0bb4ebb..15634d4 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -723,6 +723,12 @@ static int btrfs_show_options(struct seq_file *seq, struct vfsmount *vfs) seq_puts(seq, ",clear_cache"); if (btrfs_test_opt(root, USER_SUBVOL_RM_ALLOWED)) seq_puts(seq, ",user_subvol_rm_allowed"); + if (btrfs_test_opt(root, ENOSPC_DEBUG)) + seq_puts(seq, ",enospc_debug"); + if (btrfs_test_opt(root, AUTO_DEFRAG)) + seq_puts(seq, ",autodefrag"); + if (btrfs_test_opt(root, INODE_MAP_CACHE)) + seq_puts(seq, ",inode_cache"); return 0; }