From: Mark Fasheh <mfasheh@suse.com>
To: linux-btrfs <linux-btrfs@vger.kernel.org>
Cc: Chris Mason <chris.mason@oracle.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Mark Fasheh <mfasheh@suse.com>
Subject: [RFC][PATCH 2/2] Subject: btrfs: Introduce btrfs_get_maps_dev()
Date: Fri, 13 May 2011 16:20:17 -0700 [thread overview]
Message-ID: <1305328817-10067-2-git-send-email-mfasheh@suse.com> (raw)
Use this to return the subvolume superblock in proc instead of the global
superblock which is automatically taken today. This fixes a userspace
breakage where discrepancies between the devices two would confuse software
such as lsof.
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
---
fs/btrfs/super.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 58e7de9..d241fb0 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1115,6 +1115,11 @@ static int btrfs_unfreeze(struct super_block *sb)
return 0;
}
+static dev_t btrfs_get_maps_dev(struct inode *inode)
+{
+ return BTRFS_I(inode)->root->anon_super.s_dev;
+}
+
static const struct super_operations btrfs_super_ops = {
.drop_inode = btrfs_drop_inode,
.evict_inode = btrfs_evict_inode,
@@ -1129,6 +1134,7 @@ static const struct super_operations btrfs_super_ops = {
.remount_fs = btrfs_remount,
.freeze_fs = btrfs_freeze,
.unfreeze_fs = btrfs_unfreeze,
+ .get_maps_dev = btrfs_get_maps_dev,
};
static const struct file_operations btrfs_ctl_fops = {
--
1.6.4.2
reply other threads:[~2011-05-13 23:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1305328817-10067-2-git-send-email-mfasheh@suse.com \
--to=mfasheh@suse.com \
--cc=chris.mason@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).