public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Edward Shishkin <edward.shishkin@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: [patch] btrfs-progs: fix btrfs_read_dev_super
Date: Wed, 27 May 2009 15:30:19 +0200	[thread overview]
Message-ID: <4A1D406B.6090404@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: btrfsprogs-fix-read_super.patch --]
[-- Type: text/plain, Size: 559 bytes --]

Don't break in the middle of search,
taste also other super mirrors.

Signed-off-by: Edward Shishkin <edward.shishkin@gmail.com>
---
 disk-io.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- btrfs-progs-0.18.orig/disk-io.c
+++ btrfs-progs-0.18/disk-io.c
@@ -716,7 +716,7 @@ int btrfs_read_dev_super(int fd, struct 
 		bytenr = btrfs_sb_offset(i);
 		ret = pread64(fd, &buf, sizeof(buf), bytenr);
 		if (ret < sizeof(buf))
-			break;
+			continue;
 
 		if (btrfs_super_bytenr(&buf) != bytenr ||
 		    strncmp((char *)(&buf.magic), BTRFS_MAGIC,

                 reply	other threads:[~2009-05-27 13:30 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=4A1D406B.6090404@gmail.com \
    --to=edward.shishkin@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox