A possible "dev -d" fix for newer kernels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




I noticed that on newer kernels, the "dev -d" command is failing.
Seems like the 'rq' field in the request_queue structure is now
called 'root_rl'.

The little change in the patch below seems to fix this problem,
at least for me on i686 & x86_64. (I was using crash 6.1.4.)


crash> dev -d
MAJOR GENDISK            NAME       REQUEST QUEUE      TOTAL ASYNC  SYNC   DRV

dev: invalid structure member offset: request_queue_rq
     FILE: dev.c  LINE: 3807  FUNCTION: get_diskio_1()

[/sbin/crash] error trace: 45dd17 => 4d6432 => 4d5eba => 4ff0fd

  4ff0fd: OFFSET_verify+189
  4d5eba: get_diskio_1+58
  4d6432: display_all_diskio+1090
  45dd17: exec_command+919

dev: invalid structure member offset: request_queue_rq
     FILE: dev.c  LINE: 3807  FUNCTION: get_diskio_1()


Index: b/dev.c
===================================================================
--- a/dev.c
+++ b/dev.c
@@ -4051,6 +4051,9 @@ void diskio_init(void)
 	MEMBER_OFFSET_INIT(request_queue_in_flight, "request_queue",
 		"in_flight");
 	MEMBER_OFFSET_INIT(request_queue_rq, "request_queue", "rq");
+	if (INVALID_MEMBER(request_queue_rq))
+		MEMBER_OFFSET_INIT(request_queue_rq,
+						"request_queue", "root_rl");
 	MEMBER_OFFSET_INIT(subsys_private_klist_devices, "subsys_private",
 		"klist_devices");
 	MEMBER_OFFSET_INIT(subsystem_kset, "subsystem", "kset");

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux