xfs
[Top] [All Lists]

Re: Announce: XFS split patches for 2.4.21

To: Federico Sevilla III <jijo@xxxxxxxxxxx>
Subject: Re: Announce: XFS split patches for 2.4.21
From: Keith Owens <kaos@xxxxxxx>
Date: Mon, 07 Jul 2003 16:27:54 +1000
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: Your message of "Mon, 07 Jul 2003 13:41:51 +0800." <20030707054151.GD5680@leathercollection.ph>
Sender: linux-xfs-bounce@xxxxxxxxxxx
On Mon, 7 Jul 2003 13:41:51 +0800, 
Federico Sevilla III <jijo@xxxxxxxxxxx> wrote:
>Does this mean that the only major difference between the respun split
>patches and the initial split patches plus the xfs_globals.c patch
>posted by Ethan Benson on 2003-06-28 09:23 UTC [1] is that you cleaned
>things up to prevent you from comitting the same mistake next time?

This is the diff from the split patches of 2003-06-23_01:45_UTC to
2003-07-07_02:01_UTC.  Besides the xfs changes, there are improvements
in kdb.  I suggest you upgrade.


 Documentation/filesystems/xfs.txt  |   77 +++++++++++++
 arch/i386/kdb/ChangeLog            |    7 +
 arch/i386/kdb/kdba_bt.c            |    2 
 arch/i386/kdb/kdbasupport.c        |  160 ++++++++++++++++++----------
 arch/i386/kernel/smp.c             |    9 +
 fs/xfs/linux/xfs_globals.c         |   15 ++
 fs/xfs/linux/xfs_linux.h           |   14 +-
 fs/xfs/linux/xfs_super.c           |    2 
 fs/xfs/linux/xfs_sysctl.c          |   58 +++++-----
 fs/xfs/linux/xfs_sysctl.h          |   27 ++--
 fs/xfs/linux/xfs_version.h         |    2 
 fs/xfs/pagebuf/page_buf.c          |   39 ++++--
 fs/xfs/pagebuf/page_buf_internal.h |   19 +--
 fs/xfs/xfs_rw.c                    |    9 -
 fs/xfs/xfs_vfsops.c                |    6 -
 kdb/ChangeLog                      |   11 +
 kdb/modules/Makefile               |    2 
 kdb/modules/kdbm_task.c            |  209 +++++++++++++++++++++++++++++++++++++
 kernel/sysctl.c                    |    4 


 19 files changed, 526 insertions(+), 146 deletions(-)
diff -urN 2.4.21-xfs-old/Documentation/filesystems/xfs.txt 
2.4.21-xfs-new/Documentation/filesystems/xfs.txt
--- 2.4.21-xfs-old/Documentation/filesystems/xfs.txt    Mon Jul  7 16:23:29 2003
+++ 2.4.21-xfs-new/Documentation/filesystems/xfs.txt    Mon Jul  7 16:23:11 2003
@@ -14,8 +14,8 @@
 with the IRIX version of XFS.
 
 
-Options
-=======
+Mount Options
+=============
 
 When mounting an XFS filesystem, the following options are accepted.
 
@@ -116,3 +116,76 @@
         Don't check for double mounted file systems using the file system uuid.
         This is useful to mount LVM snapshot volumes.
 
+sysctls
+=======
+
+The following sysctls are available for the XFS filesystem:
+
+  fs.xfs.stats_clear           (Min: 0  Default: 0  Max: 1)
+       Setting this to "1" clears accumulated XFS statistics 
+       in /proc/fs/xfs/stat.  It then immediately reset to "0".
+       
+  fs.xfs.sync_interval         (Min: HZ  Default: 30*HZ  Max: 60*HZ)
+       The interval at which the xfssyncd thread for xfs filesystems
+       flushes metadata out to disk. This thread will flush log
+       activity out, and do some processing on unlinked inodes
+
+  fs.xfs.error_level           (Min: 0  Default: 3  Max: 11)
+       A volume knob for error reporting when internal errors occur.
+       This will generate detailed messages & backtraces for filesystem
+       shutdowns, for example.  Current threshold values are:
+
+               XFS_ERRLEVEL_OFF:       0
+               XFS_ERRLEVEL_LOW:       1
+               XFS_ERRLEVEL_HIGH:      5
+
+  fs.xfs.panic_mask            (Min: 0  Default: 0  Max: 127)
+       Causes certain error conditions to call BUG(). Value is a bitmask; 
+       AND together the tags which represent errors which should cause panics:
+       
+               XFS_NO_PTAG                     0LL
+               XFS_PTAG_IFLUSH                 0x0000000000000001LL
+               XFS_PTAG_LOGRES                 0x0000000000000002LL
+               XFS_PTAG_AILDELETE              0x0000000000000004LL
+               XFS_PTAG_ERROR_REPORT           0x0000000000000008LL
+               XFS_PTAG_SHUTDOWN_CORRUPT       0x0000000000000010LL
+               XFS_PTAG_SHUTDOWN_IOERROR       0x0000000000000020LL
+               XFS_PTAG_SHUTDOWN_LOGERROR      0x0000000000000040LL
+
+       This option is intended for debugging only.             
+
+  fs.xfs.irix_symlink_mode     (Min: 0  Default: 0  Max: 1)
+       Controls whether symlinks are created with mode 0777 (default)
+       or whether their mode is affected by the umask (irix mode).
+
+  fs.xfs.irix_sgid_inherit     (Min: 0  Default: 0  Max: 1)
+       Controls files created in SGID directories.
+       If the group ID of the new file does not match the effective group
+       ID or one of the supplementary group IDs of the parent dir, the 
+       ISGID bit is cleared if the irix_sgid_inherit compatibility sysctl 
+       is set.
+
+  fs.xfs.restrict_chown                (Min: 0  Default: 1  Max: 1)
+       Controls whether unprivileged users can use chown to "give away"
+       a file to another user.
+
+  fs.xfs.refcache_size         (Min: 0  Default: 128  Max: 512)
+       Controls the size of the NFS refcache, which holds references
+       on files opened via NFS to improve performance.  The value
+       is the maximum number of files which can be in the cache at
+       any one time.
+
+  fs.xfs.refcache_purge                (Min: 0  Default: 32  Max: 512)
+       Controls the number of entries purged from the NFS refcache
+       every sync interval.
+
+  vm.pagebuf.stats_clear       (Min: 0  Default: 0  Max: 1)
+       Setting this to "1" clears accumulated pagebuf statistics 
+       in /proc/fs/pagebuf/stat.  It then immediately reset to "0".
+       
+  vm.pagebuf.flush_age         (Min: 1*HZ  Default: 15*HZ  Max: 300*HZ)
+       The age at which dirty metadata buffers are flushed to disk
+
+  vm.pagebuf.flush_int         (Min: HZ/2  Default: HZ  Max: 30*HZ)
+       The interval at which the list of dirty metadata buffers is
+       scanned.
diff -urN 2.4.21-xfs-old/arch/i386/kdb/ChangeLog 
2.4.21-xfs-new/arch/i386/kdb/ChangeLog
--- 2.4.21-xfs-old/arch/i386/kdb/ChangeLog      Mon Jul  7 16:23:29 2003
+++ 2.4.21-xfs-new/arch/i386/kdb/ChangeLog      Mon Jul  7 16:23:11 2003
@@ -1,3 +1,10 @@
+2003-07-01 Keith Owens  <kaos@xxxxxxx>
+
+       * Convert kdba_find_return() to two passes to reduce false positives.
+       * Correct jmp disp8 offset calculation for out of line lock code.
+       * Use NMI for kdb IPI in clustered APIC mode.  Sachin Sant, IBM.
+       * kdb v4.3-2.4.21-i386-3.
+
 2003-06-23 Keith Owens  <kaos@xxxxxxx>
 
        * Sync with XFS 2.4.21 tree.
diff -urN 2.4.21-xfs-old/arch/i386/kdb/kdba_bt.c 
2.4.21-xfs-new/arch/i386/kdb/kdba_bt.c
--- 2.4.21-xfs-old/arch/i386/kdb/kdba_bt.c      Mon Jul  7 16:23:29 2003
+++ 2.4.21-xfs-new/arch/i386/kdb/kdba_bt.c      Mon Jul  7 16:23:11 2003
@@ -268,7 +268,7 @@
                        kdb_di.fprintf_func = save_fprintf_func;
 
                        if (offsize) {
-                               realeip += 1 + offsize + offset;
+                               realeip += 1 + offsize + (offsize == 1 ? 
(s8)offset : (s32)offset);
                                if (kdbnearsym(realeip, &lock_symtab)) {
                                        /* Print the stext entry without args */
                                        bt_print_one(eip, NOBP, &ar, &symtab, 
0);
diff -urN 2.4.21-xfs-old/arch/i386/kdb/kdbasupport.c 
2.4.21-xfs-new/arch/i386/kdb/kdbasupport.c
--- 2.4.21-xfs-old/arch/i386/kdb/kdbasupport.c  Mon Jul  7 16:23:29 2003
+++ 2.4.21-xfs-new/arch/i386/kdb/kdbasupport.c  Mon Jul  7 16:23:11 2003
@@ -48,7 +48,7 @@
 #include <asm/uaccess.h>
 
 /*
- * kdba_find_return
+ * kdba_find_return_1
  *
  *     Given a starting point on the stack and symtab data for the
  *     current function, scan up the stack looking for a return
@@ -57,6 +57,7 @@
  *     sp      Starting stack pointer for scan
  *     ss      Start of stack for current process
  *     symtab  kallsyms symbol data for the function
+ *     assume  When false, do not apply tests that have to assume a branch is 
valid
  * Outputs:
  *     None.
  * Returns:
@@ -68,7 +69,7 @@
  */
 
 static kdb_machreg_t
-kdba_find_return(kdb_machreg_t sp, kdb_machreg_t ss, const kdb_symtab_t 
*symtab)
+kdba_find_return_1(kdb_machreg_t sp, kdb_machreg_t ss, const kdb_symtab_t 
*symtab, int assume)
 {
        kdb_machreg_t   ret;
        kdb_symtab_t    caller_symtab;
@@ -77,20 +78,6 @@
        unsigned char   code[7];
 #define retaddr(off) code[sizeof(code)+(off)]
 
-       if (KDB_DEBUG(ARA)) {
-               kdb_printf("  kdba_find_return: start\n");
-       }
-
-       if ((sp & -THREAD_SIZE) != ss) {
-               kdb_printf("    sp is in wrong stack 0x%lx 0x%lx 0x%lx\n", sp, 
ss, sp & -THREAD_SIZE);
-               return(0);
-       }
-
-       if ((sp & (THREAD_SIZE - 1)) < sizeof(struct task_struct)) {
-               kdb_printf("    sp is inside task_struct\n");
-               return(0);
-       }
-
        for (;ret = 0, sp & (THREAD_SIZE-1);sp += 4) {
                if (KDB_DEBUG(ARA)) {
                        kdb_printf("    sp=0x%lx", sp);
@@ -127,6 +114,52 @@
                        if (KDB_DEBUG(ARA)) {
                                kdb_printf(" failed");
                        }
+               } else if (retaddr(-5) == 0xe9) {
+                       /* jmp disp32.  I have been told that gcc may
+                        * do function tail optimization and replace
+                        * call with jmp.
+                        */
+                       if (KDB_DEBUG(ARA)) {
+                               kdb_printf(" jmp disp32\n");
+                       }
+                       if (ret + (s32) disp32 == symtab->sym_start) {
+                               if (KDB_DEBUG(ARA)) {
+                                       kdb_printf(" matched\n");
+                               }
+                               break;          /* jmp to this function */
+                       }
+                       if (KDB_DEBUG(ARA)) {
+                               kdb_printf(" failed");
+                       }
+               } else if (retaddr(-2) == 0xeb) {
+                       /* jmp disp8 */
+                       if (KDB_DEBUG(ARA)) {
+                               kdb_printf(" jmp disp8\n");
+                       }
+                       if (ret + (s8) disp8 == symtab->sym_start) {
+                               if (KDB_DEBUG(ARA)) {
+                                       kdb_printf(" matched\n");
+                               }
+                               break;          /* jmp to this function */
+                       }
+                       if (KDB_DEBUG(ARA)) {
+                               kdb_printf(" failed");
+                       }
+               } else if (strcmp(caller_symtab.sym_name, "ret_from_intr") == 0
+                          && ret == caller_symtab.sym_start) {
+                       /* ret_from_intr is pushed on stack for interrupts */
+                       if (KDB_DEBUG(ARA)) {
+                               kdb_printf(" ret_from_intr matched\n");
+                       }
+                       break;          /* special case, hand crafted frame */
+               } else if (!assume) {
+                       /* All following tests cannot validate the target 
address so they
+                        * must assume that the return address is valid.
+                        */
+                       if (KDB_DEBUG(ARA)) {
+                               kdb_printf("\n");
+                       }
+                       continue;
                } else if (retaddr(-7) == 0xff && retaddr(-6) == 0x14 && 
retaddr(-5) == 0x85) {
                        /* call *disp32(,%eax,4), used by syscall.
                         * Cannot calculate address, assume it is valid
@@ -139,7 +172,7 @@
                        if (strncmp(symtab->sym_name, "sys_", 4) == 0 ||
                            strncmp(symtab->sym_name, "old_", 4) == 0) {
                                if (KDB_DEBUG(ARA)) {
-                                       kdb_printf(" matched\n");
+                                       kdb_printf(" assume valid\n");
                                }
                                break;          /* probably call to this 
function */
                        }
@@ -171,44 +204,6 @@
                                kdb_printf(" call *disp32(%%reg), assume 
valid\n");
                        }
                        break;          /* hope it is a call to this function */
-               } else if (retaddr(-5) == 0xe9) {
-                       /* jmp disp32.  I have been told that gcc may
-                        * do function tail optimization and replace
-                        * call with jmp.
-                        */
-                       if (KDB_DEBUG(ARA)) {
-                               kdb_printf(" jmp disp32\n");
-                       }
-                       if (ret + (s32) disp32 == symtab->sym_start) {
-                               if (KDB_DEBUG(ARA)) {
-                                       kdb_printf(" matched\n");
-                               }
-                               break;          /* jmp to this function */
-                       }
-                       if (KDB_DEBUG(ARA)) {
-                               kdb_printf(" failed");
-                       }
-               } else if (retaddr(-2) == 0xeb) {
-                       /* jmp disp8 */
-                       if (KDB_DEBUG(ARA)) {
-                               kdb_printf(" jmp disp8\n");
-                       }
-                       if (ret + (s8) disp8 == symtab->sym_start) {
-                               if (KDB_DEBUG(ARA)) {
-                                       kdb_printf(" matched\n");
-                               }
-                               break;          /* jmp to this function */
-                       }
-                       if (KDB_DEBUG(ARA)) {
-                               kdb_printf(" failed");
-                       }
-               } else if (strcmp(caller_symtab.sym_name, "ret_from_intr") == 0
-                          && ret == caller_symtab.sym_start) {
-                       /* ret_from_intr is pushed on stack for interrupts */
-                       if (KDB_DEBUG(ARA)) {
-                               kdb_printf(" ret_from_intr matched\n");
-                       }
-                       break;          /* special case, hand crafted frame */
                }
                if (KDB_DEBUG(ARA)) {
                        kdb_printf("\n");
@@ -218,8 +213,59 @@
                kdb_printf("  end ret=0x%lx sp=0x%lx\n", ret, sp);
        }
        if (ret)
-               return(sp);
-       return(0);
+               return sp;
+       return 0;
+}
+
+/*
+ * kdba_find_return
+ *
+ *     Given a starting point on the stack and symtab data for the
+ *     current function, scan up the stack looking for a return
+ *     address for this function.
+ * Inputs:
+ *     sp      Starting stack pointer for scan
+ *     ss      Start of stack for current process
+ *     symtab  kallsyms symbol data for the function
+ * Outputs:
+ *     None.
+ * Returns:
+ *     Position on stack of return address, 0 if not found.
+ * Locking:
+ *     None.
+ * Remarks:
+ *     This is sensitive to the calling sequence generated by gcc.
+ */
+
+static kdb_machreg_t
+kdba_find_return(kdb_machreg_t sp, kdb_machreg_t ss, const kdb_symtab_t 
*symtab)
+{
+       kdb_machreg_t   ret;
+
+       if (KDB_DEBUG(ARA)) {
+               kdb_printf("  kdba_find_return: start\n");
+       }
+
+       if ((sp & -THREAD_SIZE) != ss) {
+               kdb_printf("    sp is in wrong stack 0x%lx 0x%lx 0x%lx\n", sp, 
ss, sp & -THREAD_SIZE);
+               return 0;
+       }
+
+       if ((sp & (THREAD_SIZE - 1)) < sizeof(struct task_struct)) {
+               kdb_printf("    sp is inside task_struct\n");
+               return 0;
+       }
+
+       if (KDB_DEBUG(ARA)) {
+               kdb_printf(" kdba_find_return_1(assume==0)\n");
+       }
+       if ((ret = kdba_find_return_1(sp, ss, symtab, 0)))
+               return ret;
+       if (KDB_DEBUG(ARA)) {
+               kdb_printf(" kdba_find_return_1(assume==1)\n");
+       }
+       ret = kdba_find_return_1(sp, ss, symtab, 1);
+       return ret;
 }
 
 /*
diff -urN 2.4.21-xfs-old/arch/i386/kernel/smp.c 
2.4.21-xfs-new/arch/i386/kernel/smp.c
--- 2.4.21-xfs-old/arch/i386/kernel/smp.c       Mon Jul  7 16:23:29 2003
+++ 2.4.21-xfs-new/arch/i386/kernel/smp.c       Mon Jul  7 16:23:11 2003
@@ -238,6 +238,15 @@
                         * program the ICR 
                         */
                        cfg = __prepare_ICR(0, vector);
+
+#ifdef CONFIG_KDB
+                       if (vector == KDB_VECTOR) {
+                               /*
+                                * Setup KDB IPI to be delivered as an NMI
+                                */
+                               cfg = (cfg&~APIC_VECTOR_MASK)|APIC_DM_NMI;
+                       }
+#endif /* CONFIG_KDB */
                        
                        /*
                         * Send the IPI. The write to APIC_ICR fires this off.
diff -urN 2.4.21-xfs-old/fs/xfs/linux/xfs_globals.c 
2.4.21-xfs-new/fs/xfs/linux/xfs_globals.c
--- 2.4.21-xfs-old/fs/xfs/linux/xfs_globals.c   Mon Jul  7 16:23:29 2003
+++ 2.4.21-xfs-new/fs/xfs/linux/xfs_globals.c   Mon Jul  7 16:23:12 2003
@@ -40,6 +40,7 @@
 #include "xfs_types.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_bit.h"
+#include "xfs_rw.h"
 
 /*
  * System memory size - used to scale certain data structures in XFS.
@@ -50,7 +51,19 @@
  * Tunable XFS parameters.  xfs_params is required even when CONFIG_SYSCTL=n,
  * other XFS code uses these values.
  */
-xfs_param_t xfs_params = { 128, 32, 0, 1, 0, 0, 3, 30 * HZ, 0 };
+
+xfs_param_t xfs_params = {
+                         /*    MIN     DFLT    MAX     */
+       .refcache_size  = {     0,      128,    XFS_REFCACHE_SIZE_MAX },
+       .refcache_purge = {     0,      32,     XFS_REFCACHE_SIZE_MAX },
+       .restrict_chown = {     0,      1,      1       },
+       .sgid_inherit   = {     0,      0,      1       },
+       .symlink_mode   = {     0,      0,      1       },
+       .panic_mask     = {     0,      0,      127     },
+       .error_level    = {     0,      3,      11      },
+       .sync_interval  = {     HZ,     30*HZ,  60*HZ   },
+       .stats_clear    = {     0,      0,      1       },
+};
 
 /*
  * Global system credential structure.
diff -urN 2.4.21-xfs-old/fs/xfs/linux/xfs_linux.h 
2.4.21-xfs-new/fs/xfs/linux/xfs_linux.h
--- 2.4.21-xfs-old/fs/xfs/linux/xfs_linux.h     Mon Jul  7 16:23:29 2003
+++ 2.4.21-xfs-new/fs/xfs/linux/xfs_linux.h     Mon Jul  7 16:23:12 2003
@@ -101,11 +101,15 @@
        bh->b_end_io = linvfs_unwritten_done;
 }
 
-#define restricted_chown       xfs_params.restrict_chown
-#define irix_sgid_inherit      xfs_params.sgid_inherit
-#define irix_symlink_mode      xfs_params.symlink_mode
-#define xfs_panic_mask         xfs_params.panic_mask
-#define xfs_error_level                xfs_params.error_level
+#define xfs_refcache_size      xfs_params.refcache_size.val
+#define xfs_refcache_purge_count xfs_params.refcache_purge.val
+#define restricted_chown       xfs_params.restrict_chown.val
+#define irix_sgid_inherit      xfs_params.sgid_inherit.val
+#define irix_symlink_mode      xfs_params.symlink_mode.val
+#define xfs_panic_mask         xfs_params.panic_mask.val
+#define xfs_error_level                xfs_params.error_level.val
+#define xfs_syncd_interval     xfs_params.sync_interval.val
+#define xfs_stats_clear                xfs_params.stats_clear.val
 
 #define NBPP           PAGE_SIZE
 #define DPPSHFT                (PAGE_SHIFT - 9)
diff -urN 2.4.21-xfs-old/fs/xfs/linux/xfs_super.c 
2.4.21-xfs-new/fs/xfs/linux/xfs_super.c
--- 2.4.21-xfs-old/fs/xfs/linux/xfs_super.c     Mon Jul  7 16:23:29 2003
+++ 2.4.21-xfs-new/fs/xfs/linux/xfs_super.c     Mon Jul  7 16:23:12 2003
@@ -440,7 +440,7 @@
 
        for (;;) {
                set_current_state(TASK_INTERRUPTIBLE);
-               schedule_timeout(xfs_params.sync_interval);
+               schedule_timeout(xfs_syncd_interval);
                if (vfsp->vfs_flag & VFS_UMOUNT)
                        break;
                if (vfsp->vfs_flag & VFS_RDONLY)
diff -urN 2.4.21-xfs-old/fs/xfs/linux/xfs_sysctl.c 
2.4.21-xfs-new/fs/xfs/linux/xfs_sysctl.c
--- 2.4.21-xfs-old/fs/xfs/linux/xfs_sysctl.c    Mon Jul  7 16:23:29 2003
+++ 2.4.21-xfs-new/fs/xfs/linux/xfs_sysctl.c    Mon Jul  7 16:23:12 2003
@@ -36,12 +36,6 @@
 #include <linux/proc_fs.h>
 
 
-STATIC ulong xfs_min[XFS_PARAM] = { \
-       0, 0, 0, 0, 0, 0, 0, HZ, 0 };
-STATIC ulong xfs_max[XFS_PARAM] = { \
-       XFS_REFCACHE_SIZE_MAX,  XFS_REFCACHE_SIZE_MAX,
-       1, 1, 1, 127, 11, HZ * 60, 1 };
-
 static struct ctl_table_header *xfs_table_header;
 
 
@@ -65,8 +59,8 @@
        if (!ret && write && xfs_refcache_new_size != xfs_refcache_old_size) {
                xfs_refcache_resize(xfs_refcache_new_size);
                /* Don't purge more than size of the cache */
-               if (xfs_refcache_new_size < xfs_params.refcache_purge)
-                       xfs_params.refcache_purge = xfs_refcache_new_size;
+               if (xfs_refcache_new_size < xfs_refcache_purge_count)
+                       xfs_refcache_purge_count = xfs_refcache_new_size;
        }
 
        return ret;
@@ -92,7 +86,7 @@
                vn_active = xfsstats.vn_active;
                memset(&xfsstats, 0, sizeof(xfsstats));
                xfsstats.vn_active = vn_active;
-               xfs_params.stats_clear = 0;
+               xfs_stats_clear = 0;
        }
 
        return ret;
@@ -100,43 +94,53 @@
 #endif /* CONFIG_PROC_FS */
 
 STATIC ctl_table xfs_table[] = {
-       {XFS_REFCACHE_SIZE, "refcache_size", &xfs_params.refcache_size,
+       {XFS_REFCACHE_SIZE, "refcache_size", &xfs_params.refcache_size.val,
        sizeof(ulong), 0644, NULL, &xfs_refcache_resize_proc_handler,
-       &sysctl_intvec, NULL, &xfs_min[0], &xfs_max[0]},
+       &sysctl_intvec, NULL, 
+       &xfs_params.refcache_size.min, &xfs_params.refcache_size.max},
 
-       {XFS_REFCACHE_PURGE, "refcache_purge", &xfs_params.refcache_purge,
+       /* Note, the max here is different, it is the current refcache size */
+       {XFS_REFCACHE_PURGE, "refcache_purge", &xfs_params.refcache_purge.val,
        sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax,
-       &sysctl_intvec, NULL, &xfs_min[1], &xfs_params.refcache_size},
+       &sysctl_intvec, NULL, 
+       &xfs_params.refcache_purge.min, &xfs_params.refcache_size.val},
 
-       {XFS_RESTRICT_CHOWN, "restrict_chown", &xfs_params.restrict_chown,
+       {XFS_RESTRICT_CHOWN, "restrict_chown", &xfs_params.restrict_chown.val,
        sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax,
-       &sysctl_intvec, NULL, &xfs_min[2], &xfs_max[2]},
+       &sysctl_intvec, NULL, 
+       &xfs_params.restrict_chown.min, &xfs_params.restrict_chown.max},
 
-       {XFS_SGID_INHERIT, "irix_sgid_inherit", &xfs_params.sgid_inherit,
+       {XFS_SGID_INHERIT, "irix_sgid_inherit", &xfs_params.sgid_inherit.val,
        sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax,
-       &sysctl_intvec, NULL, &xfs_min[3], &xfs_max[3]},
+       &sysctl_intvec, NULL, 
+       &xfs_params.sgid_inherit.min, &xfs_params.sgid_inherit.max},
 
-       {XFS_SYMLINK_MODE, "irix_symlink_mode", &xfs_params.symlink_mode,
+       {XFS_SYMLINK_MODE, "irix_symlink_mode", &xfs_params.symlink_mode.val,
        sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax,
-       &sysctl_intvec, NULL, &xfs_min[4], &xfs_max[4]},
+       &sysctl_intvec, NULL, 
+       &xfs_params.symlink_mode.min, &xfs_params.symlink_mode.max},
 
-       {XFS_PANIC_MASK, "panic_mask", &xfs_params.panic_mask,
+       {XFS_PANIC_MASK, "panic_mask", &xfs_params.panic_mask.val,
        sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax,
-       &sysctl_intvec, NULL, &xfs_min[5], &xfs_max[5]},
+       &sysctl_intvec, NULL, 
+       &xfs_params.panic_mask.min, &xfs_params.panic_mask.max},
 
-       {XFS_ERRLEVEL, "error_level", &xfs_params.error_level,
+       {XFS_ERRLEVEL, "error_level", &xfs_params.error_level.val,
        sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax,
-       &sysctl_intvec, NULL, &xfs_min[6], &xfs_max[6]},
+       &sysctl_intvec, NULL, 
+       &xfs_params.error_level.min, &xfs_params.error_level.max},
 
-       {XFS_SYNC_INTERVAL, "sync_interval", &xfs_params.sync_interval,
+       {XFS_SYNC_INTERVAL, "sync_interval", &xfs_params.sync_interval.val,
        sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax,
-       &sysctl_intvec, NULL, &xfs_min[7], &xfs_max[7]},
+       &sysctl_intvec, NULL, 
+       &xfs_params.sync_interval.min, &xfs_params.sync_interval.max},
 
        /* please keep this the last entry */
 #ifdef CONFIG_PROC_FS
-       {XFS_STATS_CLEAR, "stats_clear", &xfs_params.stats_clear,
+       {XFS_STATS_CLEAR, "stats_clear", &xfs_params.stats_clear.val,
        sizeof(ulong), 0644, NULL, &xfs_stats_clear_proc_handler,
-       &sysctl_intvec, NULL, &xfs_min[8], &xfs_max[8]},
+       &sysctl_intvec, NULL, 
+       &xfs_params.stats_clear.min, &xfs_params.stats_clear.max},
 #endif /* CONFIG_PROC_FS */
 
        {0}
diff -urN 2.4.21-xfs-old/fs/xfs/linux/xfs_sysctl.h 
2.4.21-xfs-new/fs/xfs/linux/xfs_sysctl.h
--- 2.4.21-xfs-old/fs/xfs/linux/xfs_sysctl.h    Mon Jul  7 16:23:29 2003
+++ 2.4.21-xfs-new/fs/xfs/linux/xfs_sysctl.h    Mon Jul  7 16:23:12 2003
@@ -39,19 +39,24 @@
  * Tunable xfs parameters
  */
 
-#define XFS_PARAM      (sizeof(struct xfs_param) / sizeof(ulong))
+typedef struct xfs_sysctl_val {
+       ulong min;
+       ulong val;
+       ulong max;
+} xfs_sysctl_val_t;
 
 typedef struct xfs_param {
-       ulong   refcache_size;  /* Size of NFS reference cache.          */
-       ulong   refcache_purge; /* # of entries to purge each time.      */
-       ulong   restrict_chown; /* Root/non-root can give away files.    */
-       ulong   sgid_inherit;   /* Inherit ISGID bit if process' GID is  */
-                               /*  not a member of the parent dir GID.  */
-       ulong   symlink_mode;   /* Symlink creat mode affected by umask. */
-       ulong   panic_mask;     /* bitmask to specify panics on errors.  */
-       ulong   error_level;    /* Degree of reporting for internal probs*/
-       ulong   sync_interval;  /* time between sync calls               */
-       ulong   stats_clear;    /* Reset all XFS statistics to zero.     */
+       xfs_sysctl_val_t refcache_size; /* Size of NFS reference cache.      */
+       xfs_sysctl_val_t refcache_purge;/* # of entries to purge each time.  */
+       xfs_sysctl_val_t restrict_chown;/* Root/non-root can give away files.*/
+       xfs_sysctl_val_t sgid_inherit;  /* Inherit ISGID bit if process' GID 
+                                        * is not a member of the parent dir
+                                        * GID */
+       xfs_sysctl_val_t symlink_mode;  /* Link creat mode affected by umask */
+       xfs_sysctl_val_t panic_mask;    /* bitmask to cause panic on errors. */
+       xfs_sysctl_val_t error_level;   /* Degree of reporting for problems  */
+       xfs_sysctl_val_t sync_interval; /* time between sync calls           */
+       xfs_sysctl_val_t stats_clear;   /* Reset all XFS statistics to zero. */
 } xfs_param_t;
 
 /*
diff -urN 2.4.21-xfs-old/fs/xfs/linux/xfs_version.h 
2.4.21-xfs-new/fs/xfs/linux/xfs_version.h
--- 2.4.21-xfs-old/fs/xfs/linux/xfs_version.h   Mon Jul  7 16:23:29 2003
+++ 2.4.21-xfs-new/fs/xfs/linux/xfs_version.h   Mon Jul  7 16:23:12 2003
@@ -39,6 +39,6 @@
 #ifndef __XFS_VERSION_H__
 #define __XFS_VERSION_H__
 
-#define XFS_VERSION_STRING "SGI XFS snapshot-2.4.21-2003-06-23_01:45_UTC"
+#define XFS_VERSION_STRING "SGI XFS snapshot-xfs-2.4.21-2003-07-07_02:01_UTC"
 
 #endif /* __XFS_VERSION_H__ */
diff -urN 2.4.21-xfs-old/fs/xfs/pagebuf/page_buf.c 
2.4.21-xfs-new/fs/xfs/pagebuf/page_buf.c
--- 2.4.21-xfs-old/fs/xfs/pagebuf/page_buf.c    Mon Jul  7 16:23:29 2003
+++ 2.4.21-xfs-new/fs/xfs/pagebuf/page_buf.c    Mon Jul  7 16:23:12 2003
@@ -121,7 +121,7 @@
        int             j;
        unsigned long   flags;
 
-       if (!pb_params.p_un.debug) return;
+       if (!pb_params.debug.val) return;
 
        if (ra == NULL) ra = (void *)__builtin_return_address(0);
 
@@ -177,10 +177,13 @@
  * /proc/sys/vm/pagebuf
  */
 
-unsigned long pagebuf_min[P_PARAM] = {  HZ/2,   1*HZ, 0, 0 };
-unsigned long pagebuf_max[P_PARAM] = { HZ*30, HZ*300, 1, 1 };
-
-pagebuf_param_t pb_params = {{ HZ, 15 * HZ, 0, 0 }};
+pagebuf_param_t pb_params = {
+                         /*    MIN     DFLT    MAX     */
+       .flush_interval = {     HZ/2,   HZ,     30*HZ   },
+       .age_buffer     = {     1*HZ,   15*HZ,  300*HZ  },
+       .stats_clear    = {     0,      0,      1       },
+       .debug          = {     0,      0,      1       },
+};
 
 /*
  * Pagebuf statistics variables
@@ -1885,7 +1888,7 @@
        }
 
        list_add_tail(&pb->pb_list, &pbd_delwrite_queue);
-       pb->pb_flushtime = jiffies + pb_params.p_un.age_buffer;
+       pb->pb_flushtime = jiffies + pb_params.age_buffer.val;
        spin_unlock(&pbd_delwrite_lock);
 
        if (unlock && (pb->pb_flags & _PBF_LOCKABLE)) {
@@ -2040,7 +2043,7 @@
        do {
                if (pbd_active == 1) {
                        mod_timer(&pb_daemon_timer,
-                                 jiffies + pb_params.p_un.flush_interval);
+                                 jiffies + pb_params.flush_interval.val);
                        interruptible_sleep_on(&pbd_waitq);
                }
 
@@ -2268,7 +2271,7 @@
        if (!ret && write && *valp) {
                printk("XFS Clearing pbstats\n");
                memset(&pbstats, 0, sizeof(pbstats));
-               pb_params.p_un.stats_clear = 0;
+               pb_params.stats_clear.val = 0;
        }
 
        return ret;
@@ -2277,22 +2280,26 @@
 STATIC struct ctl_table_header *pagebuf_table_header;
 
 STATIC ctl_table pagebuf_table[] = {
-       {PB_FLUSH_INT, "flush_int", &pb_params.data[0],
+       {PB_FLUSH_INT, "flush_int", &pb_params.flush_interval.val,
        sizeof(ulong), 0644, NULL, &proc_doulongvec_ms_jiffies_minmax,
-       &sysctl_intvec, NULL, &pagebuf_min[0], &pagebuf_max[0]},
+       &sysctl_intvec, NULL,
+       &pb_params.flush_interval.min, &pb_params.flush_interval.max},
 
-       {PB_FLUSH_AGE, "flush_age", &pb_params.data[1],
+       {PB_FLUSH_AGE, "flush_age", &pb_params.age_buffer.val,
        sizeof(ulong), 0644, NULL, &proc_doulongvec_ms_jiffies_minmax,
-       &sysctl_intvec, NULL, &pagebuf_min[1], &pagebuf_max[1]},
+       &sysctl_intvec, NULL, 
+       &pb_params.age_buffer.min, &pb_params.age_buffer.max},
 
-       {PB_STATS_CLEAR, "stats_clear", &pb_params.data[2],
+       {PB_STATS_CLEAR, "stats_clear", &pb_params.stats_clear.val,
        sizeof(ulong), 0644, NULL, &pb_stats_clear_handler,
-       &sysctl_intvec, NULL, &pagebuf_min[2], &pagebuf_max[2]},
+       &sysctl_intvec, NULL, 
+       &pb_params.stats_clear.min, &pb_params.stats_clear.max},
 
 #ifdef PAGEBUF_TRACE
-       {PB_DEBUG, "debug", &pb_params.data[3],
+       {PB_DEBUG, "debug", &pb_params.debug.val,
        sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax,
-       &sysctl_intvec, NULL, &pagebuf_min[3], &pagebuf_max[3]},
+       &sysctl_intvec, NULL, 
+       &pb_params.debug.min, &pb_params.debug.max},
 #endif
        {0}
 };
diff -urN 2.4.21-xfs-old/fs/xfs/pagebuf/page_buf_internal.h 
2.4.21-xfs-new/fs/xfs/pagebuf/page_buf_internal.h
--- 2.4.21-xfs-old/fs/xfs/pagebuf/page_buf_internal.h   Mon Jul  7 16:23:29 2003
+++ 2.4.21-xfs-new/fs/xfs/pagebuf/page_buf_internal.h   Mon Jul  7 16:23:12 2003
@@ -85,18 +85,19 @@
  * Tunable pagebuf parameters
  */
 
-#define P_PARAM        4
+typedef struct pb_sysctl_val {
+       ulong min;
+       ulong val;
+       ulong max;
+} pb_sysctl_val_t;
 
-typedef union pagebuf_param {
-       struct {
-               ulong   flush_interval; /* interval between runs of the
+typedef struct pagebuf_param {
+       pb_sysctl_val_t flush_interval; /* interval between runs of the
                                         * delwri flush daemon.  */
-               ulong   age_buffer;     /* time for buffer to age before
+       pb_sysctl_val_t age_buffer;     /* time for buffer to age before
                                         * we flush it.  */
-               ulong   stats_clear;    /* clear the pagebuf stats */
-               ulong   debug;          /* debug tracing on or off */
-       } p_un;
-       ulong data[P_PARAM];
+       pb_sysctl_val_t stats_clear;    /* clear the pagebuf stats */
+       pb_sysctl_val_t debug;          /* debug tracing on or off */
 } pagebuf_param_t;
 
 enum {
diff -urN 2.4.21-xfs-old/fs/xfs/xfs_rw.c 2.4.21-xfs-new/fs/xfs/xfs_rw.c
--- 2.4.21-xfs-old/fs/xfs/xfs_rw.c      Mon Jul  7 16:23:30 2003
+++ 2.4.21-xfs-new/fs/xfs/xfs_rw.c      Mon Jul  7 16:23:13 2003
@@ -408,7 +408,6 @@
 
 spinlock_t     xfs_refcache_lock = SPIN_LOCK_UNLOCKED;
 xfs_inode_t    **xfs_refcache;
-int            xfs_refcache_size;
 int            xfs_refcache_index;
 int            xfs_refcache_busy;
 int            xfs_refcache_count;
@@ -635,15 +634,13 @@
        xfs_inode_t     *ip;
        int             iplist_index;
        xfs_inode_t     **iplist;
-       int             purge_count;
 
        if ((xfs_refcache == NULL) || (xfs_refcache_count == 0)) {
                return;
        }
 
        iplist_index = 0;
-       purge_count = xfs_params.refcache_purge;
-       iplist = (xfs_inode_t **)kmem_zalloc(purge_count *
+       iplist = (xfs_inode_t **)kmem_zalloc(xfs_refcache_purge_count *
                                          sizeof(xfs_inode_t *), KM_SLEEP);
 
        spin_lock(&xfs_refcache_lock);
@@ -656,7 +653,7 @@
         * forward as we go so that we are sure to eventually clear
         * out the entire cache when the system goes idle.
         */
-       for (i = 0; i < purge_count; i++) {
+       for (i = 0; i < xfs_refcache_purge_count; i++) {
                ip = xfs_refcache[xfs_refcache_index];
                if (ip != NULL) {
                        xfs_refcache[xfs_refcache_index] = NULL;
@@ -682,7 +679,7 @@
                VN_RELE(XFS_ITOV(iplist[i]));
        }
 
-       kmem_free(iplist, purge_count *
+       kmem_free(iplist, xfs_refcache_purge_count *
                          sizeof(xfs_inode_t *));
 }
 
diff -urN 2.4.21-xfs-old/fs/xfs/xfs_vfsops.c 2.4.21-xfs-new/fs/xfs/xfs_vfsops.c
--- 2.4.21-xfs-old/fs/xfs/xfs_vfsops.c  Mon Jul  7 16:23:30 2003
+++ 2.4.21-xfs-new/fs/xfs/xfs_vfsops.c  Mon Jul  7 16:23:13 2003
@@ -96,10 +96,6 @@
 #endif /* DEBUG */
 #ifdef XFS_DABUF_DEBUG
        extern lock_t           xfs_dabuf_global_lock;
-#endif
-       extern int              xfs_refcache_size;
-
-#ifdef XFS_DABUF_DEBUG
        spinlock_init(&xfs_dabuf_global_lock, "xfsda");
 #endif
 
@@ -177,8 +173,6 @@
        xfs_init_procfs();
        xfs_sysctl_register();
 
-       xfs_refcache_size = xfs_params.refcache_size;
-
        /*
         * The inode hash table is created on a per mounted
         * file system bases.
diff -urN 2.4.21-xfs-old/kdb/ChangeLog 2.4.21-xfs-new/kdb/ChangeLog
--- 2.4.21-xfs-old/kdb/ChangeLog        Mon Jul  7 16:23:30 2003
+++ 2.4.21-xfs-new/kdb/ChangeLog        Mon Jul  7 16:23:13 2003
@@ -1,3 +1,14 @@
+2003-07-07 Keith Owens  <kaos@xxxxxxx>
+
+       * 2.4.21-ia64-030702 patches common code that affects kdb.  Workaround
+         this nuisance.
+       * kdb v4.3-2.4.21-common-4.
+
+2003-06-24 Keith Owens  <kaos@xxxxxxx>
+
+       * Add task and sigset commands.  Mark Goodwin, SGI.
+       * kdb v4.3-2.4.21-common-3.
+
 2003-06-23 Keith Owens  <kaos@xxxxxxx>
 
        * Sync with XFS 2.4.21 tree.
diff -urN 2.4.21-xfs-old/kdb/modules/Makefile 
2.4.21-xfs-new/kdb/modules/Makefile
--- 2.4.21-xfs-old/kdb/modules/Makefile Mon Jul  7 16:23:30 2003
+++ 2.4.21-xfs-new/kdb/modules/Makefile Mon Jul  7 16:23:13 2003
@@ -31,7 +31,7 @@
 #
 
 O_TARGET := vmlinux-obj.o
-obj-$(CONFIG_KDB_MODULES) += kdbm_vm.o kdbm_pg.o
+obj-$(CONFIG_KDB_MODULES) += kdbm_vm.o kdbm_pg.o kdbm_task.o
 CFLAGS_kdbm_vm.o       += -I $(TOPDIR)/drivers/scsi
 
 EXTRA_CFLAGS += -I $(TOPDIR)/arch/$(ARCH)/kdb
diff -urN 2.4.21-xfs-old/kdb/modules/kdbm_task.c 
2.4.21-xfs-new/kdb/modules/kdbm_task.c
--- 2.4.21-xfs-old/kdb/modules/kdbm_task.c      Thu Jan  1 10:00:00 1970
+++ 2.4.21-xfs-new/kdb/modules/kdbm_task.c      Mon Jul  7 16:23:13 2003
@@ -0,0 +1,209 @@
+/*
+ * Copyright (c) 2003 Silicon Graphics, Inc.  All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * Further, this software is distributed without any warranty that it is
+ * free of the rightful claim of any third person regarding infringement
+ * or the like.  Any license provided herein, whether implied or
+ * otherwise, applies only to this software file.  Patent licenses, if
+ * any, provided herein do not apply to combinations of this program with
+ * other software, or any other product whatsoever.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ *
+ * Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
+ * Mountain View, CA  94043, or:
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
+ * http://oss.sgi.com/projects/GenInfo/NoticeExplan
+ */
+
+#include <linux/blkdev.h>
+#include <linux/types.h>
+#include <linux/kdb.h>
+#include <linux/kdbprivate.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/mm.h>
+#include <linux/sched.h>
+#include <asm/signal.h>
+
+MODULE_AUTHOR("SGI");
+MODULE_DESCRIPTION("Debug struct task and sigset information");
+MODULE_LICENSE("GPL");
+
+#ifdef __KDB_HAVE_NEW_SCHEDULER
+static char *
+kdb_cpus_allowed_string(struct task_struct *tp)
+{
+#ifndef CPUMASK_WORDCOUNT
+       static char maskbuf[BITS_PER_LONG/4+8];
+       sprintf(maskbuf, "0x%0lx", tp->cpus_allowed);
+#else
+       int i, j;
+       static char maskbuf[CPUMASK_WORDCOUNT * BITS_PER_LONG / 4 + 8];
+
+       strcpy(maskbuf, "0x");
+       for (j=2, i=CPUMASK_WORDCOUNT-1; i >= 0; i--) {
+               j += sprintf(maskbuf + j, "%0lx", tp->cpus_allowed[i]);
+       }
+#endif /* CPUMASK_WORDCOUNT */
+
+       return maskbuf;
+}
+#endif /* __KDB_HAVE_NEW_SCHEDULER */
+
+static int
+kdbm_task(int argc, const char **argv, const char **envp, struct pt_regs *regs)
+{
+       unsigned long   addr;
+       long            offset=0;
+       int             nextarg;
+       int             e = 0;
+       struct task_struct *tp = NULL;
+       
+       if (argc != 1)
+               return KDB_ARGCOUNT;
+
+       nextarg = 1;
+       if ((e = kdbgetaddrarg(argc, argv, &nextarg, &addr, &offset, NULL, 
regs)) != 0)
+               return(e);
+
+       if (!(tp = kmalloc(sizeof(*tp), GFP_ATOMIC))) {
+           kdb_printf("%s: cannot kmalloc tp\n", __FUNCTION__);
+           goto out;
+       }
+       if ((e = kdb_getarea(*tp, addr))) {
+           kdb_printf("%s: invalid task address\n", __FUNCTION__);
+           goto out;
+       }
+
+       kdb_printf(
+           "struct task at 0x%p, pid=%d flags=0x%lx state=%ld comm=\"%s\"\n",
+           tp, tp->pid, tp->flags, tp->state, tp->comm);
+
+       kdb_printf("  cpu=%d policy=%lu ", kdb_process_cpu(tp), tp->policy);
+#ifdef __KDB_HAVE_NEW_SCHEDULER
+       kdb_printf(
+           "prio=%d static_prio=%d cpus_allowed=%s",
+           tp->prio, tp->static_prio, kdb_cpus_allowed_string(tp));
+#else
+       kdb_printf(
+           "cpus_runnable=%lx cpus_allowed=%lx",
+           tp->cpus_runnable, tp->cpus_allowed);
+#endif
+       kdb_printf(" &thread=0x%p\n", &tp->thread);
+
+       kdb_printf("  need_resched=%ld ", tp->need_resched);
+#ifdef __KDB_HAVE_NEW_SCHEDULER
+       kdb_printf(
+           "sleep_timestamp=%lu time_slice=%u",
+           tp->sleep_timestamp, tp->time_slice);
+#else
+       kdb_printf(
+           "counter=%ld nice=%ld",
+           tp->counter, tp->nice);
+#endif
+       kdb_printf(" lock_depth=%d\n", tp->lock_depth);
+
+       kdb_printf(
+           "  fs=0x%p files=0x%p mm=0x%p nr_local_pages=%u\n",
+           tp->fs, tp->files, tp->mm, tp->nr_local_pages);
+
+       kdb_printf(
+           "  uid=%d euid=%d suid=%d fsuid=%d gid=%d egid=%d sgid=%d 
fsgid=%d\n",
+           tp->uid, tp->euid, tp->suid, tp->fsuid, tp->gid, tp->egid, 
tp->sgid, tp->fsgid);
+
+       kdb_printf(
+           "  user=0x%p locks=%d semundo=0x%p semsleeping=0x%p\n",
+           tp->user, tp->locks, tp->semundo, tp->semsleeping);
+
+       kdb_printf(
+           "  sig=0x%p &blocked=0x%p &sigpending=0x%p\n",
+           tp->sig, &tp->blocked, &tp->sigpending);
+
+       kdb_printf(
+           "  times.utime=%ld times_stime=%ld times_cutime=%ld 
times_cstime=%ld\n",
+           tp->times.tms_utime, tp->times.tms_stime, tp->times.tms_cutime,
+           tp->times.tms_cstime);
+
+out:
+       if (tp)
+           kfree(tp);
+       return e;
+}
+
+static int
+kdbm_sigset(int argc, const char **argv, const char **envp, struct pt_regs 
*regs)
+{
+       sigset_t        *sp = NULL;
+       unsigned long   addr;
+       long            offset=0;
+       int             nextarg;
+       int             e = 0;
+       int             i;
+       char            fmt[32];
+       
+       if (argc != 1)
+               return KDB_ARGCOUNT;
+
+#ifndef _NSIG_WORDS
+        kdb_printf("unavailable on this platform, _NSIG_WORDS not defined.\n");
+#else
+       nextarg = 1;
+       if ((e = kdbgetaddrarg(argc, argv, &nextarg, &addr, &offset, NULL, 
regs)) != 0)
+               return(e);
+
+       if (!(sp = kmalloc(sizeof(*sp), GFP_ATOMIC))) {
+           kdb_printf("%s: cannot kmalloc sp\n", __FUNCTION__);
+           goto out;
+       }
+       if ((e = kdb_getarea(*sp, addr))) {
+           kdb_printf("%s: invalid sigset address\n", __FUNCTION__);
+           goto out;
+       }
+
+       sprintf(fmt, "[%%d]=0x%%0%dlx ", (int)sizeof(sp->sig[0])*2);
+       kdb_printf("sigset at 0x%p : ", sp);
+       for (i=_NSIG_WORDS-1; i >= 0; i--) {
+           if (i == 0 || sp->sig[i]) {
+               kdb_printf(fmt, i, sp->sig[i]);
+           }
+       }
+        kdb_printf("\n");
+#endif /* _NSIG_WORDS */
+
+out:
+       if (sp)
+           kfree(sp);
+       return e;
+}
+
+static int __init kdbm_task_init(void)
+{
+       kdb_register("task", kdbm_task, "<vaddr>", "Display task_struct", 0);
+       kdb_register("sigset", kdbm_sigset, "<vaddr>", "Display sigset_t", 0);
+       
+       return 0;
+}
+
+static void __exit kdbm_task_exit(void)
+{
+       kdb_unregister("task");
+       kdb_unregister("sigset");
+}
+
+kdb_module_init(kdbm_task_init)
+kdb_module_exit(kdbm_task_exit)
diff -urN 2.4.21-xfs-old/kernel/sysctl.c 2.4.21-xfs-new/kernel/sysctl.c
--- 2.4.21-xfs-old/kernel/sysctl.c      Mon Jul  7 16:23:30 2003
+++ 2.4.21-xfs-new/kernel/sysctl.c      Mon Jul  7 16:23:13 2003
@@ -28,11 +28,11 @@
 #include <linux/capability.h>
 #include <linux/smp_lock.h>
 #include <linux/init.h>
-#include <linux/sysrq.h>
-#include <linux/highuid.h>
 #ifdef CONFIG_KDB
 #include <linux/kdb.h>
 #endif /* CONFIG_KDB */
+#include <linux/sysrq.h>
+#include <linux/highuid.h>
 
 #include <asm/uaccess.h>
 


<Prev in Thread] Current Thread [Next in Thread>