linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu WenRuo <wqu@suse.com>
Cc: "dsterba@suse.cz" <dsterba@suse.cz>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
	Christian Pernegger <pernegger@gmail.com>
Subject: Re: [PATCH] btrfs-progs: rescue-zero-log: Modify super block directly
Date: Fri, 1 Nov 2019 12:08:35 +0100	[thread overview]
Message-ID: <20191101110834.GL3001@twin.jikos.cz> (raw)
In-Reply-To: <65d30567-a0cb-4430-43ba-94e5fe597f8e@suse.com>

On Fri, Nov 01, 2019 at 10:56:36AM +0000, Qu WenRuo wrote:
> >> +	btrfs_csum_data(btrfs_super_csum_type(sb), (u8 *)sb + BTRFS_CSUM_SIZE,
> >> +			result, BTRFS_SUPER_INFO_SIZE - BTRFS_CSUM_SIZE);
> >> +	memcpy(&sb->csum[0], result, BTRFS_CSUM_SIZE);
> >> +	ret = pwrite64(fd, sb, BTRFS_SUPER_INFO_SIZE, BTRFS_SUPER_INFO_OFFSET);
> > 
> > So this only writes on the one device that's passed to the command.
> > Previously it would update superblocks on all devices.
> 
> Oh, you got me.
> 
> That's indeed the case. I guess we need to do the same skip_bg behavior
> just like kernel to handle multiple devices.

In progs we can add another mode for open_ctree to open only devices,
then iterate over their superblocks and update it in place.

      reply	other threads:[~2019-11-01 11:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-26 10:11 [PATCH] btrfs-progs: rescue-zero-log: Modify super block directly Qu Wenruo
2019-11-01 10:52 ` David Sterba
2019-11-01 10:56   ` Qu WenRuo
2019-11-01 11:08     ` David Sterba [this message]

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=20191101110834.GL3001@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=pernegger@gmail.com \
    --cc=wqu@suse.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).