|
Packit Service |
0af388 |
/*
|
|
Packit Service |
0af388 |
Copyright (c) 2018 Martin Wilck, SUSE Linux GmbH
|
|
Packit Service |
0af388 |
|
|
Packit Service |
0af388 |
This program is free software; you can redistribute it and/or
|
|
Packit Service |
0af388 |
modify it under the terms of the GNU General Public License
|
|
Packit Service |
0af388 |
as published by the Free Software Foundation; either version 2
|
|
Packit Service |
0af388 |
of the License, or (at your option) any later version.
|
|
Packit Service |
0af388 |
|
|
Packit Service |
0af388 |
This program is distributed in the hope that it will be useful,
|
|
Packit Service |
0af388 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
0af388 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit Service |
0af388 |
GNU General Public License for more details.
|
|
Packit Service |
0af388 |
|
|
Packit Service |
0af388 |
You should have received a copy of the GNU General Public License
|
|
Packit Service |
0af388 |
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
Packit Service |
0af388 |
*/
|
|
Packit Service |
0af388 |
#ifndef _DM_GENERIC_H
|
|
Packit Service |
0af388 |
#define _DM_GENERIC_H
|
|
Packit Service |
0af388 |
#include "generic.h"
|
|
Packit Service |
0af388 |
#include "list.h" /* for container_of */
|
|
Packit Service |
0af388 |
#include "structs.h"
|
|
Packit Service |
0af388 |
|
|
Packit Service |
0af388 |
#define dm_multipath_to_gen(mpp) (&((mpp)->generic_mp))
|
|
Packit Service |
0af388 |
#define gen_multipath_to_dm(gm) \
|
|
Packit Service |
0af388 |
container_of_const((gm), struct multipath, generic_mp)
|
|
Packit Service |
0af388 |
|
|
Packit Service |
0af388 |
#define dm_pathgroup_to_gen(pg) (&(pg->generic_pg))
|
|
Packit Service |
0af388 |
#define gen_pathgroup_to_dm(gpg) \
|
|
Packit Service |
0af388 |
container_of_const((gpg), struct pathgroup, generic_pg)
|
|
Packit Service |
0af388 |
|
|
Packit Service |
0af388 |
#define dm_path_to_gen(pp) (&((pp)->generic_path))
|
|
Packit Service |
0af388 |
#define gen_path_to_dm(gp) \
|
|
Packit Service |
0af388 |
container_of_const((gp), struct path, generic_path)
|
|
Packit Service |
0af388 |
|
|
Packit Service |
0af388 |
extern const struct gen_multipath_ops dm_gen_multipath_ops;
|
|
Packit Service |
0af388 |
extern const struct gen_pathgroup_ops dm_gen_pathgroup_ops;
|
|
Packit Service |
0af388 |
extern const struct gen_path_ops dm_gen_path_ops;
|
|
Packit Service |
0af388 |
|
|
Packit Service |
0af388 |
#endif /* _DM_GENERIC_H */
|