From: Anand Jain <anand.jain@oracle.com>
To: linux-btrfs@vger.kernel.org
Cc: sandeen@redhat.com, dsterba@suse.cz
Subject: [PATCH 5/5 v5] btrfs-progs: disable using backup superblock by default
Date: Wed, 27 Mar 2013 18:07:36 +0800 [thread overview]
Message-ID: <1364378856-21053-6-git-send-email-anand.jain@oracle.com> (raw)
In-Reply-To: <1364378856-21053-1-git-send-email-anand.jain@oracle.com>
except for check_mounted rest of the function thread
should have the access to the backup SB disabled.
this patch will just do that.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
disk-io.c | 2 +-
find-root.c | 2 +-
utils.c | 2 +-
volumes.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/disk-io.c b/disk-io.c
index 82c3b66..589b37a 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -881,7 +881,7 @@ static struct btrfs_fs_info *__open_ctree_fd(int fp, const char *path,
disk_super = fs_info->super_copy;
ret = btrfs_read_dev_super(fs_devices->latest_bdev,
disk_super, sb_bytenr,
- BTRFS_SCAN_BACKUP_SB);
+ 0ull);
if (ret) {
printk("No valid btrfs found\n");
goto out_devices;
diff --git a/find-root.c b/find-root.c
index eac3d79..27512df 100644
--- a/find-root.c
+++ b/find-root.c
@@ -153,7 +153,7 @@ static struct btrfs_root *open_ctree_broken(int fd, const char *device)
disk_super = fs_info->super_copy;
ret = btrfs_read_dev_super(fs_devices->latest_bdev,
disk_super, BTRFS_SUPER_INFO_OFFSET,
- BTRFS_SCAN_BACKUP_SB);
+ 0ull);
if (ret) {
printk("No valid btrfs found\n");
goto out_devices;
diff --git a/utils.c b/utils.c
index a2001de..b9b675d 100644
--- a/utils.c
+++ b/utils.c
@@ -923,7 +923,7 @@ int check_mounted_where(int fd, const char *file, char *where, int size,
/* scan the initial device */
ret = btrfs_scan_one_device(fd, file, &fs_devices_mnt,
&total_devs, BTRFS_SUPER_INFO_OFFSET,
- 0ull);
+ BTRFS_SCAN_BACKUP_SB);
is_btrfs = (ret >= 0);
/* scan other devices */
diff --git a/volumes.c b/volumes.c
index a18b219..2de69af 100644
--- a/volumes.c
+++ b/volumes.c
@@ -228,7 +228,7 @@ int btrfs_scan_one_device(int fd, const char *path,
}
disk_super = (struct btrfs_super_block *)buf;
ret = btrfs_read_dev_super(fd, disk_super, super_offset,
- BTRFS_SCAN_BACKUP_SB);
+ 0ull);
if (ret < 0) {
ret = -EIO;
goto error_brelse;
--
1.8.1.227.g44fe835
next prev parent reply other threads:[~2013-03-27 10:07 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-22 5:29 [bug] mkfs.btrfs reports device busy for ext4 mounted disk Anand Jain
2013-02-22 19:03 ` Zach Brown
2013-02-22 22:30 ` David Sterba
2013-03-01 10:18 ` Anand Jain
2013-03-01 10:13 ` [PATCH] btrfs-progs: traverse to backup super-block only when indicated Anand Jain
2013-03-01 17:37 ` Eric Sandeen
2013-03-04 5:20 ` Anand Jain
2013-03-01 18:27 ` Zach Brown
2013-03-27 10:07 ` [PATCH 0/5 v5] access to backup-sb and btrfs' multipath aware Anand Jain
2013-03-27 10:07 ` [PATCH 1/5 v5] btrfs-progs: make btrfs dev scan multi path aware Anand Jain
2013-04-11 9:57 ` [obsoleted] " Anand Jain
2013-03-27 10:07 ` [PATCH 2/5 v5] btrfs-progs: Introduce flag BTRFS_SCAN_REGISTER to replace run_ioctl Anand Jain
2013-03-27 10:07 ` [PATCH 3/5 v5] btrfs-progs: Introduce flag BTRFS_SCAN_BACKUP_SB for btrfs_read_dev_super Anand Jain
2013-03-27 10:07 ` [PATCH 4/5 v5] btrfs-progs: introduce passing flags to btrfs_scan_one_device Anand Jain
2013-03-27 10:07 ` Anand Jain [this message]
2013-03-27 23:17 ` [PATCH 0/5 v5] access to backup-sb and btrfs' multipath aware anand jain
2013-04-05 5:54 ` v6: access to backup superblock Anand Jain
2013-04-05 5:54 ` [PATCH 1/5] btrfs-progs: Introduce flag BTRFS_SCAN_REGISTER to replace run_ioctl Anand Jain
2013-04-05 5:54 ` [PATCH 2/5] btrfs-progs: Introduce flag BTRFS_SCAN_BACKUP_SB for btrfs_read_dev_super Anand Jain
2013-04-05 5:54 ` [PATCH 3/5] btrfs-progs: introduce passing flags to btrfs_scan_one_device Anand Jain
2013-04-05 5:54 ` [PATCH 4/5] btrfs-progs: disable using backup superblock by default Anand Jain
2013-04-05 5:54 ` [PATCH 5/5] btrfs-progs: btrfs-find-root should scan backup-sb Anand Jain
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=1364378856-21053-6-git-send-email-anand.jain@oracle.com \
--to=anand.jain@oracle.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=sandeen@redhat.com \
/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).