aboutsummaryrefslogtreecommitdiffstats
path: root/debugfs/extent_inode.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix clang warnings on architectures with a 64-bit longTheodore Ts'o2021-02-111-4/+6
| | | | | | | | | | | | On most systems where we compile e2fsprogs, the u64 type is an unsigned long long. However, there are platforms (such as the PowerPC) where a long 64-bits and so u64 is typedef'ed to be unsigned long instead of a unsigned long long. Fix this by using explicit casts in printf statements. For scanf calls, we need to receive the value into a unsigned long long, and then assign it to a u64, after doing range checks. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* debugfs: print inode numbers as unsignedAndreas Dilger2020-02-291-2/+2
| | | | | | | | | | | Print inode numbers as unsigned values, to avoid printing negative numbers for inodes above 2B. Flags should be printed as hex instead of signed decimal values. Signed-off-by: Andreas Dilger <adilger@whamcloud.com> Lustre-bug-id: https://jira.whamcloud.com/browse/LU-13197 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Fix function declarations for ss commands to fix LTO warningsTheodore Ts'o2018-08-081-24/+48
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* debugfs: handle out of memory conditionTobias Stoeckmann2015-07-221-0/+5
| | | | | | | If malloc fails, properly handle the error condition. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* debugfs: restore and tweak original error messagingEric Whitney2013-12-301-10/+9
| | | | | | | | | | | | | | | | | | In response to reviewer comments, commit fe56188b07 included changes that modified some of the code used to output error messages when checking user-supplied block numbers. These changes converted calls to parse_ulonglong() to calls to strtoblk(). Because strtoblk() calls parse_ulonglong(), and both output error messages, two redundant and relatively generic messages were output on each error. Fix this by removing the error message output from strtoblk(), and extending it to accept an optional error message argument that it supplies in lieu of a default to parse_ulonglong(). Also, revert to the more descriptive original error messages with mods per reviewer comments, and fix an error message in do_replace_node(). Signed-off-by: Eric Whitney <enwlinux@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Clean up sparse warningsTheodore Ts'o2013-12-161-2/+2
| | | | | | | Mostly by adding static and removing excess extern qualifiers. Also convert a few remaining non-ANSI function declarations to ANSI. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* debugfs: handle 64bit block numbersDarrick J. Wong2013-12-121-13/+9
| | | | | | | | | debugfs should use strtoull wrappers for reading block numbers from the command line. "unsigned long" isn't wide enough to handle block numbers on 32bit platforms. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* debugfs: fix command failures for extent_inode commands that take argumentsTheodore Ts'o2013-03-131-3/+3
| | | | | | | | The extent_inode commands split_node, replace_node, and insert_node take arguments which resulted in confusing error messages after succeeding. Fix this. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* debugfs: fix gcc-wall complaintsTheodore Ts'o2013-01-141-22/+25
| | | | | | | | | | Fix the missing function prototypes from the recently added new debugfs commands, plus some signed vs unsigned comparison complaints. Also change the abbreviation of the block_dump command from "bp" to the more appropriate "bp". Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Fix gcc -Wall nitsTheodore Ts'o2013-01-011-9/+1
| | | | | | This fixes the last set of gcc -Wall complaints. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* debugfs: add the ability to manipulate the extent tree directlyTheodore Ts'o2012-12-241-0/+547
This commit adds the functionality which had previously only been in the tst_extents command to debugfs. The debugfs command extent_open will open extent tree of a particular inode, and enables a series of commands which will allow the user to interact with the extent tree directly. Once the extent tree is closed via extent_open(), these additional commands will be disabled again. This commit exports two new functions from lib/ext2fs/extent.c which had previously been statically defined: ext2fs_extent_node_split() and ext2fs_extent_goto2(). Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>