Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 160362 Details for
Bug 250336
RFE: add the ability to get a lockdump out of gfs through sysrq
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch that implements this functionality.
gfs-sysrq-glock-dump.patch (text/plain), 2.12 KB, created by
Josef Bacik
on 2007-07-31 21:27:38 UTC
(
hide
)
Description:
patch that implements this functionality.
Filename:
MIME Type:
Creator:
Josef Bacik
Created:
2007-07-31 21:27:38 UTC
Size:
2.12 KB
patch
obsolete
>--- gfs-kernel-2.6.9-72/src/gfs/proc.c.josef 2007-07-31 15:44:11.000000000 -0400 >+++ gfs-kernel-2.6.9-72/src/gfs/proc.c 2007-07-31 16:59:52.000000000 -0400 >@@ -21,6 +21,7 @@ > #include <linux/proc_fs.h> > #include <linux/module.h> > #include <asm/uaccess.h> >+#include <linux/sysrq.h> > > #include "gfs.h" > #include "glock.h" >@@ -342,6 +343,23 @@ do_lockdump(char *p, char *buf, size_t s > return error; > } > >+static void dump_all_glocks() >+{ >+ struct list_head *tmp; >+ struct gfs_sbd *sdp; >+ >+ down(&gfs_fs_lock); >+ >+ for (tmp = gfs_fs_list.next; tmp != &gfs_fs_list; tmp = tmp->next) { >+ sdp = list_entry(tmp, struct gfs_sbd, sd_list); >+ printk(KERN_ERR "Dumping glocks for fsid=%s\n", >+ sdp->sd_fsname); >+ gfs_dump_lockstate(sdp, NULL); >+ } >+ >+ up(&gfs_fs_lock); >+} >+ > /** > * gfs_proc_write - take a command from userspace > * @file: >@@ -459,6 +477,22 @@ static struct file_operations gfs_proc_f > }; > > /** >+ * This is stuff for getting glock dumps through sysrq, very nasty stuff >+ */ >+static void sysrq_handle_glock(int key, struct pt_regs *pt_regs, >+ struct tty_struct *tty) >+{ >+ dump_all_glocks(); >+} >+ >+static struct sysrq_key_op sysrq_glock_op = >+{ >+ .handler = sysrq_handle_glock, >+ .help_msg = "Glock", >+ .action_msg = "Dumping glocks\n", >+}; >+ >+/** > * gfs_proc_init - initialize GFS' proc interface > * > */ >@@ -474,6 +508,8 @@ gfs_proc_init(void) > spin_lock_init(&gfs_proc_margs_lock); > spin_lock_init(&req_lock); > >+ __sysrq_put_key_op('g', &sysrq_glock_op); >+ > pde = create_proc_entry("fs/gfs", S_IFREG | 0600, NULL); > if (pde) { > pde->owner = THIS_MODULE; >--- gfs-kernel-2.6.9-72/src/gfs/glock.c.josef 2007-07-31 16:55:38.000000000 -0400 >+++ gfs-kernel-2.6.9-72/src/gfs/glock.c 2007-07-31 16:57:15.000000000 -0400 >@@ -19,6 +19,7 @@ > #include <linux/completion.h> > #include <linux/buffer_head.h> > #include <asm/uaccess.h> >+#include <linux/nmi.h> > > #include "gfs.h" > #include "dio.h" >@@ -2973,6 +2974,10 @@ gfs_dump_lockstate(struct gfs_sbd *sdp, > continue; > > error = dump_glock(gl, buf, size, &count); >+ >+ /* we are dumping to the console, tickle nmi */ >+ if (!ub) >+ touch_nmi_watchdog(); > if (error) > break; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 250336
: 160362