diff --git a/lustre/include/linux/obd_support.h b/lustre/include/linux/obd_support.h index 652e3727d860081eff1b0954a77c8f4d1862f988..0d519253f4b8386874e5067904598e370decce63 100644 --- a/lustre/include/linux/obd_support.h +++ b/lustre/include/linux/obd_support.h @@ -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) \ diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index 71e78e3f1ba1f545d1ed3024bcfbc6b5895eefa3..aa1d9e338a42db8a9b9d0ef767af32d83ec69c74 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -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) { diff --git a/lustre/mdc/mdc_reint.c b/lustre/mdc/mdc_reint.c index 9249d890646b4a22a71b21342c9f45e1816d47c0..181b8fa14c08aaac06a3581034d83c8ea1374342 100644 --- a/lustre/mdc/mdc_reint.c +++ b/lustre/mdc/mdc_reint.c @@ -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; } diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index 534ee5a02b917086301880f86ba3d2355d2c77c9..67ef83fc81db0b5ddb7411bb7d553b4d8bc03427 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -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) { diff --git a/lustre/obdclass/sysctl.c b/lustre/obdclass/sysctl.c index 1777298b23f7cd0728179a3ede5a2ba57f9f1aa7..48e1a017b4a2145a96192390f057cde2289b972c 100644 --- a/lustre/obdclass/sysctl.c +++ b/lustre/obdclass/sysctl.c @@ -1,4 +1,6 @@ -/* +/* -*- 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; } - - - - diff --git a/lustre/tests/llmount.sh b/lustre/tests/llmount.sh index 9d2adef4d0b2c6281f1a157168f1972d874d402e..ed089fb8fcbe27e501d382cdf5848d8c6c6fc2c0 100755 --- a/lustre/tests/llmount.sh +++ b/lustre/tests/llmount.sh @@ -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