linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Add superblock checksum check for btrfs-progs
@ 2014-07-03  9:36 Qu Wenruo
  2014-07-03  9:36 ` [PATCH v2 1/4] btrfs-progs: Check superblock's checsum when read dev super Qu Wenruo
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Qu Wenruo @ 2014-07-03  9:36 UTC (permalink / raw)
  To: linux-btrfs

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


^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH 0/4] Add superblock checksum check for btrfs-progs
@ 2014-07-03  9:35 Qu Wenruo
  0 siblings, 0 replies; 13+ messages in thread
From: Qu Wenruo @ 2014-07-03  9:35 UTC (permalink / raw)
  To: linux-btrfs

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-09-16  5:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-03  9:36 [PATCH 0/4] Add superblock checksum check for btrfs-progs Qu Wenruo
2014-07-03  9:36 ` [PATCH v2 1/4] btrfs-progs: Check superblock's checsum when read dev super Qu Wenruo
2014-09-15 11:36   ` David Sterba
2014-09-15 11:44     ` David Sterba
2014-09-16  5:20       ` Qu Wenruo
2014-07-03  9:36 ` [PATCH 2/4] btrfs-progs: Allow btrfs_read_dev_super() to read all 3 super for super_recover Qu Wenruo
2014-07-03 17:48   ` David Sterba
2014-07-03  9:36 ` [PATCH 3/4] btrfs-progs: Add more meaningful return value for btrfs_read_dev_super() and corresponding error string Qu Wenruo
2014-07-03 17:50   ` David Sterba
2014-07-03  9:36 ` [PATCH 4/4] btrfs-progs: Fix malloc size for superblock Qu Wenruo
2014-07-03 17:57 ` [PATCH 0/4] Add superblock checksum check for btrfs-progs David Sterba
2014-07-04  1:10   ` Qu Wenruo
  -- strict thread matches above, loose matches on Subject: below --
2014-07-03  9:35 Qu Wenruo

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).