[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>
This commit is contained in:
parent
088406bcf6
commit
93c189c114
|
@ -21,22 +21,7 @@ EXTRA_CFLAGS += -Ifs/xfs -Ifs/xfs/linux-2.6 -funsigned-char
|
||||||
XFS_LINUX := linux-2.6
|
XFS_LINUX := linux-2.6
|
||||||
|
|
||||||
ifeq ($(CONFIG_XFS_DEBUG),y)
|
ifeq ($(CONFIG_XFS_DEBUG),y)
|
||||||
EXTRA_CFLAGS += -g -DSTATIC="" -DDEBUG
|
EXTRA_CFLAGS += -g
|
||||||
EXTRA_CFLAGS += -DXFS_BUF_LOCK_TRACKING
|
|
||||||
endif
|
|
||||||
ifeq ($(CONFIG_XFS_TRACE),y)
|
|
||||||
EXTRA_CFLAGS += -DXFS_ALLOC_TRACE
|
|
||||||
EXTRA_CFLAGS += -DXFS_ATTR_TRACE
|
|
||||||
EXTRA_CFLAGS += -DXFS_BLI_TRACE
|
|
||||||
EXTRA_CFLAGS += -DXFS_BMAP_TRACE
|
|
||||||
EXTRA_CFLAGS += -DXFS_BMBT_TRACE
|
|
||||||
EXTRA_CFLAGS += -DXFS_DIR2_TRACE
|
|
||||||
EXTRA_CFLAGS += -DXFS_DQUOT_TRACE
|
|
||||||
EXTRA_CFLAGS += -DXFS_ILOCK_TRACE
|
|
||||||
EXTRA_CFLAGS += -DXFS_LOG_TRACE
|
|
||||||
EXTRA_CFLAGS += -DXFS_RW_TRACE
|
|
||||||
EXTRA_CFLAGS += -DXFS_BUF_TRACE
|
|
||||||
EXTRA_CFLAGS += -DXFS_VNODE_TRACE
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
obj-$(CONFIG_XFS_FS) += xfs.o
|
obj-$(CONFIG_XFS_FS) += xfs.o
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
* along with this program; if not, write the Free Software Foundation,
|
* along with this program; if not, write the Free Software Foundation,
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
#include "xfs.h"
|
||||||
#include <linux/stddef.h>
|
#include <linux/stddef.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
@ -31,7 +32,6 @@
|
||||||
#include <linux/kthread.h>
|
#include <linux/kthread.h>
|
||||||
#include <linux/migrate.h>
|
#include <linux/migrate.h>
|
||||||
#include <linux/backing-dev.h>
|
#include <linux/backing-dev.h>
|
||||||
#include "xfs_linux.h"
|
|
||||||
|
|
||||||
STATIC kmem_zone_t *xfs_buf_zone;
|
STATIC kmem_zone_t *xfs_buf_zone;
|
||||||
STATIC kmem_shaker_t xfs_buf_shake;
|
STATIC kmem_shaker_t xfs_buf_shake;
|
||||||
|
@ -1406,7 +1406,7 @@ xfs_alloc_bufhash(
|
||||||
btp->bt_hashshift = external ? 3 : 8; /* 8 or 256 buckets */
|
btp->bt_hashshift = external ? 3 : 8; /* 8 or 256 buckets */
|
||||||
btp->bt_hashmask = (1 << btp->bt_hashshift) - 1;
|
btp->bt_hashmask = (1 << btp->bt_hashshift) - 1;
|
||||||
btp->bt_hash = kmem_zalloc((1 << btp->bt_hashshift) *
|
btp->bt_hash = kmem_zalloc((1 << btp->bt_hashshift) *
|
||||||
sizeof(xfs_bufhash_t), KM_SLEEP);
|
sizeof(xfs_bufhash_t), KM_SLEEP | KM_LARGE);
|
||||||
for (i = 0; i < (1 << btp->bt_hashshift); i++) {
|
for (i = 0; i < (1 << btp->bt_hashshift); i++) {
|
||||||
spin_lock_init(&btp->bt_hash[i].bh_lock);
|
spin_lock_init(&btp->bt_hash[i].bh_lock);
|
||||||
INIT_LIST_HEAD(&btp->bt_hash[i].bh_list);
|
INIT_LIST_HEAD(&btp->bt_hash[i].bh_list);
|
||||||
|
|
|
@ -15,11 +15,9 @@
|
||||||
* along with this program; if not, write the Free Software Foundation,
|
* along with this program; if not, write the Free Software Foundation,
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
#include <xfs.h>
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "spin.h"
|
#include "spin.h"
|
||||||
#include <asm/page.h>
|
|
||||||
#include <linux/sched.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
|
|
||||||
static char message[256]; /* keep it off the stack */
|
static char message[256]; /* keep it off the stack */
|
||||||
static DEFINE_SPINLOCK(xfs_err_lock);
|
static DEFINE_SPINLOCK(xfs_err_lock);
|
||||||
|
|
23
fs/xfs/xfs.h
23
fs/xfs/xfs.h
|
@ -17,5 +17,28 @@
|
||||||
*/
|
*/
|
||||||
#ifndef __XFS_H__
|
#ifndef __XFS_H__
|
||||||
#define __XFS_H__
|
#define __XFS_H__
|
||||||
|
|
||||||
|
#ifdef CONFIG_XFS_DEBUG
|
||||||
|
#define STATIC
|
||||||
|
#define DEBUG 1
|
||||||
|
#define XFS_BUF_LOCK_TRACKING 1
|
||||||
|
/* #define QUOTADEBUG 1 */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_XFS_TRACE
|
||||||
|
#define XFS_ALLOC_TRACE 1
|
||||||
|
#define XFS_ATTR_TRACE 1
|
||||||
|
#define XFS_BLI_TRACE 1
|
||||||
|
#define XFS_BMAP_TRACE 1
|
||||||
|
#define XFS_BMBT_TRACE 1
|
||||||
|
#define XFS_DIR2_TRACE 1
|
||||||
|
#define XFS_DQUOT_TRACE 1
|
||||||
|
#define XFS_ILOCK_TRACE 1
|
||||||
|
#define XFS_LOG_TRACE 1
|
||||||
|
#define XFS_RW_TRACE 1
|
||||||
|
#define XFS_BUF_TRACE 1
|
||||||
|
#define XFS_VNODE_TRACE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <linux-2.6/xfs_linux.h>
|
#include <linux-2.6/xfs_linux.h>
|
||||||
#endif /* __XFS_H__ */
|
#endif /* __XFS_H__ */
|
||||||
|
|
Loading…
Reference in New Issue