*
* You should have received a copy of the GNU General Public License
* 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
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2012, Intel, Inc.
+ * Copyright (c) 2011, 2014, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
#ifndef __OBD_TARGET_H
#define __OBD_TARGET_H
+#include <lprocfs_status.h>
/* server-side individual type definitions */
struct lu_target *obt_lut;
__u64 obt_mount_count;
struct obd_job_stats obt_jobstats;
+ struct nm_config_file *obt_nodemap_config_file;
};
#define OBJ_SUBDIR_COUNT 32 /* set to zero for no subdirs */
struct filter_obd {
/* NB this field MUST be first */
struct obd_device_target fo_obt;
-
- /* capability related */
- unsigned int fo_fl_oss_capa;
- struct list_head fo_capa_keys;
- struct hlist_head *fo_capa_hash;
};
struct echo_obd {
struct obd_device_target eo_obt;
struct obdo eo_oa;
spinlock_t eo_lock;
- __u64 eo_lastino;
+ u64 eo_lastino;
struct lustre_handle eo_nl_lock;
atomic_t eo_prep;
};
struct mutex ost_health_mutex;
};
+/* Generic subset of tgts */
+struct lu_tgt_pool {
+ __u32 *op_array; /* array of index of
+ * lov_obd->lov_tgts */
+ unsigned int op_count; /* number of tgts in the array */
+ unsigned int op_size; /* allocated size of op_array */
+ struct rw_semaphore op_rw_sem; /* to protect lu_tgt_pool use */
+};
+
+int tgt_pool_init(struct lu_tgt_pool *op, unsigned int count);
+int tgt_pool_add(struct lu_tgt_pool *op, __u32 idx, unsigned int min_count);
+int tgt_pool_remove(struct lu_tgt_pool *op, __u32 idx);
+int tgt_pool_free(struct lu_tgt_pool *op);
+int tgt_check_index(int idx, struct lu_tgt_pool *osts);
+int tgt_pool_extend(struct lu_tgt_pool *op, unsigned int min_count);
+
#endif /* __OBD_TARGET_H */