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;
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)
{
#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,
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;
}
sizeof(*rec) + size_round0(namelen) +
size_round0(tgtlen), NULL);
if (!(*request)) {
- CERROR("mdc_create: cannot pack\n");
+ CERROR("cannot pack\n");
return -ENOMEM;
}
(*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;
}
(*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;
}
sizeof(*rec) + size_round0(oldlen)
+ size_round0(newlen), NULL);
if (!(*request)) {
- CERROR("mdc_link: cannot pack\n");
+ CERROR("cannot pack\n");
return -ENOMEM;
}
-/*
+/* -*- 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.
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},
return rc;
}
-
-
-
-