2018-12-07 23:35:22 +03:00
/*
* Copyright ( C ) 2004 - 2018 Red Hat , Inc . All rights reserved .
*
* This file is part of LVM2 .
*
* This copyrighted material is made available to anyone wishing to use ,
* modify , copy , or redistribute it subject to the terms and conditions
* of the GNU Lesser General Public License v .2 .1 .
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program ; if not , write to the Free Software Foundation ,
* Inc . , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 USA
*/
# ifndef _LVM_HINTS_H
# define _LVM_HINTS_H
struct hint {
struct dm_list list ;
dev_t devt ;
2021-03-07 18:28:59 +03:00
char name [ PATH_MAX ] __attribute__ ( ( aligned ( 8 ) ) ) ;
char vgname [ NAME_LEN ] __attribute__ ( ( aligned ( 8 ) ) ) ;
char pvid [ ID_LEN + 1 ] __attribute__ ( ( aligned ( 8 ) ) ) ;
2018-12-07 23:35:22 +03:00
unsigned chosen : 1 ; /* this hint's dev was chosen for scanning */
} ;
2020-03-03 21:25:34 +03:00
void free_hints ( struct dm_list * hints ) ;
2018-12-07 23:35:22 +03:00
int write_hint_file ( struct cmd_context * cmd , int newhints ) ;
void clear_hint_file ( struct cmd_context * cmd ) ;
2019-01-16 23:19:09 +03:00
void invalidate_hints ( struct cmd_context * cmd ) ;
2018-12-07 23:35:22 +03:00
int get_hints ( struct cmd_context * cmd , struct dm_list * hints , int * newhints ,
struct dm_list * devs_in , struct dm_list * devs_out ) ;
int validate_hints ( struct cmd_context * cmd , struct dm_list * hints ) ;
2019-04-25 21:34:09 +03:00
void hints_exit ( struct cmd_context * cmd ) ;
2019-01-15 21:23:16 +03:00
2019-02-14 00:23:43 +03:00
void pvscan_recreate_hints_begin ( struct cmd_context * cmd ) ;
2021-11-05 20:19:35 +03:00
void get_single_vgname_cmd_arg ( struct cmd_context * cmd ,
struct dm_list * hints , char * * vgname ) ;
2018-12-07 23:35:22 +03:00
# endif