All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Anand Jain <anand.jain@oracle.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 3/3 v4] btrfs-progs: disable using backup superblock by default
Date: Wed, 13 Mar 2013 23:36:00 -0500	[thread overview]
Message-ID: <514153B0.7020100@redhat.com> (raw)
In-Reply-To: <1363230357-7438-4-git-send-email-anand.jain@oracle.com>

On 3/13/13 10:05 PM, Anand Jain wrote:

<maybe a little more commit log would be good?>

So here is what confuses me now. :)  

*every* caller of btrfs_read_dev_super() is now called with
0 for the flags variable, so it never reads the backup
under any circumstance.

If it's always called w/ 0, what is the point of the argument?
Is there another patch you have planned that would use this argument
later?

-Eric

> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
>  disk-io.c   | 2 +-
>  find-root.c | 2 +-
>  volumes.c   | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/disk-io.c b/disk-io.c
> index 796394f..c2e1c8a 100644
> --- a/disk-io.c
> +++ b/disk-io.c
> @@ -880,7 +880,7 @@ static struct btrfs_fs_info *__open_ctree_fd(int fp, const char *path,
>  	disk_super = fs_info->super_copy;
>  	ret = 
(fs_devices->latest_bdev,
>  				   disk_super, sb_bytenr,
> -				   BTRFS_SCAN_BACKUP_SB);
> +				   0ull);

Isn't just "0" enough?

-Eric

>  	if (ret) {
>  		printk("No valid btrfs found\n");
>  		goto out_devices;
> diff --git a/find-root.c b/find-root.c
> index 9be4fc7..9923209 100644
> --- a/find-root.c
> +++ b/find-root.c
> @@ -151,7 +151,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/volumes.c b/volumes.c
> index 1a28cdd..9003412 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;
> 


  reply	other threads:[~2013-03-14  4:36 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-08 15:24 [PATCH 0/3 v2] flags to access backup SB Anand Jain
2013-03-08 15:24 ` [PATCH 1/3] btrfs-progs: Introduce flag BTRFS_SCAN_REGISTER to replace run_ioctl Anand Jain
2013-03-08 15:24 ` [PATCH 2/3] btrfs-progs: Introduce flag BTRFS_SCAN_BACKUP_SB for btrfs_read_dev_super Anand Jain
2013-03-08 15:25 ` [PATCH 3/3] btrfs-progs: use BTRFS_SCAN_BACKUP_SB flag in btrfs_scan_one_device Anand Jain
2013-03-11 15:03   ` Eric Sandeen
2013-03-11 18:16     ` David Sterba
2013-03-13 11:46       ` Anand Jain
2013-03-14  8:51         ` Anand Jain
2013-03-13 11:44 ` [PATCH 0/3 v3] flags to access backup SB Anand Jain
2013-03-13 11:44   ` [PATCH 1/3 v3] btrfs-progs: Introduce flag BTRFS_SCAN_REGISTER to replace run_ioctl Anand Jain
2013-03-13 11:44   ` [PATCH 2/3 v3] btrfs-progs: Introduce flag BTRFS_SCAN_BACKUP_SB for btrfs_read_dev_super Anand Jain
2013-03-13 11:44   ` [PATCH 3/3 v3] btrfs-progs: disable using backup superblock by default Anand Jain
2013-03-14  3:05 ` [PATCH 0/3 v4] flags to access backup SB Anand Jain
2013-03-14  3:05   ` [PATCH 1/3 v4] btrfs-progs: Introduce flag BTRFS_SCAN_REGISTER to replace run_ioctl Anand Jain
2013-03-14  3:05   ` [PATCH 2/3 v4] btrfs-progs: Introduce flag BTRFS_SCAN_BACKUP_SB for btrfs_read_dev_super Anand Jain
2013-03-14  3:05   ` [PATCH 3/3 v4] btrfs-progs: disable using backup superblock by default Anand Jain
2013-03-14  4:36     ` Eric Sandeen [this message]
2013-03-14  8:56       ` Anand Jain
2013-03-14 14:47         ` Eric Sandeen
2013-03-14 14:49           ` Eric Sandeen
2013-03-15 12:03             ` Anand Jain
2013-03-15 16:34               ` Eric Sandeen
2013-03-18  3:39                 ` 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=514153B0.7020100@redhat.com \
    --to=sandeen@redhat.com \
    --cc=anand.jain@oracle.com \
    --cc=linux-btrfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.