e2fsprogs/e2fsprogs-1.41.1-splash_support.patch

189 lines
4.4 KiB
Diff
Raw Normal View History

- Update to 1.42.2: * resize2fs uses much less CPU and is much faster for very large fs. * The seti and freei commands in debugfs can now take an optional length argument to set and clear a contiguous range of inodes. * E2fsck will now make explicit checks for the EOFBLOCKS_FL, since we plan to remove support for it from the kernel file system driver. * mke2fs can now use direct I/O via "mke2fs -D" * E2fsck was needlessly closing and re-opening the file system as a side effect of adding Multiple Mount Protection (MMP). This isn't necessary for non-MMP file systems, so drop it. * E2fsck will now abort if there are memory allocation failures when the file system is initially opened and during the block group descriptor checks. * e2fsck will now report the incorrect and corrected checksum values for incorrect block groups. * e2fsck can now write log files containing the details of the problems that were found and fixed directly, via configuration parameters in /etc/e2fsck.conf. * The number of messages reported by e2fsck for a given problem type can be limited. * dumpe2fs, debugfs, and tune2fs now use rbtree bitmaps, which noticably reduces memory consumption for large file systems. * E2fsck now checks for extents with a zero length. * Fixed a number of bugs relating to discard. * E2fsck's CPU utilization in pass 5 has been optimized. * E2image will now skip copying uninitialized bitmap and inode table blocks. * Fixed mke2fs -S so it does not corrupt the first block group's information. * E2fsck will now check the new sysfs interface to determine if we are OBS-URL: https://build.opensuse.org/package/show/filesystems/e2fsprogs?expand=0&rev=27
2012-04-23 12:15:04 +02:00
Index: e2fsck/Makefile.in
===================================================================
--- e2fsck/Makefile.in.orig
+++ e2fsck/Makefile.in
@@ -69,7 +69,7 @@ OBJS= crc32.o dict.o unix.o e2fsck.o sup
pass3.o pass4.o pass5.o journal.o badblocks.o util.o dirinfo.o \
dx_dirinfo.o ehandler.o problem.o message.o quota.o recovery.o \
region.o revoke.o ea_refcount.o rehash.o profile.o prof_err.o \
- Update to 1.42.2: * resize2fs uses much less CPU and is much faster for very large fs. * The seti and freei commands in debugfs can now take an optional length argument to set and clear a contiguous range of inodes. * E2fsck will now make explicit checks for the EOFBLOCKS_FL, since we plan to remove support for it from the kernel file system driver. * mke2fs can now use direct I/O via "mke2fs -D" * E2fsck was needlessly closing and re-opening the file system as a side effect of adding Multiple Mount Protection (MMP). This isn't necessary for non-MMP file systems, so drop it. * E2fsck will now abort if there are memory allocation failures when the file system is initially opened and during the block group descriptor checks. * e2fsck will now report the incorrect and corrected checksum values for incorrect block groups. * e2fsck can now write log files containing the details of the problems that were found and fixed directly, via configuration parameters in /etc/e2fsck.conf. * The number of messages reported by e2fsck for a given problem type can be limited. * dumpe2fs, debugfs, and tune2fs now use rbtree bitmaps, which noticably reduces memory consumption for large file systems. * E2fsck now checks for extents with a zero length. * Fixed a number of bugs relating to discard. * E2fsck's CPU utilization in pass 5 has been optimized. * E2image will now skip copying uninitialized bitmap and inode table blocks. * Fixed mke2fs -S so it does not corrupt the first block group's information. * E2fsck will now check the new sysfs interface to determine if we are OBS-URL: https://build.opensuse.org/package/show/filesystems/e2fsprogs?expand=0&rev=27
2012-04-23 12:15:04 +02:00
- logfile.o sigcatcher.o $(MTRACE_OBJ)
+ logfile.o sigcatcher.o splash.o $(MTRACE_OBJ)
PROFILED_OBJS= profiled/dict.o profiled/unix.o profiled/e2fsck.o \
profiled/super.o profiled/pass1.o profiled/pass1b.o \
@@ -108,6 +108,7 @@ SRCS= $(srcdir)/e2fsck.c \
$(srcdir)/rehash.c \
$(srcdir)/region.c \
$(srcdir)/profile.c \
+ $(srcdir)/splash.c \
$(srcdir)/sigcatcher.c \
- Update to 1.42.2: * resize2fs uses much less CPU and is much faster for very large fs. * The seti and freei commands in debugfs can now take an optional length argument to set and clear a contiguous range of inodes. * E2fsck will now make explicit checks for the EOFBLOCKS_FL, since we plan to remove support for it from the kernel file system driver. * mke2fs can now use direct I/O via "mke2fs -D" * E2fsck was needlessly closing and re-opening the file system as a side effect of adding Multiple Mount Protection (MMP). This isn't necessary for non-MMP file systems, so drop it. * E2fsck will now abort if there are memory allocation failures when the file system is initially opened and during the block group descriptor checks. * e2fsck will now report the incorrect and corrected checksum values for incorrect block groups. * e2fsck can now write log files containing the details of the problems that were found and fixed directly, via configuration parameters in /etc/e2fsck.conf. * The number of messages reported by e2fsck for a given problem type can be limited. * dumpe2fs, debugfs, and tune2fs now use rbtree bitmaps, which noticably reduces memory consumption for large file systems. * E2fsck now checks for extents with a zero length. * Fixed a number of bugs relating to discard. * E2fsck's CPU utilization in pass 5 has been optimized. * E2image will now skip copying uninitialized bitmap and inode table blocks. * Fixed mke2fs -S so it does not corrupt the first block group's information. * E2fsck will now check the new sysfs interface to determine if we are OBS-URL: https://build.opensuse.org/package/show/filesystems/e2fsprogs?expand=0&rev=27
2012-04-23 12:15:04 +02:00
$(srcdir)/logfile.c \
prof_err.c \
@@ -541,6 +542,7 @@ region.o: $(srcdir)/region.c $(top_build
$(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
$(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
$(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.h
+splash.o: $(srcdir)/splash.c $(srcdir)/splash.h
profile.o: $(srcdir)/profile.c $(top_builddir)/lib/config.h \
- Update to 1.42.2: * resize2fs uses much less CPU and is much faster for very large fs. * The seti and freei commands in debugfs can now take an optional length argument to set and clear a contiguous range of inodes. * E2fsck will now make explicit checks for the EOFBLOCKS_FL, since we plan to remove support for it from the kernel file system driver. * mke2fs can now use direct I/O via "mke2fs -D" * E2fsck was needlessly closing and re-opening the file system as a side effect of adding Multiple Mount Protection (MMP). This isn't necessary for non-MMP file systems, so drop it. * E2fsck will now abort if there are memory allocation failures when the file system is initially opened and during the block group descriptor checks. * e2fsck will now report the incorrect and corrected checksum values for incorrect block groups. * e2fsck can now write log files containing the details of the problems that were found and fixed directly, via configuration parameters in /etc/e2fsck.conf. * The number of messages reported by e2fsck for a given problem type can be limited. * dumpe2fs, debugfs, and tune2fs now use rbtree bitmaps, which noticably reduces memory consumption for large file systems. * E2fsck now checks for extents with a zero length. * Fixed a number of bugs relating to discard. * E2fsck's CPU utilization in pass 5 has been optimized. * E2image will now skip copying uninitialized bitmap and inode table blocks. * Fixed mke2fs -S so it does not corrupt the first block group's information. * E2fsck will now check the new sysfs interface to determine if we are OBS-URL: https://build.opensuse.org/package/show/filesystems/e2fsprogs?expand=0&rev=27
2012-04-23 12:15:04 +02:00
$(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/et/com_err.h \
$(srcdir)/profile.h prof_err.h
Index: e2fsck/splash.c
===================================================================
--- /dev/null
+++ e2fsck/splash.c
@@ -0,0 +1,100 @@
+/*
+ * add support for switching the splash screen on boot
+ */
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+#include "splash.h"
+
+static int verbose = 0;
+
+/* nop implementation
+ */
+static void nop(void)
+{
+}
+
+static struct splash_ops nop_ops = {
+ .splash_on = nop,
+ .splash_off = nop
+};
+
+/*
+ * bootsplash implementation
+ */
+#define BOOTSPLASH_CTL "/proc/splash"
+
+static int bootsplash_exists(void)
+{
+ struct stat sb;
+
+ if (stat(BOOTSPLASH_CTL, &sb) == -1)
+ return 0;
+
+ if (S_ISREG(sb.st_mode))
+ return 1;
+
+ return 0;
+}
+
+/* write msg to splash control */
+static void bootsplash_msg(const char *msg, size_t size)
+{
+ int fd;
+ size_t written;
+
+ fd = open(BOOTSPLASH_CTL, O_WRONLY);
+ if (fd == -1) {
+ if (verbose)
+ printf("cannot open %s\n", BOOTSPLASH_CTL);
+ return;
+ }
+
+ written = write(fd, msg, size);
+ if (written != size) {
+ if (verbose)
+ printf("size = %zd, written = %zd\n", size, written);
+ }
+
+ close(fd);
+}
+
+static void bootsplash_on(void)
+{
+ if (verbose)
+ printf("setting bootsplash silent\n");
+ bootsplash_msg("silent\n", 7);
+}
+
+static void bootsplash_off(void)
+{
+ if (verbose)
+ printf("setting bootsplash verbose\n");
+ bootsplash_msg("verbose\n", 8);
+}
+
+static struct splash_ops bootsplash_ops = {
+ .splash_on = bootsplash_on,
+ .splash_off = bootsplash_off
+};
+
+/*
+ * Initialisation
+ */
+void splash_init(struct splash_ops **ops)
+{
+ if (bootsplash_exists())
+ *ops = &bootsplash_ops;
+ else
+ *ops = &nop_ops;
+}
+
+void splash_set_verbose(void)
+{
+ verbose = 1;
+}
+
- Update to 1.42.2: * resize2fs uses much less CPU and is much faster for very large fs. * The seti and freei commands in debugfs can now take an optional length argument to set and clear a contiguous range of inodes. * E2fsck will now make explicit checks for the EOFBLOCKS_FL, since we plan to remove support for it from the kernel file system driver. * mke2fs can now use direct I/O via "mke2fs -D" * E2fsck was needlessly closing and re-opening the file system as a side effect of adding Multiple Mount Protection (MMP). This isn't necessary for non-MMP file systems, so drop it. * E2fsck will now abort if there are memory allocation failures when the file system is initially opened and during the block group descriptor checks. * e2fsck will now report the incorrect and corrected checksum values for incorrect block groups. * e2fsck can now write log files containing the details of the problems that were found and fixed directly, via configuration parameters in /etc/e2fsck.conf. * The number of messages reported by e2fsck for a given problem type can be limited. * dumpe2fs, debugfs, and tune2fs now use rbtree bitmaps, which noticably reduces memory consumption for large file systems. * E2fsck now checks for extents with a zero length. * Fixed a number of bugs relating to discard. * E2fsck's CPU utilization in pass 5 has been optimized. * E2image will now skip copying uninitialized bitmap and inode table blocks. * Fixed mke2fs -S so it does not corrupt the first block group's information. * E2fsck will now check the new sysfs interface to determine if we are OBS-URL: https://build.opensuse.org/package/show/filesystems/e2fsprogs?expand=0&rev=27
2012-04-23 12:15:04 +02:00
Index: e2fsck/splash.h
===================================================================
--- /dev/null
+++ e2fsck/splash.h
@@ -0,0 +1,13 @@
+#ifndef _SPLASH_H
+#define _SPLASH_H
+
+struct splash_ops {
+ void (*splash_on)(void);
+ void (*splash_off)(void);
+};
+
+void splash_init(struct splash_ops **ops);
+void splash_set_verbose(void);
+
+#endif /* _SPLASH_H */
+
- Update to 1.42.2: * resize2fs uses much less CPU and is much faster for very large fs. * The seti and freei commands in debugfs can now take an optional length argument to set and clear a contiguous range of inodes. * E2fsck will now make explicit checks for the EOFBLOCKS_FL, since we plan to remove support for it from the kernel file system driver. * mke2fs can now use direct I/O via "mke2fs -D" * E2fsck was needlessly closing and re-opening the file system as a side effect of adding Multiple Mount Protection (MMP). This isn't necessary for non-MMP file systems, so drop it. * E2fsck will now abort if there are memory allocation failures when the file system is initially opened and during the block group descriptor checks. * e2fsck will now report the incorrect and corrected checksum values for incorrect block groups. * e2fsck can now write log files containing the details of the problems that were found and fixed directly, via configuration parameters in /etc/e2fsck.conf. * The number of messages reported by e2fsck for a given problem type can be limited. * dumpe2fs, debugfs, and tune2fs now use rbtree bitmaps, which noticably reduces memory consumption for large file systems. * E2fsck now checks for extents with a zero length. * Fixed a number of bugs relating to discard. * E2fsck's CPU utilization in pass 5 has been optimized. * E2image will now skip copying uninitialized bitmap and inode table blocks. * Fixed mke2fs -S so it does not corrupt the first block group's information. * E2fsck will now check the new sysfs interface to determine if we are OBS-URL: https://build.opensuse.org/package/show/filesystems/e2fsprogs?expand=0&rev=27
2012-04-23 12:15:04 +02:00
Index: e2fsck/unix.c
===================================================================
--- e2fsck/unix.c.orig
+++ e2fsck/unix.c
@@ -51,6 +51,7 @@ extern int optind;
#include "e2p/e2p.h"
#include "e2fsck.h"
#include "problem.h"
+#include "splash.h"
#include "../version.h"
/* Command line options */
@@ -1169,6 +1170,7 @@ int main (int argc, char *argv[])
e2fsck_t ctx;
blk64_t orig_superblock;
struct problem_context pctx;
+ struct splash_ops *sops;
int flags, run_result;
int journal_size;
int sysval, sys_page_size = 4096;
@@ -1207,6 +1209,7 @@ int main (int argc, char *argv[])
exit(FSCK_ERROR);
}
reserve_stdio_fds();
+ splash_init(&sops);
- Update to 1.42.2: * resize2fs uses much less CPU and is much faster for very large fs. * The seti and freei commands in debugfs can now take an optional length argument to set and clear a contiguous range of inodes. * E2fsck will now make explicit checks for the EOFBLOCKS_FL, since we plan to remove support for it from the kernel file system driver. * mke2fs can now use direct I/O via "mke2fs -D" * E2fsck was needlessly closing and re-opening the file system as a side effect of adding Multiple Mount Protection (MMP). This isn't necessary for non-MMP file systems, so drop it. * E2fsck will now abort if there are memory allocation failures when the file system is initially opened and during the block group descriptor checks. * e2fsck will now report the incorrect and corrected checksum values for incorrect block groups. * e2fsck can now write log files containing the details of the problems that were found and fixed directly, via configuration parameters in /etc/e2fsck.conf. * The number of messages reported by e2fsck for a given problem type can be limited. * dumpe2fs, debugfs, and tune2fs now use rbtree bitmaps, which noticably reduces memory consumption for large file systems. * E2fsck now checks for extents with a zero length. * Fixed a number of bugs relating to discard. * E2fsck's CPU utilization in pass 5 has been optimized. * E2image will now skip copying uninitialized bitmap and inode table blocks. * Fixed mke2fs -S so it does not corrupt the first block group's information. * E2fsck will now check the new sysfs interface to determine if we are OBS-URL: https://build.opensuse.org/package/show/filesystems/e2fsprogs?expand=0&rev=27
2012-04-23 12:15:04 +02:00
set_up_logging(ctx);
if (ctx->logf) {
@@ -1584,6 +1587,7 @@ print_unsupp_features:
fatal_error(ctx, 0);
check_if_skip(ctx);
check_resize_inode(ctx);
+ sops->splash_off();
if (bad_blocks_file)
read_bad_blocks_file(ctx, bad_blocks_file, replace_bad_blocks);
else if (cflag)