X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Fobd_target.h;h=406f4083496f59840b4ce85bbcc05c7918b42b23;hb=6a2b9ef84274e319bce9a367cb0261aff3ae636b;hp=fb2cb6e9ed3a3f0a491accb49619358a150bb9ac;hpb=928714dddabb2dbc4fc93101f23eaa671099dbea;p=fs%2Flustre-release.git diff --git a/lustre/include/obd_target.h b/lustre/include/obd_target.h index fb2cb6e..406f408 100644 --- a/lustre/include/obd_target.h +++ b/lustre/include/obd_target.h @@ -14,11 +14,7 @@ * * 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 */ @@ -35,6 +31,7 @@ #ifndef __OBD_TARGET_H #define __OBD_TARGET_H +#include /* server-side individual type definitions */ @@ -74,4 +71,20 @@ struct ost_obd { 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 */