]> git.ipfire.org Git - thirdparty/util-linux.git/commit - disk-utils/fsck.c
fsck: improve whole-disk check, detect stacked devices
authorKarel Zak <kzak@redhat.com>
Thu, 19 Aug 2010 13:33:45 +0000 (15:33 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 19 Aug 2010 13:33:45 +0000 (15:33 +0200)
commit0c0f93fcc37d02d9ab6d159f964da378d424199e
treed8ab6318379cea0f9f2b23e8d4a99a2434c64d6b
parent7df072799d25cb6c744909225cd89329e1c4668b
fsck: improve whole-disk check, detect stacked devices

The current heuristic for conversion from partition to whole-disk
is based on device names. It's pretty poor. This patch replaces this
code with blkid_devno_to_wholedisk(). This solution is based on
/sys FS and it works for arbitrary partitioned devices.

The another problem is the way how fsck determines stacked devices.
The current code checks device name for "md" prefix only. It does not
care about DM, dm-ccypt, and so on. This patch uses
/sys/block/.../slaves/, but it does not fully resolves dependencies
between all devices. The method is simple -- fsck does not check
stacked devices in parallel with any other device.

Signed-off-by: Karel Zak <kzak@redhat.com>
Makefile.am
fsck/Makefile.am
fsck/base_device.c [deleted file]
fsck/fsck.8
fsck/fsck.c
fsck/fsck.h