Commit Graph

1884 Commits (98eb44bdb5749f323a858d71bf5e7f0eddb61191)

Author SHA1 Message Date
Theodore Ts'o 98eb44bdb5 Add an option to debugfs to open filesystems in exclusive mode
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-18 19:58:13 -05:00
Theodore Ts'o 39c47ce641 Add EXT2_FLAG_EXCLUSIVE to the ext2fs library.
This flag when specified to ext2fs_open or ext2fs_initialize indicates 
that the application wants the io_channel to be opened in exclusive mode.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-18 19:16:10 -05:00
Theodore Ts'o fa6c653ec3 Add IO_FLAG_EXCLUSIVE flag to io_channel abstraction
Add a new io_channel open flag, IO_FLAG_EXCLUSIVE,which requests that 
the device be opened in exclusive (O_EXCL) mode.  Add support to the unix_io
implementation for this flag.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-18 18:57:44 -05:00
Theodore Ts'o 7447921dff Fix documentation: BLOCK_FLAG_TRAVERSE should be BLOCK_FLAG_DEPTH_TRAVERSE
Addresses Debian Bug #351268

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-18 08:26:36 -05:00
Theodore Ts'o cbb7f9c4f1 Fix build when not building any shared libraries.
Add missing real-subdirs:: line to lib/Makefile.library, so there is a 
default definition of the real-subdirs target.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-17 21:59:13 -05:00
Theodore Ts'o 59571a51d7 Document the resize_inode filesystem option in mke2fs man page
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-17 21:03:27 -05:00
Theodore Ts'o a612f3432e Fix a signed vs unsigned bug in calc_reserved_gdt_blocks()
This fixes mke2fs -O resize_inode for very large filesystems (i.e., 20GB).
Addresses Debian Bug #346580

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-17 20:39:52 -05:00
Theodore Ts'o bf69235ad0 Add support for on-line resizing to resize2fs
If the filesystem is mounted, attempt to use the on-line resizing
ioctls to resize the filesystem.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-17 19:45:45 -05:00
Theodore Ts'o e324b25059 Fix blkid's last verification logic to work when the system clock is insane
Users have reported problems on newly installed systems when the
Macintosh's system clock battery is dead and the hardware clock is
returning a date of 1904.  Turns out there were some bugs in handling
dates before the Unix epoch.

Addresses Red Hat Bug: #182188

probe.c (blkid_verify): Fix the bid_time sanity checking logic,
	so that if last verification time is more recent than the
	current time, or the comparison between the last
	verification time and the current time causes an overflow,
	a device verification will take place.

devname.c (blkid_get_dev): Set the initial bid_time to be
	INT_MIN, to guarantee that blkid_verify will always be run
	even when the system clock is insane.

dev.c (blkid_debug_dump_dev), read.c (debug_dump_dev), 
	save.c (save_dev): Fix the printf format for dev->bid_time
	to match the fact that it is an signed type.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-12 23:25:15 -05:00
Theodore Ts'o 3f546fcc27 Fix the subdirs logic so it works with GNU make 3.80
The previous fix which fixed the problem with GNU make 3.81 building
all of the library object files caused GNU make 3.80 fail because the
subdirectories (such as elfshared) were not getting created.  This fix
should allow the Makefiles to work with both GNU make 3.80 and GNU
make 3.81.
2006-03-10 21:39:40 -05:00
Theodore Ts'o ba5e38494e Add EXT_JOURNAL to the blkid tag of ext3 filesystems.
If the filesystem has an external journal, store the UUID of the
external journal in the tag EXT_JOURNAL.

If the filesystem type has changed, clear all the tags on the device,
not just a preset list of LABEL, UUID, TYPE, and SEC_TYPE.

Fix a bug so that blkid_set_tag will work correctly when freeing a tag
when the input name parameter comes from the tag that we are freeing.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-10 18:11:35 -05:00
Theodore Ts'o b1c52b26a4 Enhance e2fsck so it can fix external journal hint in the superblock
Check to see if the superblock hint for the external journal needs to
be updated, and if so, offer to update it.  (Addresses Debian Bug:
#355644)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-10 15:25:59 -05:00
Theodore Ts'o 26efcacd04 Remove e2fsck/malloc.h
(This was an artifact of the migration of the sources from BitKeeper
to Mercurial; mea culpa, mea maximum culpa --- Ted)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-08 18:25:30 -05:00
Theodore Ts'o 6a2efe047d Fix debugfs's icheck to correctly report the owner of an EA block
Hello Ted,
here is a minor fixup with debugfs "icheck" finding a block in an EA.
It was reporting the inode number as one too low because it was set
after the EA check is done.

From: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-08 18:22:06 -05:00
Theodore Ts'o d2d0d79861 Enable devmapper patch for Debian
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-08 17:42:40 -05:00
Karel Zak 4db2f59a71 Add device-mapper support to the blkid library
On systems where is multi-path storage device is problem with duplicated
filesystems. The solution is select "the best" device. This is possible
by device-mapper library.

Short quotation from RH bugzilla:

With my patch, all dm devices remains in libblkid cache.

Only the top level dm devices are given high priority
and more appropriate node names (i.e. /dev/mapper/*) are used.

For example, if we have linear mapped dm device "ov1" over
dm device "disk1p3" which is multipath mapped to /dev/sdd3 and /dev/sdh3:
  # dmsetup.static ls --tree
  ov1 (253:5) <-- /dev/mapper/ov1 or /dev/dm-5
   `-disk1p3 (253:4) <-- /dev/mapper/disk1p3 or /dev/dm-4
      `-disk1 (253:0)
         |- (8:112) <-- /dev/sdh
         `- (8:48) <-- /dev/sdd

Original version of blkid will show:
  # ./orig/blkid -t LABEL=mpdisk1p3 -l
  /dev/sdd3: LABEL="mpdisk1p3" ... TYPE="ext3"

With my patch, blkid will show:
  # ./deptree/blkid -t LABEL=mpdisk1p3 -l
  /dev/mapper/ov1: LABEL="mpdisk1p3" ... TYPE="ext3"

In blkid cache, all devices are listed:

  # ./orig/blkid -t LABEL=mpdisk1p3
  /dev/sdd3: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/sdh3: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/dm-4: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/dm-5: LABEL="mpdisk1p3" ... TYPE="ext3"

  # ./deptree/blkid -t LABEL=mpdisk1p3
  /dev/mapper/ov1: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/sdd3: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/sdh3: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/dm-4: LABEL="mpdisk1p3" ... TYPE="ext3"

For more details see discussion on:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=156324

Addresses Red Hat Bug: #156324

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-08 14:17:28 -05:00
Theodore Ts'o d2955d2216 Update Swedish translation 2006-02-20 14:16:21 -05:00
Theodore Ts'o a5f37a9b25 Add a config option which controls whether fs checks are skipped when on battery
Whether fs checks are skipped when the system is running on battery can be
controlled by the new e2fsck.conf option defer_check_on_battery (this option 
defaults to TRUE).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-29 05:15:36 -05:00
Theodore Ts'o bc3392c389 Print an explanation when skipping a check due being on battery
On Sat, Jan 28, 2006 at 12:53:33PM -0600, Fredrick Knieper wrote:
> Package: e2fsprogs
> Version: 1.38+1.39-WIP-2005.12.31-1
>
> When running fsck at boot or when running e2fsck manually on a device,
> fsck will not check a filesystem based on the maximum mount count,
> unless a flag such as -f or -c is used to force the filesystem check.

What's happening is that when you run on battery, e2fsck will delay
running the filesystem check, on the assumption that it is better to
defer the check until some time in the future when your laptop is
running on AC mains again.  This deferral is not infinite, however; if
the number of mounts exceeds twice the max mount counts, or if the
interval between checks exceeds twice the check interval, e2fsck will
force the check even though you are on battery.

I've changed the sources to print a message to make this more clear.

Addresses Debian Bug: #350306

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-29 05:05:31 -05:00
Theodore Ts'o 1e112ba195 Update debian changelog for release.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-06 21:41:49 -05:00
Theodore Ts'o 56e5d125c8 Update priorities and sections to match with Debian override file.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-06 21:40:57 -05:00
Theodore Ts'o e577febef0 Added tag E2FSPROGS-1.39-WIP-1231 for changeset b3e5c52c10907a4488ded00fca596487643bddc4 2006-01-06 21:02:34 -05:00
Theodore Ts'o f2275e3679 Update Dutch, Polish, and Swedish translations.
Addresses Debian Bug: #343149

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-06 20:44:13 -05:00
Theodore Ts'o 2adc320f01 Set FD_CLOEXEC on the /dev/random file descriptor used by libuuid
This avoids a fd leak across an execve() which was causing problems
for the LVM tools.

(Addresses Debian Bug: #345832)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-06 18:10:02 -05:00
Theodore Ts'o 22fe674da4 Add support for quoted strings in tag and section names
Also changed top-level section name parsing to ignore leading and
trailing whitespace.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-06 15:04:39 -05:00
Theodore Ts'o 7d922f8bcb Add support to the profile library for /etc/foo/conf.d style directories
If a directory is passed to profile_init, then read all files which
match [0-9a-zA-Z]* in sort order.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-05 03:56:19 -05:00
Theodore Ts'o d673582241 Fix gcc -Wall warning in profile_helper.c
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-05 01:29:50 -05:00
Theodore Ts'o d45544ca54 More profile cleanups: remove prf_data_t data structure
Eliminate the prf_data_t data structure and fold it back into
prof_file_t.  Eschew needless complexity!

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-05 01:23:48 -05:00
Theodore Ts'o 95a8d1de51 Enhance profile library's parser to accept comments
This also changes syntax accepted by the profile parser.  The value of
profile relations must not contain spaces unless it is quoted;
otherwise the parser will throw an error.  Previously something like
this was allowed:

	[liboptions]
		test = foo bar

Now, the relation must be in double quotes in order to be valid, i.e.,
"foo bar".

Comments are allowed anywhere and can be started with either a ';' or
a '#' character.  The only place where comments will not be intepreted
as beginning a comment is in a quoted string.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-05 00:47:34 -05:00
Theodore Ts'o f5f14fcfe9 Add syntax error reporting to the profile library
E2fsck will now report syntax errors in /etc/e2fsck.conf intead of simply
ignoring the config file when there are errors.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-04 10:32:16 -05:00
Theodore Ts'o 9a4c209cd2 Simplify profile core functionality
Boil down and simplify profile.c, and move extra functionality that's
not needed into profile_helpers.c

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-02 22:04:41 -05:00
Theodore Ts'o 44dc5f8804 Clean up test driver program for profile.c and #ifdef unused static functions
Unified batchmode and command-line handling.

profile_is_node_final() and profile_find_node_relation() are static,
unused functions.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-02 12:25:03 -05:00
Theodore Ts'o cec7103d92 Fix profile.c so that com_err.h doesn't have to be installed
Fix #include of com_err.h so that it isn't required that the com_err
development environment be installed.  (Addresses Debian Bug: #345519)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-01-01 21:31:45 -05:00
Theodore Ts'o 1d3c9aad61 Update version file for 1.39-WIP-1231 release. 2005-12-31 16:46:46 -05:00
Theodore Ts'o 6956f613b6 Update e2fsprogs's internationalization files.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-31 16:46:15 -05:00
Theodore Ts'o f32278505b Update release notes 2005-12-31 16:45:29 -05:00
Theodore Ts'o 8fd98bba21 Add e2fsck problem handling to be configurable
Add the ability for the e2fsck configuration file to override the
behaviour of e2fsck when a particular filesystem problem is
encountered.  This allows reconnecting an inode to lost+found to not
stop the boot sequence, if a system administrator really badly wants
this behaviour for some specialized reason, for example.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-31 16:33:33 -05:00
Theodore Ts'o 5582275fe0 Slim down profile.c
#ifdef out functions not needed by e2fsck.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-31 16:24:07 -05:00
Theodore Ts'o 5dd2a6e08d Add E2FSCK_CONFIG environment variable
Also, use this environtment variable to make sure that a local
/etc/e2fsck.conf file will not interfere with the regression test
suite.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-31 16:21:00 -05:00
Theodore Ts'o d3c7c4eb98 Fix Really Ancient debian changelog lines so that Lintian doesn't complain. 2005-12-31 12:04:55 -05:00
Theodore Ts'o 7dc333dcbf Make sure debian/rules is executable.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-31 01:30:09 -05:00
Theodore Ts'o fd7ac1fc98 Fix incorrect location of prof_err.h in profile.c.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-31 01:28:33 -05:00
Theodore Ts'o 57435fe3df Update debian/changelog file.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-31 01:20:44 -05:00
Theodore Ts'o 49cdbb2550 Move the blkid and uuidgen programs out of library packages and into e2fsprogs
Move the blkid and uuidgen binaries out of libblkid1 and libuuid1 and
into the e2fsprogs package to support soname transitions and
simulaneous installs of multiarch flavors to coexist.  (It's not worth
creating two whole new packages for two separate binaries, so we just
fold them into e2fsprogs.)  (Closes: #330737, #330736)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-31 01:11:06 -05:00
Theodore Ts'o 1aa3d56ae7 Clarify chattr man page to make sure people realize limitations in the kernel
Add notes in chattr's man page to make sure the reader refers to the 
BUGS AND LIMITATIONS section so that even an idiot will be able to see
that some of these attributes are not yet implemented.  (Addresses 
Debian Bug: #312515)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-31 01:04:40 -05:00
Theodore Ts'o eb065ccf18 Add allow_cancellation config option
If the e2fsck configuration file sets the allow_cancellation option to be 
true, then if the filesystem does not have any known problems, and was 
known to be cleanly unmounted, then let e2fsck exit with a status code of 0 
instead of 32 (FSCK_CANCELED) so that the bootup scripts will continue 
without stopping the boot.  (Addresses Debian Bug: #150295)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-31 00:52:23 -05:00
Theodore Ts'o 1017f65179 Read in /etc/e2fsck.conf configuration file at startup
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-31 00:00:10 -05:00
Theodore Ts'o 2fa9ba9833 Add the profile library code to e2fsck
The profile library was originally written by Theodore Ts'o in 1995
for use in the MIT Kerberos v5 library.  It has been
modified/enhanced/bug-fixed over time by other members of the MIT
Kerberos team.  This version was originally taken from the Kerberos
v5 distribution, version 1.4.2, and radically simplified for use in
e2fsprogs.  (Support for locking for multi-threaded operations,
being able to modify and update the configuration file
programmatically, and Mac/Windows portability have been removed.
It has been folded into a single C source file to make it easier to
fold into an application program.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-30 23:57:32 -05:00
Theodore Ts'o 02ef196210 Avoid needlessly recompilation of library objection files
Fixing the problem of parallel builds sometimes not creating the library
subdirectories caused library object files to get constantly recompiled.
Fix this by remaping how the Makefile subdirectories decide to create
the subdirectories.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-29 22:45:29 -05:00
Theodore Ts'o 68963d5a26 Clean up gcc -Wall complaints in resize2fs
Remove unused variables in mark_table_blocks()

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-29 15:44:45 -05:00