Skip to content

e2image -b option to pass superblock number

Artem Blagodarenko linux-ext4 2 versions – Applied

Status from this message: Thanks, applied.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest4 patches 6 repliesApplied
  2. v64 patches 4 repliesSuperseded

Changes from previous version from the cover letter

* Only two cases in try_open_fs() now: with and without passed superblock size.
* Some minor code style and comments issues are fixed.

Patches in v7 Applied

#Subject and filesSizeRepliesApplied
1/4ext2fs: opening filesystem code refactoringe2fsck/unix.c lib/ext2fs/openfs.c misc/dumpe2fs.c+40 -443 replies
2/4e2image: add -b and -B options to use supperblock backupmisc/e2image.8.in misc/e2image.c+70 -62 replies
3/4tests: add test for e2image -b optiontests/i_zero_super/expect.1 tests/i_zero_super/image.gz tests/i_zero_super/script+33 -00 replies
4/4ext2fs: automaticlly open backup superblockse2fsck/e2fsck.h e2fsck/message.c e2fsck/unix.c +5 more+185 -821 reply

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchAndreas Dilger
1/4R-b
2/4R-b
3/4
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v7 thread

Cover letter [PATCH v7 0/4] e2image -b option to pass superblock number

There was a discussion about possibility of using superblock backup for creating images with e2image.

https://www.spinics.net/lists/linux-ext4/msg30583.html

Now our customer faced with situation then it would be useful to have image file from partition with broken superblock.

Here is set of patches that adds this functionality.

This is 7th version of the patch set.

Changes from previous version:

* Only two cases in try_open_fs() now: with and without passed superblock size.
* Some minor code style and comments issues are fixed.

Artem Blagodarenko (4):
ext2fs: opening filesystem code refactoring
e2image: add -b and -B options to use supperblock backup
tests: add test for e2image -b option
ext2fs: automaticlly open backup superblocks

 e2fsck/e2fsck.h             |   2 -
 e2fsck/message.c            |   3 +-
 e2fsck/unix.c               |  42 ++++---------
 e2fsck/util.c               |  73 -----------------------
 lib/ext2fs/openfs.c         |  39 ++++++++++--
 lib/support/Makefile.in     |   8 ++-
 lib/support/sb_backup.c     | 140 ++++++++++++++++++++++++++++++++++++++++++++
 lib/support/sb_backup.h     |  20 +++++++
 misc/dumpe2fs.c             |  17 +-----
 misc/e2image.8.in           |  33 +++++++++++
 misc/e2image.c              |  50 ++++++++++++++--
 tests/i_zero_super/expect.1 |  22 +++++++
 tests/i_zero_super/image.gz | Bin 0 -> 13262 bytes
 tests/i_zero_super/script   |  11 ++++
 14 files changed, 328 insertions(+), 132 deletions(-)
 create mode 100644 lib/support/sb_backup.c
 create mode 100644 lib/support/sb_backup.h
 create mode 100644 tests/i_zero_super/expect.1
 create mode 100644 tests/i_zero_super/image.gz
 create mode 100644 tests/i_zero_super/script
Signature · 1 line
2.14.3