summaryrefslogtreecommitdiff
path: root/debugfs
AgeCommit message (Collapse)AuthorFilesLines
2011-07-09debugfs: add a new debugfs command 'blocks'Theodore Ts'o4-0/+37
The blocks command prints out the blocks used by a particular inode, in a format which is useful for test suite automation. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-07-08misc: use EXT2_I_SIZE() consistently to get sizeAndreas Dilger3-16/+7
Use the EXT2_I_SIZE() macro consistently to access the inode size. The i_size/i_size_high combination is open coded in several places. Signed-off-by: Andreas Dilger <adilger@whamcloud.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-06-11ext2fs: Handle internal journal over 2^32 bytesAndreas Dilger1-0/+1
The write_journal_inode() code is only setting the low 32-bit i_size for the journal size, even though it is possible to specify a journal up to 10M blocks in size. Trying to create a journal larger than 2GB will succeed, but an immediate e2fsck would fail. Store i_size_high for the journal inode when creating it, and load it upon access. Use s_jnl_blocks[15] to store the journal i_size_high backup. This field is currently unused, as EXT2_N_BLOCKS is 15, so it is using s_jnl_blocks[0..14], and i_size is in s_jnl_blocks[16]. Rename the "size" argument "num_blocks" for the journal creation functions to clarify this parameter is in units of filesystem blocks and not bytes. Signed-off-by: Andreas Dilger <adilger@whamcloud.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-06-11debugfs: fix icheck finding blocks used for xattrsAndreas Dilger1-2/+4
This was an "uninitialized variable" warning, but it turns out to be a real bug. Without this change, it is not possible to use "icheck" to find blocks that are used for the i_file_acl (xattr) block. Signed-off-by: Andreas Dilger <adilger@whamcloud.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-06-11misc: clean up compiler warningsAndreas Dilger3-3/+5
Fix several types of compiler warnings (unused variables/labels), uninitialized variables, etc that are hit with gcc -Wall. Signed-off-by: Andreas Dilger <adilger@whamcloud.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-05-14debugfs: document htree-related commands in man pageEric Sandeen1-0/+21
The debugfs commands dirsearch, dx_hash, and htree_dump were never documented in the man page. Do so. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-05-14debugfs: remove unused htree_dump "-l" argumentEric Sandeen1-24/+1
The long_opt / -l argument was apparently never implemented, so remove it and associated argument parsing. This slightly changes the (undocumented) behavior because it no longer defaults to cwd if no filespec is specified... Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-03-18Merge branch 'maint' into nextTheodore Ts'o2-1/+2
Conflicts: lib/e2p/ls.c
2011-03-18e2fsprogs: man page typo fixesEric Sandeen1-1/+1
Fix a few typos in manpages. Reported-by: Branislav NĂ¡ter <bnater@redhat.com> Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-03-18add new superblock field: s_overhead_blocksTheodore Ts'o1-0/+1
It turns out that it's very hard to calculate overheads in the face of clustered allocation (bigalloc). This is because multiple metadata blocks from different block groups can end up in the same allocation cluster. Calculating the exact overhead requires O(all block bitmaps) in memory, or O(number of block groups**2) in time. So we will calculate this at mkfs time and stash it in the superblock. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-02-27Merge branch 'maint' into nextTheodore Ts'o1-2/+4
Conflicts: lib/ext2fs/initialize.c
2011-02-25Add basic BIGALLOC support for cluster-based allocationTheodore Ts'o1-2/+2
This adds the superblock fields needed so that dumpe2fs works and the code points and renames the superblock fields from describing fragments to clusters. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-02-25e2fsprogs: reserving code points for new ext4 quota featureAditya Kali1-0/+2
This patch adds support for detecting the new 'quota' feature in ext4. The patch reserves code points for usr and group quota inodes and also for the feature flag EXT4_FEATURE_RO_COMPAT_QUOTA. Signed-off-by: Aditya Kali <adityakali@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2010-09-24Merge branch 'maint' into nextTheodore Ts'o3-18/+29
Conflicts: configure configure.in lib/ext2fs/ext2fs.h misc/mke2fs.c
2010-09-24debugfs: Make the extents listing in the stat command more conciseTheodore Ts'o1-8/+5
Use "[u]" instead of "[uninit]" and limit the amount of detail printed for the extent tree blocks, so it is more similar to the format used for direct/indirect mapped inodes. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-09-24debugfs: Add the -D option to request Direct I/OTheodore Ts'o2-8/+21
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-09-19debugfs: Display the extent tree blocks in the stat command outputTheodore Ts'o1-3/+3
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-09-18tune2fs, debugfs, libext2fs: Add support for ext4 default mount optionsTheodore Ts'o1-0/+1
Add support for 2.6.35's new default mount options which can be specified in the superblock. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-07-22debugfs: Add new debugfs command punch (aka truncate)Theodore Ts'o4-0/+47
This uses the newly added ext2fs_punch() function. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-07-19Merge branch 'maint' into nextTheodore Ts'o1-0/+5
Conflicts: resize/extent.c
2010-06-24Add support for Next3 snapshot superblock fields to dumpe2fs and debugfsTheodore Ts'o1-0/+5
We also support for byte-swapping the Next3 fields, although the current Next3 implementation doesn't support big-endian systems. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-03-15Merge branch 'maint' into nextTheodore Ts'o1-1/+1
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-25Convert to use block group accessor functionsValerie Aurora Henson1-3/+10
Convert direct accesses to use the following block group accessor functions: ext2fs_block_bitmap_loc(), ext2fs_inode_bitmap_loc(), ext2fs_inode_table_loc(), ext2fs_bg_itable_unused(), ext2fs_block_bitmap_loc_set(), ext2fs_inode_bitmap_loc_set(), ext2fs_inode_table_loc_set(), ext2fs_bg_free_inodes_count(), ext2fs_ext2fs_bg_used_dirs_count(), ext2fs_bg_free_inodes_count_set(), ext2fs_bg_free_blocks_count_set(), ext2fs_bg_used_dirs_count_set() Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com> Signed-off-by: Nick Dokos <nicholas.dokos@hp.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-10-25libext2fs: Convert ext2fs_bg_flag_test() to ext2fs_bg_flags_test()Theodore Ts'o1-1/+1
After cleaning up ext2fs_bg_flag_set() and ext2fs_bg_flag_clear(), we're left with ext2fs_bg_flag_test(). Convert it to ext2fs_bg_flags_test(). Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-10-25debugfs: open file systems using EXT2_FLAG_64BITSEric Sandeen1-2/+2
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-10-04Merge branch 'maint' into nextTheodore Ts'o2-31/+42
Conflicts: configure configure.in misc/mke2fs.c
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-09-07debugfs: Convert to support 64-bit filesystemsValerie Aurora Henson9-116/+150
Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com> Signed-off-by: Nick Dokos <nicholas.dokos@hp.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-09-07Convert uses of super->s_*_blocks_count to ext2fs_*_blocks_count()Valerie Aurora Henson4-6/+6
Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com> Signed-off-by: Nick Dokos <nicholas.dokos@hp.com> Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-09-07Use accessor functions fields for bg_flags in the block group descriptorsTheodore Ts'o1-4/+4
Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com> Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-09-07Convert to use io_channel_read_blk64() and io_channel_write_blk64()Valerie Aurora Henson2-5/+5
Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-08-22debugfs: Move everything to new bitmap interfaceValerie Aurora Henson3-16/+16
Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-08-01Merge branch 'maint' into nextTheodore Ts'o3-2/+224
Conflicts: misc/Makefile.in
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-06-01Add missing free_blocks_hi field to debugfs table.Valerie Aurora Henson1-0/+1
Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com> 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>