]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
debugfs: Use the hash_version from superblock if a file system is opened
authorSrivathsa Dara <srivathsa.d.dara@oracle.com>
Thu, 24 Aug 2023 06:56:34 +0000 (06:56 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 3 Dec 2023 02:17:55 +0000 (21:17 -0500)
commit29d83fef9e6eab139516afe433c03d975e85c25b
tree00eb8bb36c6f6978e6e01aeb52a407163a7dfe59
parent569074c65d7b3a2022e53f0d6abd405dbe5320a3
debugfs: Use the hash_version from superblock if a file system is opened

The debugfs program's dx_hash command computes the hash for the given
filename, taking the hash_seed and hash_version (i.e hash algorithm)
as arguments.  So the user has to refer to the superblock to get these
values used by the filesystem.  So if debugfs has an opened file
system, use those values from the current file system.

[ Fixed patch to avoid crashing when a file system is not opened. --TYT ]

Signed-off-by: Srivathsa Dara <srivathsa.d.dara@oracle.com>
Link: https://lore.kernel.org/r/20230824065634.2662858-1-srivathsa.d.dara@oracle.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/htree.c