summaryrefslogtreecommitdiff
path: root/debugfs
AgeCommit message (Collapse)AuthorFilesLines
2010-03-15debugfs: Correctly show the allocation status of a block using logdumpTheodore Ts'o1-1/+1
The offset in the bitmap was not getting correctly calculated when the user specifics a block to track using "logdump -b <block-num>" Addresses-Debian-Bug: #564084 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-10-04Don't use in-tree header files if using system uuid or blkid librariesTheodore Ts'o1-31/+40
This commit forces the use of the system-provided blkid or uuid header files if we are using the system-provided blkid or uuid libraries. This avoids using the in-tree header files with the system libraries. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-10-03debugfs: add matching fclosePeng Tao1-0/+2
If the cmd_file is not stdin, we should close the file handle via fclose(). Thanks David Binderman to point this out. Addresses-Novell-Bugzilla: #524526 Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-07-27debugfs: Add the new command dump_extents and extent the stat commandTheodore Ts'o3-2/+224
Extend the stat command to display more detailed extent information if the file uses extent mapping instead of displaying the block map using the block_iterate funtion. Add the command dump_extents which displays even more detailed information about an inode's extent tree. This commit is an extension of a patch from Curt Wohlgemuth. Signed-off-by: Curt Wohlgemuth <curtw@google.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-11debugfs: Fix miscellaneous gcc -Wall warningsTheodore Ts'o4-6/+7
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-02Add support for configure --enable-verbose-makecmdsTheodore Ts'o1-13/+13
Some people don't want to see the concise "kernel-style" make output. This configure option allows build engines that want to see the full set of commands executed by the makefile to get what they want. Most people will find this more distracting than useful, unless they need to debug the Makefiles. (It is not necessary to rerun configure to enable this verbose make output temprarily; if a developer wants to do a quick debug of a directory's makefile, he or she can simply edit the definition of the $(E) and $(Q) variables in the Makefile; instructions can be found in the MCONFIG file which is included in at the beginning of every Makefile.) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-01Fix Makefile dependencies for libcom_errTheodore Ts'o1-1/+2
The e2fsprogs makefiles were using the same Makefile variable LIBCOM_ERR for the link-line arguments as well as the dependencies. Since LIBCOM_ERR can now include non-file arguments such as "-lpthread", we need to use a separate DEPLIBCOM_ERR variable that only has build file dependencies. Do the same thing for STATIC_LIBCOM_ERR and PROFILED_LIBCOM_ERR. Addresses-Sourceforge-Patches: #2813809 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-29debugfs: don't try to fclose NULLEric Sandeen1-1/+1
do_logdump may jump to errout if fopen(out_file) fails, but in that case out_file is NULL, and fclose will segfault. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-06-21Fix encoding for rec_len in directories for >= 64k blocksize file systemsTheodore Ts'o1-6/+17
Previously e2fsprogs interpreted 0 for a rec_len of 65536 (which could occur if the directory block is completely empty in 64k blocksize filesystems), while the kernel interpreted 65535 to mean 65536. The kernel will accept both to mean 65536, and encodes 65535 to be 65536. This commit changes e2fsprogs to match. We add the encoding agreed upon for 128k and 256k filesystems, but we don't enable support for these larger block sizes, since they haven't been fully tested. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-15debugfs: Fix miscellaneous memory leaksTheodore Ts'o2-1/+4
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-05-30Update release notes, version string, etc. for E2fsprogs 1.41.6 releaseTheodore Ts'o1-1/+1
2009-05-30Update man pages to include ext4 in the synposis, instead of just "ext2/ext3"Theodore Ts'o1-3/+3
The e2fsprogs programs have historically just said that they operate on ext2 and ext3 file system in their man pages. Update them to say that they also operate on ext4 file systems. Addresses-Launchpad-bug: #381854 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-05-28debugfs: Add -a option to close_filesys commandTheodore Ts'o2-3/+27
Add an -a option to the close_filesys command which writes any changes to the superblock or block group descriptors to all of the backup superblock locations. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-04-22debugfs: Fix format string warnings in htree_dump_leaf_node()Theodore Ts'o1-2/+4
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-04-18debugfs: Teach the set_inode_fields_command how to set i_file_acl_highTheodore Ts'o1-0/+2
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-04-18debugfs: Print 64-bit file aclTheodore Ts'o1-2/+4
This is necessary so we can debug filesystem corruptions caused by the i_file_acl bogusly getting set. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-03-08debugfs: Fix typos in logdump's error messagesManish Katiyar1-2/+3
Below patch fixes some trivial typos found during code reading Signed-off-by : Manish Katiyar <mkatiyar@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-03-08remove useless if-before-free testsJim Meyering2-4/+2
In case you're wondering about whether this change is safe from a portability standpoint, fear not. This has been beaten to death in other forums. Here are a few threads: http://thread.gmane.org/gmane.comp.version-control.git/74187 http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/12712 http://thread.gmane.org/gmane.emacs.devel/98144 http://thread.gmane.org/gmane.comp.lib.glibc.alpha/13092 There has been debate about whether it's a good idea from a performance standpoint, too, but imho you'll have a hard time finding an instance where this sort of change induces a measurable performance penalty. If you do, please let me know. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-03-08debugfs: fix segfault on "stat" command with no open fsEric Sandeen1-3/+2
This is a regression from commit 8fdf29117f922419bd5b3f741e5d554b1d5b8893, which attempts to access current_fs via a feature check before we check that it's open. Just moving the feature check below the open check should fix it. Reported-by: Andrew Hecox <ahecox@redhat.com> Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-03-06Add support for a new superblock field: s_kbytes_writtenTheodore Ts'o1-0/+1
This field tracks the lifetime amount of writes to the filesystem. It will be updated by the kernel as well as by e2fsprogs programs which write to the filesystem. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-01-20Use format strings directly to prevent -Werror=format-security failuresTheodore Ts'o1-6/+5
Gcc is too stupid to realize that: const char *usage="String which has no percent signs"; com_err(progname, 0, usage); is OK. I refuse to bow to stupidity with: com_err(progname, 0, "%s", usage); but I will use the string directly for the sake of people who like to build with -Werror=format-security. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-01-18debugfs: Fix logdump command for 32-bit filesystemsTheodore Ts'o1-5/+10
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-10-20debugfs: Fix ncheck display so that extra characters aren't printedTheodore Ts'o1-1/+1
Fix a single-character typo in the printf format statement. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-10-12debugfs: Fix ncheck when printing pathnames for multiple hardlinks in a ↵Theodore Ts'o1-12/+11
directory Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-10-01debugfs: Make the usage messsage of logdump consistent with man pageManish Katiyar1-2/+2
Signed-off-by: Manish Katiyar <mkatiyar@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-10-01debugfs: Fix ncheck to print all pathnames for the inodesTheodore Ts'o1-37/+18
The ncheck command in debugfs had a bug where some inodes would not have their pathnames printed if other inodes had more than one hard link. Fix this bug and simplify the code by printing all of the pathnames for the requested inodes. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-09-10debugfs: Add the ability to specify the hash seed to the "hash" commandTheodore Ts'o1-3/+13
Also add the ability to specify the hash algorithm by name instead of by number. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-09-07Fix various spelling mistakes in various man pagesTheodore Ts'o1-3/+3
Thanks to A. Costa for pointing these out. Addresses-Debian-Bug: #498100 Addresses-Debian-Bug: #498101 Addresses-Debian-Bug: #498102 Addresses-Debian-Bug: #498103 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-09-05debugfs: Fix memory leak in do_ncheck()'s error pathManish Katiyar1-2/+2
Also the progname printed as "ncheck" instead of "do_ncheck" to be consistent with the other error messages in debugfs. Signed-off-by: "Manish Katiyar" <mkatiyar@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-27Remove trailing whitespace for the entire source treeTheodore Ts'o12-232/+232
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-27debugfs: Use extents when writing a file if the filesystem supports themTheodore Ts'o1-0/+3
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-25Add support for with empty directory blocks in 64k blocksize filesystemsTheodore Ts'o1-9/+13
The rec_len field in the directory entry is 16 bits, so if the filesystem is completely empty, rec_len of 0 is used to designate 65536, for the case where the directory entry takes the entire 64k block. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-24add debugfs command to print known featuresAndreas Dilger2-0/+69
Print out the currently supported features of e2fsprogs/libext2fs via a new "debugfs supported_features" command. This helps scripts to know whether it is possible to try and enable specific features in the filesystem. Signed-off-by: Kalpak Shah <kalpak.shah@sun.com> Signed-off-by: Andreas Dilger <adilger@sun.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-08-24debugfs: Print the progname instead of argv[0] in error messageManish Katiyar1-1/+1
Trivial fix to print the progname instead of argv[0] in error message. Signed-off-by: "Manish Katiyar" <mkatiyar@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-08-24debugfs: Close the file handle and return in case of errorsManish Katiyar1-0/+1
Close the filehandle and return in case if we are unable to expand the directory during write. Signed-off-by: "Manish Katiyar" <mkatiyar@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-08-08debugfs: Fix htree command so it works with extent-based directoriesTheodore Ts'o1-6/+15
Also add support to dump out the minor hash value in addition to the major hash. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-07-13Flush stdio buffers before calling setbuf()Theodore Ts'o1-0/+2
On Solaris setbuf() will discard any pending output to the stream, so make we call fflush() before calling setbuf(). Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-07-13Define _XOPEN_SOURCE to 600 consistently for Solaris C99 supportTheodore Ts'o1-1/+1
Solaris's header files are very picky about which C compiler can be used for SUSv3 conformance. Use of C99 is not compatible with SUSv2 (_XOPEN_SOURCE=500), and C89 is not compatible with SUSv3 (_XOPEN_SOURCE=600). Since we need some SUSv3 functions, consistently use SUSv3 so that e2fsprogs will build on Solaris using c99. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-06-17Merge branch 'maint'Theodore Ts'o1-3/+4
Conflicts: README resize/online.c version.h
2008-06-17Clarify the debugfs man page regarding the default superblockTheodore Ts'o1-3/+4
Addresses-Debian-Bug: #486463 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-06-07Fix dependency for $(LIBSS) when an explicit dlopen() library is neededTheodore Ts'o1-1/+1
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-05-15debugfs: Print the nanosecond field and i_version field of an inodeTheodore Ts'o1-10/+38
Add support for dumping out the new inode fields added in ext4 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-04-22Basic flexible block group supportTheodore Ts'o1-0/+1
Add superblock definition, and dumpe2fs and debugfs support. Signed-off-by: Jose R. Santos <jrs@us.ibm.com> Signed-off-by: Valerie Clement <valerie.clement@bull.net> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-04-17Fix tst_extents build when building w/o dynamic librariesTheodore Ts'o1-2/+1
$(LIBSS) should automatically include @DLOPEN_LIB@ so the right thing happens for programs that need to use the ss library. Reorder the library link order for tst_extents since the blkid library uses libuuid functions. Thanks to Eric Sandeen for pointing this problem out! Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-31debugfs: Add support for "set_block_group <bg_num> checksum calc"Andreas Dilger1-2/+16
Signed-off-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-30Merge branch 'maint'Theodore Ts'o1-0/+1
2008-03-21debugfs, tune2fs: Handle daylight savings time when parsing a time stringTheodore Ts'o1-0/+1
We need to set tm_isdst to -1 so that mktime will automatically determine whether or not daylight savings time (DST) is in effect. Previously tm_isdst was set to 0, which caused mktime to interpret the time as if it was always not using DST. Addresses-Debian-Bug: #471882 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-20Make debugfs uninit block group awareJose R. Santos1-3/+15
Signed-off-by: Jose R. Santos <jrs@us.ibm.com> Signed-off-by: Andreas Dilger <adilger@clusterfs.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-20Merge branch 'maint' into nextTheodore Ts'o1-0/+2
2008-03-20debugfs: Don't use a pager if stdout is not a ttyTheodore Ts'o1-0/+2
If we are redirecting the output of debugfs to a file or to another process via a pipe, there's no point sending the output to a pager. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>