/* * 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 COPYING file that accompanied this code. * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * GPL HEADER END */ /* * Copyright (c) 2013, Intel Corporation. */ /* * lustre/include/lustre_lmv.h * * Lustre LMV structures and functions. * * Author: Di Wang */ #ifndef _LUSTRE_LMV_H #define _LUSTRE_LMV_H #include struct lmv_oinfo { struct lu_fid lmo_fid; mdsno_t lmo_mds; struct inode *lmo_root; }; struct lmv_stripe_md { __u32 lsm_md_magic; __u32 lsm_md_stripe_count; __u32 lsm_md_master_mdt_index; __u32 lsm_md_hash_type; __u32 lsm_md_layout_version; __u32 lsm_md_default_count; __u32 lsm_md_default_index; char lsm_md_pool_name[LOV_MAXPOOLNAME]; struct lmv_oinfo lsm_md_oinfo[0]; }; union lmv_mds_md; int lmv_pack_md(union lmv_mds_md **lmmp, const struct lmv_stripe_md *lsm, int stripe_count); int lmv_alloc_md(union lmv_mds_md **lmmp, int stripe_count); void lmv_free_md(union lmv_mds_md *lmm); int lmv_alloc_memmd(struct lmv_stripe_md **lsmp, int stripe_count); void lmv_free_memmd(struct lmv_stripe_md *lsm); #endif