aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorVlad Apostolov <vapo@sgi.com>2006-11-11 02:03:49 -0500
committerTim Shimmin <tes@sgi.com>2006-11-11 02:03:49 -0500
commit93c189c1148a5e39bcc8f62568f42a77f93477c5 (patch)
treee24d578c608b167bec1b18f625adc67772210b62 /fs
parent088406bcf66d6c7fd8a5c04c00aa410ae9077403 (diff)
[XFS] 956618: Linux crashes on boot with XFS-DMAPI filesystem when
CONFIG_XFS_TRACE is on SGI-PV: 956618 SGI-Modid: xfs-linux-melb:xfs-kern:27196a Signed-off-by: Vlad Apostolov <vapo@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/Makefile-linux-2.617
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.c4
-rw-r--r--fs/xfs/support/debug.c4
-rw-r--r--fs/xfs/xfs.h23
4 files changed, 27 insertions, 21 deletions
diff --git a/fs/xfs/Makefile-linux-2.6 b/fs/xfs/Makefile-linux-2.6
index 291948d5085a..b49989bb89ad 100644
--- a/fs/xfs/Makefile-linux-2.6
+++ b/fs/xfs/Makefile-linux-2.6
@@ -21,22 +21,7 @@ EXTRA_CFLAGS += -Ifs/xfs -Ifs/xfs/linux-2.6 -funsigned-char
21XFS_LINUX := linux-2.6 21XFS_LINUX := linux-2.6
22 22
23ifeq ($(CONFIG_XFS_DEBUG),y) 23ifeq ($(CONFIG_XFS_DEBUG),y)
24 EXTRA_CFLAGS += -g -DSTATIC="" -DDEBUG 24 EXTRA_CFLAGS += -g
25 EXTRA_CFLAGS += -DXFS_BUF_LOCK_TRACKING
26endif
27ifeq ($(CONFIG_XFS_TRACE),y)
28 EXTRA_CFLAGS += -DXFS_ALLOC_TRACE
29 EXTRA_CFLAGS += -DXFS_ATTR_TRACE
30 EXTRA_CFLAGS += -DXFS_BLI_TRACE
31 EXTRA_CFLAGS += -DXFS_BMAP_TRACE
32 EXTRA_CFLAGS += -DXFS_BMBT_TRACE
33 EXTRA_CFLAGS += -DXFS_DIR2_TRACE
34 EXTRA_CFLAGS += -DXFS_DQUOT_TRACE
35 EXTRA_CFLAGS += -DXFS_ILOCK_TRACE
36 EXTRA_CFLAGS += -DXFS_LOG_TRACE
37 EXTRA_CFLAGS += -DXFS_RW_TRACE
38 EXTRA_CFLAGS += -DXFS_BUF_TRACE
39 EXTRA_CFLAGS += -DXFS_VNODE_TRACE
40endif 25endif
41 26
42obj-$(CONFIG_XFS_FS) += xfs.o 27obj-$(CONFIG_XFS_FS) += xfs.o
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
index db5f5a3608ca..d3382843698e 100644
--- a/fs/xfs/linux-2.6/xfs_buf.c
+++ b/fs/xfs/linux-2.6/xfs_buf.c
@@ -15,6 +15,7 @@
15 * along with this program; if not, write the Free Software Foundation, 15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */ 17 */
18#include "xfs.h"
18#include <linux/stddef.h> 19#include <linux/stddef.h>
19#include <linux/errno.h> 20#include <linux/errno.h>
20#include <linux/slab.h> 21#include <linux/slab.h>
@@ -31,7 +32,6 @@
31#include <linux/kthread.h> 32#include <linux/kthread.h>
32#include <linux/migrate.h> 33#include <linux/migrate.h>
33#include <linux/backing-dev.h> 34#include <linux/backing-dev.h>
34#include "xfs_linux.h"
35 35
36STATIC kmem_zone_t *xfs_buf_zone; 36STATIC kmem_zone_t *xfs_buf_zone;
37STATIC kmem_shaker_t xfs_buf_shake; 37STATIC kmem_shaker_t xfs_buf_shake;
@@ -1406,7 +1406,7 @@ xfs_alloc_bufhash(
1406 btp->bt_hashshift = external ? 3 : 8; /* 8 or 256 buckets */ 1406 btp->bt_hashshift = external ? 3 : 8; /* 8 or 256 buckets */
1407 btp->bt_hashmask = (1 << btp->bt_hashshift) - 1; 1407 btp->bt_hashmask = (1 << btp->bt_hashshift) - 1;
1408 btp->bt_hash = kmem_zalloc((1 << btp->bt_hashshift) * 1408 btp->bt_hash = kmem_zalloc((1 << btp->bt_hashshift) *
1409 sizeof(xfs_bufhash_t), KM_SLEEP); 1409 sizeof(xfs_bufhash_t), KM_SLEEP | KM_LARGE);
1410 for (i = 0; i < (1 << btp->bt_hashshift); i++) { 1410 for (i = 0; i < (1 << btp->bt_hashshift); i++) {
1411 spin_lock_init(&btp->bt_hash[i].bh_lock); 1411 spin_lock_init(&btp->bt_hash[i].bh_lock);
1412 INIT_LIST_HEAD(&btp->bt_hash[i].bh_list); 1412 INIT_LIST_HEAD(&btp->bt_hash[i].bh_list);
diff --git a/fs/xfs/support/debug.c b/fs/xfs/support/debug.c
index c75f68361e33..4363512d2f90 100644
--- a/fs/xfs/support/debug.c
+++ b/fs/xfs/support/debug.c
@@ -15,11 +15,9 @@
15 * along with this program; if not, write the Free Software Foundation, 15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */ 17 */
18#include <xfs.h>
18#include "debug.h" 19#include "debug.h"
19#include "spin.h" 20#include "spin.h"
20#include <asm/page.h>
21#include <linux/sched.h>
22#include <linux/kernel.h>
23 21
24static char message[256]; /* keep it off the stack */ 22static char message[256]; /* keep it off the stack */
25static DEFINE_SPINLOCK(xfs_err_lock); 23static DEFINE_SPINLOCK(xfs_err_lock);
diff --git a/fs/xfs/xfs.h b/fs/xfs/xfs.h
index 1a48dbb902a7..bf0a12040b13 100644
--- a/fs/xfs/xfs.h
+++ b/fs/xfs/xfs.h
@@ -17,5 +17,28 @@
17 */ 17 */
18#ifndef __XFS_H__ 18#ifndef __XFS_H__
19#define __XFS_H__ 19#define __XFS_H__
20
21#ifdef CONFIG_XFS_DEBUG
22#define STATIC
23#define DEBUG 1
24#define XFS_BUF_LOCK_TRACKING 1
25/* #define QUOTADEBUG 1 */
26#endif
27
28#ifdef CONFIG_XFS_TRACE
29#define XFS_ALLOC_TRACE 1
30#define XFS_ATTR_TRACE 1
31#define XFS_BLI_TRACE 1
32#define XFS_BMAP_TRACE 1
33#define XFS_BMBT_TRACE 1
34#define XFS_DIR2_TRACE 1
35#define XFS_DQUOT_TRACE 1
36#define XFS_ILOCK_TRACE 1
37#define XFS_LOG_TRACE 1
38#define XFS_RW_TRACE 1
39#define XFS_BUF_TRACE 1
40#define XFS_VNODE_TRACE 1
41#endif
42
20#include <linux-2.6/xfs_linux.h> 43#include <linux-2.6/xfs_linux.h>
21#endif /* __XFS_H__ */ 44#endif /* __XFS_H__ */