parent
0a456518f3
commit
1bc2448b90
46
libblkid-add-support-for-btrfs-backup-superblock.patch
Normal file
46
libblkid-add-support-for-btrfs-backup-superblock.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From d4a276491269b6502c15e0089fba6b616f5c5df8 Mon Sep 17 00:00:00 2001
|
||||
From: Goffredo Baroncelli <kreijack@inwind.it>
|
||||
Date: Wed, 9 Jan 2013 22:14:43 +0100
|
||||
Subject: [PATCH] libblkid: add support for btrfs backup superblock
|
||||
|
||||
Btrfs has three superblock. The first one is placed at 64KB, the second one at
|
||||
64MB, the third one at 256GB.
|
||||
|
||||
If the first superblock is valid except that the "magic field" is zeroed, btrfs
|
||||
skips the check of the other superblocks. If the first superblock is fully
|
||||
invalid, btrfs checks for the other superblock.
|
||||
|
||||
So zeroing the first superblock "magic field" at the beginning seems that the
|
||||
filesystem is wiped. But when the first superblock is overwritten (eg by
|
||||
another filesystem), then the other two superblock may be considered valid, and
|
||||
the filesystem may resurrect.
|
||||
|
||||
This patch allow to find and wipe the other btrfs superblocks signature.
|
||||
|
||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||
---
|
||||
libblkid/src/superblocks/btrfs.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/libblkid/src/superblocks/btrfs.c b/libblkid/src/superblocks/btrfs.c
|
||||
index 039be42..1bd1df9 100644
|
||||
--- a/libblkid/src/superblocks/btrfs.c
|
||||
+++ b/libblkid/src/superblocks/btrfs.c
|
||||
@@ -87,6 +87,14 @@ const struct blkid_idinfo btrfs_idinfo =
|
||||
.magics =
|
||||
{
|
||||
{ .magic = "_BHRfS_M", .len = 8, .kboff = 64, .sboff = 0x40 },
|
||||
+ { .magic = "_BHRfS_M",
|
||||
+ .len = 8,
|
||||
+ .kboff = 64 * 1024,
|
||||
+ .sboff = 0x40 },
|
||||
+ { .magic = "_BHRfS_M",
|
||||
+ .len = 8,
|
||||
+ .kboff = 256 * 1024 * 1024,
|
||||
+ .sboff = 0x40 },
|
||||
{ NULL }
|
||||
}
|
||||
};
|
||||
--
|
||||
1.7.11.7
|
||||
|
@ -2,7 +2,7 @@
|
||||
Summary: A collection of basic system utilities
|
||||
Name: util-linux
|
||||
Version: 2.22.2
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain
|
||||
Group: System Environment/Base
|
||||
URL: http://en.wikipedia.org/wiki/Util-linux
|
||||
@ -94,6 +94,11 @@ Patch3: util-linux-ng-2.21-login-lastlog.patch
|
||||
# 231192 - ipcs is not printing correct values on pLinux
|
||||
Patch4: util-linux-2.21-ipcs-32bit.patch
|
||||
|
||||
###
|
||||
### Upstream patches (2.23 or 2.22.x)
|
||||
# 889888 - wipefs does not completely wipe btrfs volume
|
||||
Patch100: libblkid-add-support-for-btrfs-backup-superblock.patch
|
||||
|
||||
### Upstream patches from master branch (will be v2.23) for su(1) and new
|
||||
### runuser(1) implementation. This is required for the recent coreutils where
|
||||
### is no more su(1).
|
||||
@ -110,6 +115,7 @@ Patch208: 0208-runuser-add-u-to-not-execute-shell.patch
|
||||
Patch209: 0209-build-sys-move-runuser-to-sbin-dir.patch
|
||||
Patch210: 0210-su-fix-COMMAND-not-specified-error.patch
|
||||
|
||||
|
||||
%description
|
||||
The util-linux package contains a large variety of low-level system
|
||||
utilities that are necessary for a Linux system to function. Among
|
||||
@ -763,6 +769,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Jan 15 2013 Karel Zak <kzak@redhat.com> 2.22.2-2
|
||||
- fix #889888 - wipefs does not completely wipe btrfs volume
|
||||
|
||||
* Thu Dec 13 2012 Karel Zak <kzak@redhat.com> 2.22.2-1
|
||||
- upgrade to upstream maintenance release 2.22.2
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user