Re: [PATCH 0/4] Add superblock checksum check for btrfs-progs

2014-07-03 Thread Qu Wenruo


 Original Message 
Subject: Re: [PATCH 0/4] Add superblock checksum check for btrfs-progs
From: David Sterba 
To: Qu Wenruo 
Date: 2014年07月04日 01:57

On Thu, Jul 03, 2014 at 05:36:34PM +0800, Qu Wenruo wrote:

Before this patchset, btrfs-progs will overall ignore the superblock
checksum and continue the routine.
Sometimes this may cause disasters like checking a btrfs with corrupted
superblock will lead to crash in btrfs-progs.

This patch introduces superblock checksum check into btrfs_read_dev_super(),
making btrfs-progs much more restricted and robust.
To allow super-recover to open devices, add options to scan all 3
superblocks when using super-recover.
Also updated the related error string and fix a bug in chunk-recover that
will not be triggered until superblock csum is calculated.

Qu Wenruo (4):
   btrfs-progs: Check superblock's checsum when read dev super
   btrfs-progs: Allow btrfs_read_dev_super() to read all 3 super for
 super_recover.
   btrfs-progs: Add more meaningful return value for
 btrfs_read_dev_super() and corresponding error string.
   btrfs-progs: Fix size for malloc for superblock checksum.

Nice work. I've added 1, 2 and 4 it to integration. Please update the
patch 3 (printf/fprintf).

Thanks for the review and minor tweak for patch 2.

I'll send v2 version of patch 3 soon.

Thank,
Qu
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] Add superblock checksum check for btrfs-progs

2014-07-03 Thread David Sterba
On Thu, Jul 03, 2014 at 05:36:34PM +0800, Qu Wenruo wrote:
> Before this patchset, btrfs-progs will overall ignore the superblock
> checksum and continue the routine.
> Sometimes this may cause disasters like checking a btrfs with corrupted
> superblock will lead to crash in btrfs-progs.
> 
> This patch introduces superblock checksum check into btrfs_read_dev_super(),
> making btrfs-progs much more restricted and robust.
> To allow super-recover to open devices, add options to scan all 3
> superblocks when using super-recover.
> Also updated the related error string and fix a bug in chunk-recover that
> will not be triggered until superblock csum is calculated.
> 
> Qu Wenruo (4):
>   btrfs-progs: Check superblock's checsum when read dev super
>   btrfs-progs: Allow btrfs_read_dev_super() to read all 3 super for
> super_recover.
>   btrfs-progs: Add more meaningful return value for
> btrfs_read_dev_super() and corresponding error string.
>   btrfs-progs: Fix size for malloc for superblock checksum.

Nice work. I've added 1, 2 and 4 it to integration. Please update the
patch 3 (printf/fprintf).
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/4] Add superblock checksum check for btrfs-progs

2014-07-03 Thread Qu Wenruo
Before this patchset, btrfs-progs will overall ignore the superblock
checksum and continue the routine.
Sometimes this may cause disasters like checking a btrfs with corrupted
superblock will lead to crash in btrfs-progs.

This patch introduces superblock checksum check into btrfs_read_dev_super(),
making btrfs-progs much more restricted and robust.
To allow super-recover to open devices, add options to scan all 3
superblocks when using super-recover.
Also updated the related error string and fix a bug in chunk-recover that
will not be triggered until superblock csum is calculated.

Qu Wenruo (4):
  btrfs-progs: Check superblock's checsum when read dev super
  btrfs-progs: Allow btrfs_read_dev_super() to read all 3 super for
super_recover.
  btrfs-progs: Add more meaningful return value for
btrfs_read_dev_super() and corresponding error string.
  btrfs-progs: Fix size for malloc for superblock checksum.

 btrfs-find-root.c |  9 --
 chunk-recover.c   | 18 +++
 cmds-filesystem.c |  9 --
 disk-io.c | 91 +--
 disk-io.h |  5 +--
 super-recover.c   |  2 +-
 utils.c   | 16 ++
 volumes.c |  8 ++---
 volumes.h |  2 +-
 9 files changed, 104 insertions(+), 56 deletions(-)

-- 
2.0.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/4] Add superblock checksum check for btrfs-progs

2014-07-03 Thread Qu Wenruo
Before this patchset, btrfs-progs will overall ignore the superblock
checksum and continue the routine.
Sometimes this may cause disasters like checking a btrfs with corrupted
superblock will lead to crash in btrfs-progs.

This patch introduces superblock checksum check into btrfs_read_dev_super(),
making btrfs-progs much more restricted and robust.
To allow super-recover to open devices, add options to scan all 3
superblocks when using super-recover.
Also updated the related error string and fix a bug in chunk-recover that
will not be triggered until superblock csum is calculated.

Qu Wenruo (4):
  btrfs-progs: Check superblock's checsum when read dev super
  btrfs-progs: Allow btrfs_read_dev_super() to read all 3 super for
super_recover.
  btrfs-progs: Add more meaningful return value for
btrfs_read_dev_super() and corresponding error string.
  btrfs-progs: Fix size for malloc for superblock checksum.

 btrfs-find-root.c |  9 --
 chunk-recover.c   | 18 +++
 cmds-filesystem.c |  9 --
 disk-io.c | 91 +--
 disk-io.h |  5 +--
 super-recover.c   |  2 +-
 utils.c   | 16 ++
 volumes.c |  8 ++---
 volumes.h |  2 +-
 9 files changed, 104 insertions(+), 56 deletions(-)

-- 
2.0.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html