public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] btrfs-progs: fix btrfs_read_dev_super
@ 2009-05-27 13:30 Edward Shishkin
  0 siblings, 0 replies; only message in thread
From: Edward Shishkin @ 2009-05-27 13:30 UTC (permalink / raw)
  To: linux-btrfs

[-- 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,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-05-27 13:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-27 13:30 [patch] btrfs-progs: fix btrfs_read_dev_super Edward Shishkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox