Theodore Ts'o [Mon, 8 Dec 2008 13:28:35 +0000 (14:28 +0100)]
blkid: Optimize devicemapper support
This commit works by removing all calls from libdevmapper altogether,
and using the standard support for "normal" non-dm devices.
It depends on dm devices being placed in /dev/mapper (but the previous
code had this dependency anyway), and /proc/partitions containing dm
devices.
We don't actually rip out the libdevmapper code in this commit, but
just disable it via #undef HAVE_DEVMAPPER, just so it's easier to
review and understand the fundamental code changes. A subsequent
commit will remove the libdevmapper code, as well as unexport
the blkid_devdirs string array.
Thanks to Karel Zak for inspiring me to look at the dm code in blkid,
so I could realize how much it deserved to ripped out by its roots. :-)
[kzak@redhat.com: port from e2fsprogs to util-linux-ng tree]
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Karel Zak <kzak@redhat.com>
Kay Sievers [Sat, 6 Dec 2008 16:12:55 +0000 (17:12 +0100)]
blkid: hfs - use proper native UUID format
Here is the md5'd UUID for hfs:
$ LD_LIBRARY_PATH=libs/blkid/src/ libs/blkid/bin/blkid ../../volume_images/hfs-extended.img
UUID="56a19597-a3c8-325d-9df2-f30bc6f8ac09" LABEL="I am HFS Extended" TYPE="hfsplus"
Karel Zak [Thu, 20 Nov 2008 12:00:43 +0000 (13:00 +0100)]
blkid: support detection of multiple signatures
The classic way is to return the first successfully detected signature
(filesystem/raid). Unfortunately, sometimes we need to check for all
possible signatures, because on some volumes (e.g. CD-ROMs) is possible
to store multiple filesystems.
Sometimes we need to check for all filesystems to avoid situation that
we return wrong result (e.g. swap and FAT on the same device).
Karel Zak [Wed, 27 Aug 2008 09:55:39 +0000 (11:55 +0200)]
blkid: add basic configure.ac stuff and blkid.pc
Note, the configure.in stuff is incomplete -- but it's seem we can
remove the libbevmapper crap from blkid at all. So this code autoconf
is temporary only.
Roy Peled [Fri, 28 Nov 2008 14:57:00 +0000 (16:57 +0200)]
mkfs.cramfs: lower memory requirements for layouts with duplicate files
mkfs.cramfs allocates memory based on a calculated upper-bound
of required filesystem size. If there are duplicate files
or hard links, the current implementation unnecessarily increases
the upper-bound per each copy of the file, even though cramfs does
not store copies of contents of identical files.
This patch improves the calculation of fslen_ub, the upper bound
of required filesystem size, by making the upper bound aware of
duplicate files.
This is very helpful for layouts that hold a lot of hard links,
which are seen as duplicate files by mkfs.cramfs. For example,
this drastically reduces the memory requirements for creating
a standard Busybox layout.
Signed-off-by: Roy Peled <the.roy.peled@gmail.com>
mkfs.cramfs: add endianness support to cramfs tools
cramfs is an endianness dependent file system. So far, the cramfs
utilities did not support cramfs images of different endianness than
the host machine.
A separate utility, cramfsswap, was required in order to change the
endianness of the image before and after using cramfs utilities. The
extra utility introduced extra maintenance and an additional step in
the process.
This patch adds endianness support to mkfs.cramfs and fsck.cramfs.
fsck.cramfs now automatically detects the image endianness, and can
work on images of either endianness. mkfs.cramfs now accepts a new
optional parameter (-N) that allows creating the cramfs image in
either endianness.
Signed-off-by: Roy Peled <the.roy.peled@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 16 Jan 2009 11:21:15 +0000 (12:21 +0100)]
mount: non-setuid (POSIX file capabilities) support
The mount command does not work properly if you replace suid with
POSIX file capabilities. We still need to check for non-root mounts and
the command has to work in very restricted mode for non-root users.
This patch allows you to remove suid bit from mount and umount. Note
that you need a system with filesystem capability support, e.g.
Fedora 10).
Marco d'Itri [Sun, 25 Jan 2009 16:44:16 +0000 (17:44 +0100)]
rtcwake: support not suspending
People usually want to use pm-utils to suspend the system instead of
the raw kernel interface, so I added an option to just exit after
configuring the wakeup time.
Actually I think that all the suspend code should be removed from
rtcwake, since it does not really belong there.
mount: document newinstance and ptmxmode options to devpts
Support for multiple instances of devpts were included in 2.6.29-rc1.
Update man pages to document the new options. Additional details about
the new options are described in 'Documentation/filesystems/devpts.txt'
of kernel source tree.
Reviewed-by: WANG Cong <wangcong@zeuux.org> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 6 Jan 2009 23:18:41 +0000 (00:18 +0100)]
umount: cleanup gefs_by_specdir()
fix:
- don't call canonicalize_spec() for LABELs/UUIDs
- simplify the code
- rename to getfs_by_devdir(), because we use it only for
device names and not for SPECes (see umount.c).
Karel Zak [Fri, 26 Dec 2008 00:09:34 +0000 (01:09 +0100)]
raw: default to /dev/raw/rawctl
The raw devices are in the raw/ subdirectory. It makes sense to use
the same subdirectory also for the control file. The old /dev/rawctl
is also supported as a fallback.
The #ifdef OLD_RAW_DEVS (/dev/raw<N>) is unsupported from now.
Karel Zak [Mon, 22 Dec 2008 17:46:45 +0000 (18:46 +0100)]
mount: add rootcontext= SELinux mount option
Note, the description in the mount.8 man page is copy & paste from
rootcontext= kernel patch (by James Morris). I didn't found anything
more useful... (patches welcomed:-)