From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pat LaVarre Subject: Re: favourite vfs globals Date: 28 Nov 2003 15:42:57 -0700 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <1070059377.2328.1.camel@patrh9> References: <1070053531.2340.40.camel@patrh9> <1070054568.2340.50.camel@patrh9> <1070055839.3518.6.camel@patrh9> <1070056276.3518.13.camel@patrh9> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: Received: from email-out1.iomega.com ([147.178.1.82]:24462 "EHLO email.iomega.com") by vger.kernel.org with ESMTP id S263513AbTK1Wn0 (ORCPT ); Fri, 28 Nov 2003 17:43:26 -0500 Received: from royntex01.iomegacorp.com (unknown [147.178.90.120]) by email.iomega.com (Postfix) with ESMTP id 43EFD2151 for ; Fri, 28 Nov 2003 15:43:26 -0700 (MST) To: linux-fsdevel@vger.kernel.org In-Reply-To: <1070056276.3518.13.camel@patrh9> List-Id: linux-fsdevel.vger.kernel.org > > > > Which vfs globals are the most fun, in lk like 2.6.0-test11? "That question I can't yet answer, but": > > > > ... we ... see the global variables of modules ... > > > ... when the modules share those variables with non-module code Success! Thanks again for the hints. (gdb) print /x udf_gdb $1 = 0xcafefacf (gdb) # (gdb) print udf_gdb_fstype $3 = (struct file_system_type *) 0xdf9639c0 (gdb) # (gdb) print *udf_gdb_fstype $4 = {name = 0xdf95fc65 "udf", fs_flags = 1, get_sb = 0xdf9592d4, kill_sb = 0xc0153d9c , owner = 0xdf963e80, next = 0x0, fs_supers = {next = 0xd5fa7d5c, prev = 0xd5fa7d5c}} (gdb) diff -Nur linux-2.6.0-test11/fs/udf/super.c linux/fs/udf/super.c --- linux-2.6.0-test11/fs/udf/super.c 2003-11-26 13:44:41.000000000 -0700 +++ linux/fs/udf/super.c 2003-11-28 15:23:55.000000000 -0700 @@ -189,10 +189,19 @@ struct nls_table *nls_map; }; +extern int udf_gdb; +extern struct file_system_type * udf_gdb_fstype; + static int __init init_udf_fs(void) { int err; printk(KERN_NOTICE "udf: registering filesystem\n"); + + printk(KERN_NOTICE "udf: before incrementing hello_gdb\n"); + udf_gdb_fstype = &udf_fstype; + ++udf_gdb; + printk(KERN_NOTICE "udf: after incrementing hello_gdb\n"); + err = init_inodecache(); if (err) goto out1; diff -Nur linux-2.6.0-test11/drivers/block/scsi_ioctl.c linux/drivers/block/scsi_ioctl.c diff -Nur linux-2.6.0-test11/drivers/block/ll_rw_blk.c linux/drivers/block/ll_rw_blk.c --- linux-2.6.0-test11/drivers/block/ll_rw_blk.c 2003-11-26 13:42:58.000000000 -0700 +++ linux/drivers/block/ll_rw_blk.c 2003-11-28 15:24:06.000000000 -0700 @@ -2445,6 +2445,11 @@ } } +int udf_gdb = 0xCAFEFACE; +struct file_system_type * udf_gdb_fstype; +EXPORT_SYMBOL(udf_gdb); +EXPORT_SYMBOL(udf_gdb_fstype); + static int __end_that_request_first(struct request *req, int uptodate, int nr_bytes) {