-/*
- * GPL HEADER START
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 only,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License version 2 for more details (a copy is included
- * 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
- * http://www.gnu.org/licenses/gpl-2.0.html
- *
- * GPL HEADER END
- */
+// SPDX-License-Identifier: GPL-2.0
+
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved
* Use is subject to license terms.
*
* Copyright (c) 2019, DDN Storage Corporation.
*/
+
/*
* This file is part of Lustre, http://www.lustre.org/
*
- * lustre/target/tgt_fmd.c
- *
* This file provides functions to handle Filter Modification Data (FMD).
* The FMD is responsible for file attributes to be applied in
* Transaction ID (XID) order, so older requests can't re-write newer
* \param[in] exp OBD export
* \param[in] fmd FMD to put
*/
-void tgt_fmd_put(struct obd_export *exp, struct tgt_fmd_data *fmd)
+static void tgt_fmd_put(struct obd_export *exp, struct tgt_fmd_data *fmd)
{
struct tg_export_data *ted = &exp->exp_target_data;
struct tgt_fmd_data *keep)
{
struct tg_export_data *ted = &exp->exp_target_data;
- struct lu_target *lut = exp->exp_obd->u.obt.obt_lut;
+ struct lu_target *lut = obd2obt(exp->exp_obd)->obt_lut;
time64_t now = ktime_get_seconds();
struct tgt_fmd_data *fmd, *tmp;
{
struct tg_export_data *ted = &exp->exp_target_data;
struct tgt_fmd_data *found = NULL, *fmd;
- struct lu_target *lut = exp->exp_obd->u.obt.obt_lut;
+ struct lu_target *lut = obd2obt(exp->exp_obd)->obt_lut;
time64_t now = ktime_get_seconds();
assert_spin_locked(&ted->ted_fmd_lock);
* \retval struct tgt_fmd_data found by FID
* \retval NULL indicates FMD is not found
*/
-struct tgt_fmd_data *tgt_fmd_find(struct obd_export *exp,
- const struct lu_fid *fid)
+static struct tgt_fmd_data *tgt_fmd_find(struct obd_export *exp,
+ const struct lu_fid *fid)
{
struct tg_export_data *ted = &exp->exp_target_data;
struct tgt_fmd_data *fmd;
* \retval struct tgt_fmd_data found by FID
* \retval NULL indicates FMD is not found
*/
-struct tgt_fmd_data *tgt_fmd_get(struct obd_export *exp,
- const struct lu_fid *fid)
+static struct tgt_fmd_data *tgt_fmd_get(struct obd_export *exp,
+ const struct lu_fid *fid)
{
struct tg_export_data *ted = &exp->exp_target_data;
struct tgt_fmd_data *found = NULL, *fmd_new = NULL;