Messages in this thread Patch in this message |  | | Date | Mon, 26 Nov 2001 17:18:37 -0700 | From | Andreas Dilger <> | Subject | Re: ext3: kjournald and spun-down disks |
| |
On Nov 26, 2001 15:40 -0800, Andrew Morton wrote: > Daniel Kobras wrote: > > Is there a way to tell which kjournald process is associated to which > > partition? A fake cmdline, or an fd to the partition's device node that > > shows up in /proc/<pid>/fd would indeed be quite helpful. > > Andreas has a patch which puts the device major/minor into kjournald's > process name.
It is in CVS HEAD, but appears not to be in the branches. It is below. This should not have a problem with the 16-byte command length, because kdevname() only returns strings of the form mm:nn, so my system has:
root 8 1 0 08:58 ? 00:00:11 [kjournald-03:07] root 39 1 0 08:58 ? 00:00:00 [kjournald-03:05] root 40 1 0 08:58 ? 00:00:00 [kjournald-03:09] root 41 1 0 08:58 ? 00:00:00 [kjournald-03:0a] root 1219 1 0 09:23 ? 00:00:02 [kjournald-3a:01]
Which are all within 16 bytes (including NUL), until we get larger major/minor numbers.
Cheers, Andreas =========================================================================== diff -u -u -r1.11.2.2 -r1.52 --- fs/jbd/journal.c 2001/11/11 05:11:06 1.11.2.2 +++ fs/jbd/journal.c 2001/11/27 00:10:39 1.52 @@ -210,7 +176,7 @@ recalc_sigpending(current); spin_unlock_irq(¤t->sigmask_lock); - sprintf(current->comm, "kjournald"); + sprintf(current->comm, "kjournald-%s", kdevname(journal->j_dev)); /* Set up an interval timer which can be used to trigger a commit wakeup after the commit interval expires */ -- Andreas Dilger http://sourceforge.net/projects/ext2resize/ http://www-mddsp.enel.ucalgary.ca/People/adilger/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |