X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Fobdclass%2Fllog_swab.c;h=c644efb64ac1fd0b1d982a25161b3648fb9a57b7;hb=HEAD;hp=1c9d0be00a7b37a07ffa71fbe3f9d7bd13f8e7f7;hpb=e28f3ee185b2ef7bad8046f46444772fac214a40;p=fs%2Flustre-release.git diff --git a/lustre/obdclass/llog_swab.c b/lustre/obdclass/llog_swab.c index 1c9d0be..a064ffe 100644 --- a/lustre/obdclass/llog_swab.c +++ b/lustre/obdclass/llog_swab.c @@ -1,35 +1,15 @@ -/* - * 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 (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * * Copyright (c) 2012, 2017, Intel Corporation. */ + /* * This file is part of Lustre, http://www.lustre.org/ * - * lustre/obdclass/llog_swab.c - * * Swabbing of llog datatypes (from disk or over the wire). * * Author: jacob berkman @@ -37,9 +17,17 @@ #define DEBUG_SUBSYSTEM S_LOG - #include #include +#include + +#ifdef HAVE_SERVER_SUPPORT +#define SERVER_ONLY_EXPORT_SYMBOL(symbol) EXPORT_SYMBOL(symbol) +#define SERVER_ONLY +#else +#define SERVER_ONLY static +#define SERVER_ONLY_EXPORT_SYMBOL(symbol) +#endif static void print_llogd_body(struct llogd_body *d) { @@ -123,7 +111,8 @@ void lustre_swab_lu_seq_range(struct lu_seq_range *range) } EXPORT_SYMBOL(lustre_swab_lu_seq_range); -void lustre_swab_update_ops(struct update_ops *uops, unsigned int op_count) +SERVER_ONLY void lustre_swab_update_ops(struct update_ops *uops, + unsigned int op_count) { unsigned int i; unsigned int j; @@ -136,7 +125,7 @@ void lustre_swab_update_ops(struct update_ops *uops, unsigned int op_count) __swab16s(&uops->uops_op[i].uop_params_off[j]); } } -EXPORT_SYMBOL(lustre_swab_update_ops); +SERVER_ONLY_EXPORT_SYMBOL(lustre_swab_update_ops); void lustre_swab_llog_rec(struct llog_rec_hdr *rec) { @@ -241,7 +230,7 @@ void lustre_swab_llog_rec(struct llog_rec_hdr *rec) __swab64s(&arr->arr_hai.hai_gid); /* * no swabing for opaque data - * hai_data[0]; + * hai_data[]; */ break; }