X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fmdd%2Fmdd_trans.c;h=96d7c88e2bb0d42403e4e7b248bcbdd3b70edc06;hb=f9ced98580ddf3e4d7e5c989448aff307049bdb3;hp=3adbea33f723f5d273255c6841d6e082deb81ef4;hpb=65701b4a30efdb695776bcf690a2b3cabc928da1;p=fs%2Flustre-release.git diff --git a/lustre/mdd/mdd_trans.c b/lustre/mdd/mdd_trans.c index 3adbea3..96d7c88 100644 --- a/lustre/mdd/mdd_trans.c +++ b/lustre/mdd/mdd_trans.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. @@ -29,7 +27,7 @@ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2011, 2012, Whamcloud, Inc. + * Copyright (c) 2011, 2012, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -42,43 +40,14 @@ * Author: Wang Di */ -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif #define DEBUG_SUBSYSTEM S_MDS -#include -#ifdef HAVE_EXT4_LDISKFS -#include -#else -#include -#endif -#include #include -#include -#include #include - -#ifdef HAVE_EXT4_LDISKFS -#include -#else -#include -#endif #include -#include #include "mdd_internal.h" -int mdd_txn_stop_cb(const struct lu_env *env, struct thandle *txn, - void *cookie) -{ - struct mdd_device *mdd = cookie; - struct obd_device *obd = mdd2obd_dev(mdd); - - LASSERT(obd); - return mds_lov_write_objids(obd); -} - struct thandle *mdd_trans_create(const struct lu_env *env, struct mdd_device *mdd) { @@ -91,9 +60,9 @@ int mdd_trans_start(const struct lu_env *env, struct mdd_device *mdd, return mdd_child_ops(mdd)->dt_trans_start(env, mdd->mdd_child, th); } -void mdd_trans_stop(const struct lu_env *env, struct mdd_device *mdd, - int result, struct thandle *handle) +int mdd_trans_stop(const struct lu_env *env, struct mdd_device *mdd, + int result, struct thandle *handle) { - handle->th_result = result; - mdd_child_ops(mdd)->dt_trans_stop(env, handle); + handle->th_result = result; + return mdd_child_ops(mdd)->dt_trans_stop(env, mdd->mdd_child, handle); }