X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Futils%2Fobdiolib.c;h=bec027828c75ff77f833da0da98d353236d59829;hp=19c5fbe859f5296aa240c8ee6e108cbce58d69e3;hb=f4547f0569774eb794fb143362e201f658415f4c;hpb=70e80ade90af09300396706b8910e196a7928520 diff --git a/lustre/utils/obdiolib.c b/lustre/utils/obdiolib.c index 19c5fbe..bec0278 100644 --- a/lustre/utils/obdiolib.c +++ b/lustre/utils/obdiolib.c @@ -1,6 +1,4 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * +/* * GPL HEADER START * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -16,8 +14,8 @@ * in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see [sun.com URL with a - * copy of GPLv2]. + * version 2 along with this program; If not, see + * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or @@ -26,7 +24,7 @@ * GPL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ /* @@ -152,6 +150,8 @@ obdio_pwrite (struct obdio_conn *conn, __u64 oid, conn->oc_data.ioc_obdo1.o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLMODE; + conn->oc_data.ioc_pbuf1 = (void*)1; + conn->oc_data.ioc_plen1 = 1; conn->oc_data.ioc_pbuf2 = buffer; conn->oc_data.ioc_plen2 = count; conn->oc_data.ioc_count = count; @@ -180,7 +180,7 @@ obdio_enqueue (struct obdio_conn *conn, __u64 oid, rc = obdio_ioctl (conn, ECHO_IOC_ENQUEUE); if (rc == 0) - memcpy (lh, obdo_handle (&conn->oc_data.ioc_obdo1), sizeof (*lh)); + *lh = conn->oc_data.ioc_obdo1.o_handle; return (rc); } @@ -190,7 +190,7 @@ obdio_cancel (struct obdio_conn *conn, struct lustre_handle *lh) { obdio_iocinit (conn); - memcpy (obdo_handle (&conn->oc_data.ioc_obdo1), lh, sizeof (*lh)); + conn->oc_data.ioc_obdo1.o_handle = *lh; conn->oc_data.ioc_obdo1.o_valid = OBD_MD_FLHANDLE; return (obdio_ioctl (conn, ECHO_IOC_CANCEL));