1
0
Fork 0

Merging upstream version 4.3+20240723.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-14 06:34:47 +01:00
parent 9d4f96bc70
commit aa881a3626
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
70 changed files with 1465 additions and 1206 deletions

42
mdadm.h
View file

@ -223,6 +223,14 @@ struct dlm_lksb {
struct __una_u16 { __u16 x; } __attribute__ ((packed));
struct __una_u32 { __u32 x; } __attribute__ ((packed));
/*
* Ensure GNU basename behavior on GLIBC less systems.
*/
#ifndef __GLIBC__
#define basename(path) \
(strrchr((path), '/') ? strrchr((path),'/') + 1 : (path))
#endif
static inline __u16 __get_unaligned16(const void *p)
{
const struct __una_u16 *ptr = (const struct __una_u16 *)p;
@ -535,7 +543,8 @@ enum special_options {
};
enum update_opt {
UOPT_NAME = 1,
UOPT_UNDEFINED = 0,
UOPT_NAME,
UOPT_PPL,
UOPT_NO_PPL,
UOPT_BITMAP,
@ -575,7 +584,6 @@ enum update_opt {
UOPT_SPEC_FAILFAST,
UOPT_SPEC_NOFAILFAST,
UOPT_SPEC_REVERT_RESHAPE_NOBACKUP,
UOPT_UNDEFINED
};
extern void fprint_update_options(FILE *outf, enum update_opt update_mode);
@ -594,6 +602,11 @@ enum flag_mode {
FlagDefault, FlagSet, FlagClear,
};
typedef enum {
ROLLBACK_METADATA_CHANGES,
APPLY_METADATA_CHANGES
} change_dir_t;
/* structures read from config file */
/* List of mddevice names and identifiers
* Identifiers can be:
@ -667,7 +680,9 @@ struct context {
};
struct shape {
char *dev;
int raiddisks;
int delta_disks;
int sparedisks;
int journaldisks;
int level;
@ -682,6 +697,7 @@ struct shape {
unsigned long long size;
unsigned long long data_offset;
int consistency_policy;
change_dir_t direction;
};
/* List of device names - wildcards expanded */
@ -1229,15 +1245,8 @@ extern struct superswitch {
* initialized to indicate if reshape is being performed at the
* container or subarray level
*/
#define APPLY_METADATA_CHANGES 1
#define ROLLBACK_METADATA_CHANGES 0
int (*reshape_super)(struct supertype *st,
unsigned long long size, int level,
int layout, int chunksize, int raid_disks,
int delta_disks, char *backup, char *dev,
int direction,
int verbose); /* optional */
int (*reshape_super)(struct supertype *st, struct shape *shape, struct context *c);
int (*manage_reshape)( /* optional */
int afd, struct mdinfo *sra, struct reshape *reshape,
struct supertype *st, unsigned long blocks,
@ -1541,8 +1550,7 @@ extern int Grow_reshape(char *devname, int fd,
extern int Grow_restart(struct supertype *st, struct mdinfo *info,
int *fdlist, int cnt, char *backup_file, int verbose);
extern int Grow_continue(int mdfd, struct supertype *st,
struct mdinfo *info, char *backup_file,
int forked, int freeze_reshape);
struct mdinfo *info, int forked, struct context *c);
extern int Grow_consistency_policy(char *devname, int fd,
struct context *c, struct shape *s);
@ -1552,8 +1560,7 @@ extern int restore_backup(struct supertype *st,
int spares,
char **backup_filep,
int verbose);
extern int Grow_continue_command(char *devname, int fd,
char *backup_file, int verbose);
extern int Grow_continue_command(char *devname, int fd, struct context *c);
extern int Assemble(struct supertype *st, char *mddev,
struct mddev_ident *ident,
@ -1769,8 +1776,11 @@ extern int is_subarray_active(char *subarray, char *devname);
extern int open_subarray(char *dev, char *subarray, struct supertype *st, int quiet);
extern struct superswitch *version_to_superswitch(char *vers);
extern int mdmon_running(char *devnm);
extern int mdmon_pid(char *devnm);
extern mdadm_status_t wait_for_mdmon_control_socket(const char *container_devnm);
extern int mdmon_running(const char *devnm);
extern int mdmon_pid(const char *devnm);
extern mdadm_status_t wait_for_mdmon(const char *devnm);
extern int check_env(char *name);
extern __u32 random32(void);
extern void random_uuid(__u8 *buf);