cluster: RHEL6 - gfs2_edit: display pointer offsets for directory dinodes

Bob Peterson rpeterso at fedoraproject.org
Wed Jul 24 15:56:10 UTC 2013


Gitweb:        http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=d5dda8f8cda9fb1b32ec17dc1fcd3b196073e8aa
Commit:        d5dda8f8cda9fb1b32ec17dc1fcd3b196073e8aa
Parent:        06e931e14d958ca0b38c202ad09b6e6f4943a5df
Author:        Bob Peterson <rpeterso at redhat.com>
AuthorDate:    Fri Feb 1 14:54:34 2013 -0700
Committer:     Bob Peterson <rpeterso at redhat.com>
CommitterDate: Wed Jul 24 10:40:15 2013 -0500

gfs2_edit: display pointer offsets for directory dinodes

This patch prints "pointer X" on the hex display for directory
dinodes like it does for indirect blocks.
---
 gfs2/edit/hexedit.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c
index cd3ed63..9b9a599 100644
--- a/gfs2/edit/hexedit.c
+++ b/gfs2/edit/hexedit.c
@@ -1416,7 +1416,8 @@ static int hexdump(uint64_t startaddr, int len)
 		if (cursor_line) {
 			if (block_type == GFS2_METATYPE_IN ||
 			    ((block_type == GFS2_METATYPE_DI) &&
-			     ((struct gfs2_dinode*)bh->b_data)->di_height)) {
+			     ((struct gfs2_dinode*)bh->b_data)->di_height) ||
+			     S_ISDIR(di.di_mode)) {
 				int ptroffset = edit_row[dmode] * 16 +
 					edit_col[dmode];
 


More information about the cluster-commits mailing list