Skip to content
Snippets Groups Projects
Commit 6448914c authored by Phil Schwan's avatar Phil Schwan
Browse files

- brought lustre-debugging.lyx up to date

- removed unused obd_print_entry code
- fixed the llmount.sh debug level default
- minor debugging cleanups
- moved mdc_reint to where it's actually used
parent 582d260e
No related merge requests found
......@@ -13,7 +13,6 @@
/* global variables */
extern int obd_debug_level;
extern int obd_print_entry;
extern unsigned long obd_memory;
#define OBD_ALLOC(ptr, size) \
......
......@@ -281,9 +281,10 @@ static int ll_writepage(struct page *page)
return err;
}
/* SYNCHRONOUS I/O to object storage for an inode -- object attr will be updated too */
static int ll_commit_write(struct file *file, struct page *page,
unsigned from, unsigned to)
/* SYNCHRONOUS I/O to object storage for an inode -- object attr will be updated
* too */
static int ll_commit_write(struct file *file, struct page *page,
unsigned from, unsigned to)
{
int create = 1;
struct inode *inode = page->mapping->host;
......@@ -321,16 +322,14 @@ static int ll_commit_write(struct file *file, struct page *page,
err = ll_inode_setattr(inode, &iattr, 0);
if (err) {
CERROR("failed - %d.\n", err);
obdo_free(oa);
EXIT;
return -EIO;
err = -EIO;
}
}
obdo_free(oa);
EXIT;
return err;
} /* ll_brw */
} /* ll_commit_write */
void ll_truncate(struct inode *inode)
{
......
......@@ -25,32 +25,22 @@
#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/stat.h>
#include <linux/errno.h>
#include <linux/locks.h>
#include <linux/unistd.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/stat.h>
#include <asm/uaccess.h>
#include <asm/segment.h>
#include <linux/miscdevice.h>
#define DEBUG_SUBSYSTEM S_MDC
#include <linux/obd_support.h>
#include <linux/obd_class.h>
#include <linux/lustre_lib.h>
#include <linux/lustre_idl.h>
#include <linux/lustre_mds.h>
extern int mdc_reint(struct ptlrpc_client *peer, struct ptlrpc_request *request);
static int mdc_reint(struct ptlrpc_client *cl, struct ptlrpc_request *request)
{
int rc;
rc = ptlrpc_queue_wait(cl, request);
if (rc)
CERROR("error in handling %d\n", rc);
return rc;
}
int mdc_setattr(struct ptlrpc_client *peer,
struct inode *inode, struct iattr *iattr,
......@@ -60,9 +50,11 @@ int mdc_setattr(struct ptlrpc_client *peer,
struct mds_rec_setattr *rec;
ENTRY;
*request = ptlrpc_prep_req(peer, MDS_REINT, 0, NULL, sizeof(*rec), NULL);
*request = ptlrpc_prep_req(peer, MDS_REINT, 0, NULL,
sizeof(*rec), NULL);
if (!(*request)) {
CERROR("mdc request: cannot pack\n");
CERROR("cannot pack\n");
EXIT;
return -ENOMEM;
}
......@@ -92,7 +84,7 @@ int mdc_create(struct ptlrpc_client *peer,
sizeof(*rec) + size_round0(namelen) +
size_round0(tgtlen), NULL);
if (!(*request)) {
CERROR("mdc_create: cannot pack\n");
CERROR("cannot pack\n");
return -ENOMEM;
}
......@@ -119,7 +111,7 @@ int mdc_unlink(struct ptlrpc_client *peer,
(*request) = ptlrpc_prep_req(peer, MDS_REINT, 0, NULL,
sizeof(*rec) + size_round0(namelen), NULL);
if (!(*request)) {
CERROR("mdc_unlink: cannot pack\n");
CERROR("cannot pack\n");
return -ENOMEM;
}
......@@ -146,7 +138,7 @@ int mdc_link(struct ptlrpc_client *peer, struct dentry *src,
(*request) = ptlrpc_prep_req(peer, MDS_REINT, 0, NULL,
sizeof(*rec) + size_round0(namelen), NULL);
if (!(*request)) {
CERROR("mdc_link: cannot pack\n");
CERROR("cannot pack\n");
return -ENOMEM;
}
......@@ -174,7 +166,7 @@ int mdc_rename(struct ptlrpc_client *peer, struct inode *src,
sizeof(*rec) + size_round0(oldlen)
+ size_round0(newlen), NULL);
if (!(*request)) {
CERROR("mdc_link: cannot pack\n");
CERROR("cannot pack\n");
return -ENOMEM;
}
......
......@@ -210,18 +210,6 @@ int mdc_readpage(struct ptlrpc_client *cl, ino_t ino, int type, __u64 offset,
return rc;
}
int mdc_reint(struct ptlrpc_client *cl, struct ptlrpc_request *request)
{
int rc;
rc = ptlrpc_queue_wait(cl, request);
if (rc) {
CERROR("mdc request: error in handling %d\n", rc);
}
return rc;
}
static int request_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
......
/*
/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
* vim:expandtab:shiftwidth=8:tabstop=8:
*
* Copyright (C) 2001 Cluster File Systems, Inc.
*
* This code is issued under the GNU General Public License.
......@@ -49,7 +51,6 @@ static int obd_sctl_reset( ctl_table * table, int write, struct file
static ctl_table obd_table[] = {
{OBD_DEBUG, "debug", &obd_debug_level, sizeof(int), 0644, NULL, &proc_dointvec},
{OBD_ENTRY, "trace", &obd_print_entry, sizeof(int), 0644, NULL, &proc_dointvec},
{OBD_VARS, "vars", &vars[0], sizeof(int), 0644, NULL, &proc_dointvec},
{OBD_INDEX, "index", &index, sizeof(int), 0644, NULL, &obd_sctl_vars},
{OBD_RESET, "reset", NULL, 0, 0644, NULL, &obd_sctl_reset},
......@@ -112,7 +113,3 @@ int obd_sctl_vars (ctl_table * table, int write,
return rc;
}
......@@ -17,12 +17,12 @@ EOF
new_fs ext2 /tmp/ost 10000
OST=$LOOPDEV
MDSFS=ext2
new_fs ${MDSFS} /tmp/mds 10000
MDS=$LOOPDEV
echo 8291 > /proc/sys/obd/debug
mknod /dev/obd c 10 241
echo 0xffffffff > /proc/sys/portals/debug
$R/usr/src/obd/utils/obdctl <<EOF
device 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment