The _DEPENDENCIES has to be used for dependencies on another in-tree
files, but _LIBADD is to specify additional libs (including external
libs).
Reported-by: oleid <notifications@github.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
wipefs(8) has to also erase PMBR, not GPR header only, otherwise the
device could be still interpreted as a device with a partition table.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1054186
Signed-off-by: Karel Zak <kzak@redhat.com>
* Linux kernel cares about the first superblock only
* backup superblock are FS specific stuff and there is no reason to
care about it in generic tools
* the problem with broken btrfs utils has been already fixed (it was
possible to use the utils on filesystem with erased primary
superblok without any warning message).
Signed-off-by: Karel Zak <kzak@redhat.com>
* read also backup superblock
* check which superblock is newer
* set minimal device size to 1MiB
Reported-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Currently when trying to identify extN file system we're playing games
with searching for kernel modules and parsing /proc/filesystem. All of
this just because ext4 module can be used to mount ext3 and ext2 file
systems on recent kernel and also because of ext4dev.
However all of this is not necessary. Ext4 module which does support
mounting ext2 and ext3 file system is able to recognize and mount ext2
and ext3 type so there is no need to disguise it and ext4dev should only
be ever used for testing and not as fallback when other modules are
missing (use -t instead).
This also introduces a bug when in situation that we only have ext4
modules with ext2/ext3 support which is not loaded and we try to mount
ext2 file system we will mount it incorrectly as ext4. This will not
happen if the ext4 module is already loaded.
With this patch we remove all the unnecessary checks and return the real
type of the file system which is on the device. This fixes the issue.
However on the kernel which was not compiled with EXT4_USE_FOR_EXT23
support one would have to provide file system type (-t) to be able to
mount the file system with ext4 driver.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
* v1: hdr->version = 1, magic string = SWAPSPACE2
* v0: no versio in header, magic string = SWAP-SPACE
The mistake has been introduced in the old udev volume_id
binary where the version was set according to magic string.
Reported-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
If a bad check sum is detected and BLKID_SUBLKS_BADCSUM is enabled
than SBBADCSUM=1 is added to the probing result.
Signed-off-by: Karel Zak <kzak@redhat.com>
[kzak@redhat.com: - move BLKID_SUBLKS_BADCSUM login to
blkid_probe_verify_csum()]
Signed-off-by: Gabriel de Perthuis <g2p.code@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
* consolidate "incorrect checksum" debug messages
* verify all on one place
Based on patch from Gabriel de Perthuis <g2p.code@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
The log UUID is usually the same as filesystem UUID, it is bad idea to
have two devices with the same UUID in the system. It seems batter to
use only LOGUUID= for xfs external log.
# mkfs.xfs -l logdev=/dev/sdb1 /dev/sdb2
# blkid -p -o udev /dev/sdb1 | grep FS
ID_FS_LOGUUID=4063d453-5c01-46ce-b92f-9523d64aecc7
ID_FS_TYPE=xfs_external_log
ID_FS_USAGE=other
# blkid -p -o udev /dev/sdb2 | grep FS
ID_FS_UUID=4063d453-5c01-46ce-b92f-9523d64aecc7
ID_FS_TYPE=xfs
ID_FS_USAGE=filesystem
The filesystem (sdb2) uses UUID= and log (sdb1) uses LOGUUID=.
Signed-off-by: Karel Zak <kzak@redhat.com>
$ blkid -o udev -p tests/output/blkid/images-fs/xfs.img
ID_FS_AMBIVALENT=filesystem:xfs other:xfs_external_log
it seems that regular XFS with internal log may be interpreted as log
device. This is incorrect.
This patch checks for XFS magic string to avoid this collision.
Signed-off-by: Karel Zak <kzak@redhat.com>
The LOGUUID is alias for UUID, this alias is necessary to standardize
the tag name (we want to use the same tag LOGUUID= for all external
logs on all filesystems).
Note that for another filesystems (e.g. xfs) we have to differentiate
between the journal and filesystem uuids to avoid collisions, because
both devices use the same uuid.
Signed-off-by: Karel Zak <kzak@redhat.com>
* the goal is to make the uuid visible and usable it as mount
variable/spec, then LOGUUID= seems better than UUID_LOG=
* we already have PARTUUID=
* the UUID_RAW and UUID_SUB are not used by mount(8)
Signed-off-by: Karel Zak <kzak@redhat.com>
Detects external XFS log devices with a minimum size of 10MB. It's possible to
craft a smaller log, but that would be very unlikely; it'd require a small XFS
filesystem and an intentionally small log, which would defeat the performance
goal of an external log in the first place.
[kzak@redhat.com: - use UUID_LOG variable name for the log uuid]
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
This is necessary for paranoid security guys who believe that things
like "-Wl,-z,relro" or "-Wl,-z,bind_now" is a way how to make the
world a safer place...
Signed-off-by: Karel Zak <kzak@redhat.com>
# blkid /dev/sdb1
dev/sdb1: TYPE="ext2" PARTUUID="54e743a7-01"
the PARTUUID is generated from MBR Id and partition number. The same
method uses Linux kernel for root=PARTUUID= on systems with MBR.
Note that the patch also removes 0x prefix from PTUUID.
Signed-off-by: Karel Zak <kzak@redhat.com>
The standard format is to seperate each entry with a comma, and
for each one to be on a line by itself. Most util-linux pages
follow this, but a few do not.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
fstab entry:
FOO= / btrfs defaults 1 1
Program received signal SIGABRT, Aborted.
0x00007f016ccd8819 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
(gdb) bt
at ../sysdeps/unix/sysv/linux/libc_fatal.c:196
Reported-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Karel Zak <kzak@redhat.com>