mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-08 10:03:17 +03:00
Use __attribute__ consistently throughout.
This commit is contained in:
parent
3e404aea3a
commit
08f1ddea6c
@ -1,5 +1,6 @@
|
||||
Version 2.02.71 -
|
||||
===============================
|
||||
Use __attribute__ consistently throughout.
|
||||
Fix redundant declarations and always compile with -Wredundant-decls.
|
||||
Fix possible hang when all mirror images of a mirrored log fail.
|
||||
Do not log backtrace in valid _lv_resume() code path.
|
||||
|
@ -32,7 +32,7 @@ static void daemonize(void);
|
||||
static void init_all(void);
|
||||
static void cleanup_all(void);
|
||||
|
||||
int main(int argc __attribute((unused)), char *argv[] __attribute((unused)))
|
||||
int main(int argc __attribute__((unused)), char *argv[] __attribute__((unused)))
|
||||
{
|
||||
daemonize();
|
||||
|
||||
@ -60,7 +60,7 @@ int main(int argc __attribute((unused)), char *argv[] __attribute((unused)))
|
||||
* @sig: the signal
|
||||
*
|
||||
*/
|
||||
static void parent_exit_handler(int sig __attribute((unused)))
|
||||
static void parent_exit_handler(int sig __attribute__((unused)))
|
||||
{
|
||||
exit_now = 1;
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ static struct clog_request *get_matching_rq(struct clog_request *rq,
|
||||
}
|
||||
|
||||
static char rq_buffer[DM_ULOG_REQUEST_SIZE];
|
||||
static int handle_cluster_request(struct clog_cpg *entry __attribute((unused)),
|
||||
static int handle_cluster_request(struct clog_cpg *entry __attribute__((unused)),
|
||||
struct clog_request *rq, int server)
|
||||
{
|
||||
int r = 0;
|
||||
@ -855,7 +855,7 @@ static int resend_requests(struct clog_cpg *entry)
|
||||
return r;
|
||||
}
|
||||
|
||||
static int do_cluster_work(void *data __attribute((unused)))
|
||||
static int do_cluster_work(void *data __attribute__((unused)))
|
||||
{
|
||||
int r = SA_AIS_OK;
|
||||
struct clog_cpg *entry, *tmp;
|
||||
@ -927,8 +927,8 @@ static int flush_startup_list(struct clog_cpg *entry)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void cpg_message_callback(cpg_handle_t handle, const struct cpg_name *gname __attribute((unused)),
|
||||
uint32_t nodeid, uint32_t pid __attribute((unused)),
|
||||
static void cpg_message_callback(cpg_handle_t handle, const struct cpg_name *gname __attribute__((unused)),
|
||||
uint32_t nodeid, uint32_t pid __attribute__((unused)),
|
||||
void *msg, size_t msg_len)
|
||||
{
|
||||
int i;
|
||||
@ -1366,7 +1366,7 @@ static void cpg_leave_callback(struct clog_cpg *match,
|
||||
}
|
||||
}
|
||||
|
||||
static void cpg_config_callback(cpg_handle_t handle, const struct cpg_name *gname __attribute((unused)),
|
||||
static void cpg_config_callback(cpg_handle_t handle, const struct cpg_name *gname __attribute__((unused)),
|
||||
const struct cpg_address *member_list,
|
||||
size_t member_list_entries,
|
||||
const struct cpg_address *left_list,
|
||||
|
@ -21,7 +21,7 @@
|
||||
*/
|
||||
#define COMPAT_OFFSET 256
|
||||
|
||||
static void v5_data_endian_switch(struct clog_request *rq, int to_network __attribute((unused)))
|
||||
static void v5_data_endian_switch(struct clog_request *rq, int to_network __attribute__((unused)))
|
||||
{
|
||||
int i, end;
|
||||
int64_t *pi64;
|
||||
|
@ -290,7 +290,7 @@ static int write_log(struct log_c *lc)
|
||||
}
|
||||
|
||||
/* FIXME Rewrite this function taking advantage of the udev changes (where in use) to improve its efficiency! */
|
||||
static int find_disk_path(char *major_minor_str, char *path_rtn, int *unlink_path __attribute((unused)))
|
||||
static int find_disk_path(char *major_minor_str, char *path_rtn, int *unlink_path __attribute__((unused)))
|
||||
{
|
||||
int r;
|
||||
DIR *dp;
|
||||
@ -1369,7 +1369,7 @@ static int clog_get_sync_count(struct dm_ulog_request *rq, uint32_t originator)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int core_status_info(struct log_c *lc __attribute((unused)), struct dm_ulog_request *rq)
|
||||
static int core_status_info(struct log_c *lc __attribute__((unused)), struct dm_ulog_request *rq)
|
||||
{
|
||||
int r;
|
||||
char *data = (char *)rq->data;
|
||||
|
@ -214,7 +214,7 @@ static int kernel_send_helper(void *data, uint16_t out_size)
|
||||
*
|
||||
* Returns: 0 on success, -EXXX on failure
|
||||
*/
|
||||
static int do_local_work(void *data __attribute((unused)))
|
||||
static int do_local_work(void *data __attribute__((unused)))
|
||||
{
|
||||
int r;
|
||||
struct clog_request *rq;
|
||||
|
@ -476,14 +476,14 @@ static void _exit_dm_lib(void)
|
||||
dm_lib_exit();
|
||||
}
|
||||
|
||||
static void _exit_timeout(void *unused __attribute((unused)))
|
||||
static void _exit_timeout(void *unused __attribute__((unused)))
|
||||
{
|
||||
_timeout_running = 0;
|
||||
pthread_mutex_unlock(&_timeout_mutex);
|
||||
}
|
||||
|
||||
/* Wake up monitor threads every so often. */
|
||||
static void *_timeout_thread(void *unused __attribute((unused)))
|
||||
static void *_timeout_thread(void *unused __attribute__((unused)))
|
||||
{
|
||||
struct timespec timeout;
|
||||
time_t curr_time;
|
||||
@ -1492,7 +1492,7 @@ static void _cleanup_unused_threads(void)
|
||||
_unlock_mutex();
|
||||
}
|
||||
|
||||
static void _sig_alarm(int signum __attribute((unused)))
|
||||
static void _sig_alarm(int signum __attribute__((unused)))
|
||||
{
|
||||
pthread_testcancel();
|
||||
}
|
||||
@ -1524,7 +1524,7 @@ static void _init_thread_signals(void)
|
||||
* Set the global variable which the process should
|
||||
* be watching to determine when to exit.
|
||||
*/
|
||||
static void _exit_handler(int sig __attribute((unused)))
|
||||
static void _exit_handler(int sig __attribute__((unused)))
|
||||
{
|
||||
/*
|
||||
* We exit when '_exit_now' is set.
|
||||
|
@ -49,9 +49,9 @@ static pthread_mutex_t _event_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
* configurable and we don't have that option yet
|
||||
*/
|
||||
static void _temporary_log_fn(int level,
|
||||
const char *file __attribute((unused)),
|
||||
int line __attribute((unused)),
|
||||
int dm_errno __attribute((unused)),
|
||||
const char *file __attribute__((unused)),
|
||||
int line __attribute__((unused)),
|
||||
int dm_errno __attribute__((unused)),
|
||||
const char *message)
|
||||
{
|
||||
level &= ~(_LOG_STDERR | _LOG_ONCE);
|
||||
|
@ -167,8 +167,8 @@ static int _remove_failed_devices(const char *device)
|
||||
}
|
||||
|
||||
void process_event(struct dm_task *dmt,
|
||||
enum dm_event_mask event __attribute((unused)),
|
||||
void **unused __attribute((unused)))
|
||||
enum dm_event_mask event __attribute__((unused)),
|
||||
void **unused __attribute__((unused)))
|
||||
{
|
||||
void *next = NULL;
|
||||
uint64_t start, length;
|
||||
@ -224,10 +224,10 @@ void process_event(struct dm_task *dmt,
|
||||
}
|
||||
|
||||
int register_device(const char *device,
|
||||
const char *uuid __attribute((unused)),
|
||||
int major __attribute((unused)),
|
||||
int minor __attribute((unused)),
|
||||
void **unused __attribute((unused)))
|
||||
const char *uuid __attribute__((unused)),
|
||||
int major __attribute__((unused)),
|
||||
int minor __attribute__((unused)),
|
||||
void **unused __attribute__((unused)))
|
||||
{
|
||||
int r = dmeventd_lvm2_init();
|
||||
syslog(LOG_INFO, "Monitoring mirror device %s for events.", device);
|
||||
@ -235,10 +235,10 @@ int register_device(const char *device,
|
||||
}
|
||||
|
||||
int unregister_device(const char *device,
|
||||
const char *uuid __attribute((unused)),
|
||||
int major __attribute((unused)),
|
||||
int minor __attribute((unused)),
|
||||
void **unused __attribute((unused)))
|
||||
const char *uuid __attribute__((unused)),
|
||||
int major __attribute__((unused)),
|
||||
int minor __attribute__((unused)),
|
||||
void **unused __attribute__((unused)))
|
||||
{
|
||||
syslog(LOG_INFO, "No longer monitoring mirror device %s for events.",
|
||||
device);
|
||||
|
@ -70,7 +70,7 @@ static void _parse_snapshot_params(char *params, struct snap_status *status)
|
||||
}
|
||||
|
||||
void process_event(struct dm_task *dmt,
|
||||
enum dm_event_mask event __attribute((unused)),
|
||||
enum dm_event_mask event __attribute__((unused)),
|
||||
void **private)
|
||||
{
|
||||
void *next = NULL;
|
||||
@ -113,9 +113,9 @@ out:
|
||||
}
|
||||
|
||||
int register_device(const char *device,
|
||||
const char *uuid __attribute((unused)),
|
||||
int major __attribute((unused)),
|
||||
int minor __attribute((unused)),
|
||||
const char *uuid __attribute__((unused)),
|
||||
int major __attribute__((unused)),
|
||||
int minor __attribute__((unused)),
|
||||
void **private)
|
||||
{
|
||||
int *percent_warning = (int*)private;
|
||||
@ -128,10 +128,10 @@ int register_device(const char *device,
|
||||
}
|
||||
|
||||
int unregister_device(const char *device,
|
||||
const char *uuid __attribute((unused)),
|
||||
int major __attribute((unused)),
|
||||
int minor __attribute((unused)),
|
||||
void **unused __attribute((unused)))
|
||||
const char *uuid __attribute__((unused)),
|
||||
int major __attribute__((unused)),
|
||||
int minor __attribute__((unused)),
|
||||
void **unused __attribute__((unused)))
|
||||
{
|
||||
syslog(LOG_INFO, "No longer monitoring snapshot %s\n",
|
||||
device);
|
||||
|
@ -1752,7 +1752,7 @@ int dev_manager_device_uses_vg(struct device *dev,
|
||||
{
|
||||
struct dm_tree *dtree;
|
||||
struct dm_tree_node *root;
|
||||
char dlid[sizeof(UUID_PREFIX) + sizeof(struct id) - 1] __attribute((aligned(8)));
|
||||
char dlid[sizeof(UUID_PREFIX) + sizeof(struct id) - 1] __attribute__((aligned(8)));
|
||||
int r = 1;
|
||||
|
||||
if (!(dtree = dm_tree_create())) {
|
||||
|
18
lib/cache/lvmcache.c
vendored
18
lib/cache/lvmcache.c
vendored
@ -90,7 +90,7 @@ static void _free_cached_vgmetadata(struct lvmcache_vginfo *vginfo)
|
||||
*/
|
||||
static void _store_metadata(struct volume_group *vg, unsigned precommitted)
|
||||
{
|
||||
char uuid[64] __attribute((aligned(8)));
|
||||
char uuid[64] __attribute__((aligned(8)));
|
||||
struct lvmcache_vginfo *vginfo;
|
||||
int size;
|
||||
|
||||
@ -275,7 +275,7 @@ int lvmcache_verify_lock_order(const char *vgname)
|
||||
return 1;
|
||||
}
|
||||
|
||||
void lvmcache_lock_vgname(const char *vgname, int read_only __attribute((unused)))
|
||||
void lvmcache_lock_vgname(const char *vgname, int read_only __attribute__((unused)))
|
||||
{
|
||||
if (!_lock_hash && !lvmcache_init()) {
|
||||
log_error("Internal cache initialisation failed");
|
||||
@ -374,7 +374,7 @@ const struct format_type *fmt_from_vgname(const char *vgname, const char *vgid)
|
||||
struct dm_list *devh, *tmp;
|
||||
struct dm_list devs;
|
||||
struct device_list *devl;
|
||||
char vgid_found[ID_LEN + 1] __attribute((aligned(8)));
|
||||
char vgid_found[ID_LEN + 1] __attribute__((aligned(8)));
|
||||
|
||||
if (!(vginfo = vginfo_from_vgname(vgname, vgid)))
|
||||
return NULL;
|
||||
@ -411,7 +411,7 @@ const struct format_type *fmt_from_vgname(const char *vgname, const char *vgid)
|
||||
struct lvmcache_vginfo *vginfo_from_vgid(const char *vgid)
|
||||
{
|
||||
struct lvmcache_vginfo *vginfo;
|
||||
char id[ID_LEN + 1] __attribute((aligned(8)));
|
||||
char id[ID_LEN + 1] __attribute__((aligned(8)));
|
||||
|
||||
if (!_vgid_hash || !vgid)
|
||||
return NULL;
|
||||
@ -492,7 +492,7 @@ static int _vginfo_is_invalid(struct lvmcache_vginfo *vginfo)
|
||||
struct lvmcache_info *info_from_pvid(const char *pvid, int valid_only)
|
||||
{
|
||||
struct lvmcache_info *info;
|
||||
char id[ID_LEN + 1] __attribute((aligned(8)));
|
||||
char id[ID_LEN + 1] __attribute__((aligned(8)));
|
||||
|
||||
if (!_pvid_hash || !pvid)
|
||||
return NULL;
|
||||
@ -930,8 +930,8 @@ static int _insert_vginfo(struct lvmcache_vginfo *new_vginfo, const char *vgid,
|
||||
struct lvmcache_vginfo *primary_vginfo)
|
||||
{
|
||||
struct lvmcache_vginfo *last_vginfo = primary_vginfo;
|
||||
char uuid_primary[64] __attribute((aligned(8)));
|
||||
char uuid_new[64] __attribute((aligned(8)));
|
||||
char uuid_primary[64] __attribute__((aligned(8)));
|
||||
char uuid_new[64] __attribute__((aligned(8)));
|
||||
int use_new = 0;
|
||||
|
||||
/* Pre-existing VG takes precedence. Unexported VG takes precedence. */
|
||||
@ -1219,7 +1219,7 @@ int lvmcache_update_vg(struct volume_group *vg, unsigned precommitted)
|
||||
{
|
||||
struct pv_list *pvl;
|
||||
struct lvmcache_info *info;
|
||||
char pvid_s[ID_LEN + 1] __attribute((aligned(8)));
|
||||
char pvid_s[ID_LEN + 1] __attribute__((aligned(8)));
|
||||
|
||||
pvid_s[sizeof(pvid_s) - 1] = '\0';
|
||||
|
||||
@ -1247,7 +1247,7 @@ struct lvmcache_info *lvmcache_add(struct labeller *labeller, const char *pvid,
|
||||
{
|
||||
struct label *label;
|
||||
struct lvmcache_info *existing, *info;
|
||||
char pvid_s[ID_LEN + 1] __attribute((aligned(8)));
|
||||
char pvid_s[ID_LEN + 1] __attribute__((aligned(8)));
|
||||
|
||||
if (!_vgname_hash && !lvmcache_init()) {
|
||||
log_error("Internal cache initialisation failed");
|
||||
|
@ -159,7 +159,7 @@ static int _parse_config_file(struct parser *p, struct config_tree *cft)
|
||||
return 1;
|
||||
}
|
||||
|
||||
struct config_tree *create_config_tree_from_string(struct cmd_context *cmd __attribute((unused)),
|
||||
struct config_tree *create_config_tree_from_string(struct cmd_context *cmd __attribute__((unused)),
|
||||
const char *config_settings)
|
||||
{
|
||||
struct cs *c;
|
||||
|
@ -678,7 +678,7 @@ int dev_write(struct device *dev, uint64_t offset, size_t len, void *buffer)
|
||||
int dev_set(struct device *dev, uint64_t offset, size_t len, int value)
|
||||
{
|
||||
size_t s;
|
||||
char buffer[4096] __attribute((aligned(8)));
|
||||
char buffer[4096] __attribute__((aligned(8)));
|
||||
|
||||
if (!dev_open(dev))
|
||||
return_0;
|
||||
|
@ -320,14 +320,14 @@ unsigned long dev_md_stripe_width(const char *sysfs_dir, struct device *dev)
|
||||
|
||||
#else
|
||||
|
||||
int dev_is_md(struct device *dev __attribute((unused)),
|
||||
uint64_t *sb __attribute((unused)))
|
||||
int dev_is_md(struct device *dev __attribute__((unused)),
|
||||
uint64_t *sb __attribute__((unused)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned long dev_md_stripe_width(const char *sysfs_dir __attribute((unused)),
|
||||
struct device *dev __attribute((unused)))
|
||||
unsigned long dev_md_stripe_width(const char *sysfs_dir __attribute__((unused)),
|
||||
struct device *dev __attribute__((unused)))
|
||||
{
|
||||
return 0UL;
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ const char *display_size(const struct cmd_context *cmd, uint64_t size)
|
||||
|
||||
void pvdisplay_colons(const struct physical_volume *pv)
|
||||
{
|
||||
char uuid[64] __attribute((aligned(8)));
|
||||
char uuid[64] __attribute__((aligned(8)));
|
||||
|
||||
if (!pv)
|
||||
return;
|
||||
@ -358,9 +358,9 @@ void pvdisplay_segments(const struct physical_volume *pv)
|
||||
/* FIXME Include label fields */
|
||||
void pvdisplay_full(const struct cmd_context *cmd,
|
||||
const struct physical_volume *pv,
|
||||
void *handle __attribute((unused)))
|
||||
void *handle __attribute__((unused)))
|
||||
{
|
||||
char uuid[64] __attribute((aligned(8)));
|
||||
char uuid[64] __attribute__((aligned(8)));
|
||||
const char *size;
|
||||
|
||||
uint32_t pe_free;
|
||||
@ -423,12 +423,12 @@ void pvdisplay_full(const struct cmd_context *cmd,
|
||||
log_print(" ");
|
||||
}
|
||||
|
||||
int pvdisplay_short(const struct cmd_context *cmd __attribute((unused)),
|
||||
const struct volume_group *vg __attribute((unused)),
|
||||
int pvdisplay_short(const struct cmd_context *cmd __attribute__((unused)),
|
||||
const struct volume_group *vg __attribute__((unused)),
|
||||
const struct physical_volume *pv,
|
||||
void *handle __attribute((unused)))
|
||||
void *handle __attribute__((unused)))
|
||||
{
|
||||
char uuid[64] __attribute((aligned(8)));
|
||||
char uuid[64] __attribute__((aligned(8)));
|
||||
|
||||
if (!pv)
|
||||
return 0;
|
||||
@ -469,11 +469,11 @@ void lvdisplay_colons(const struct logical_volume *lv)
|
||||
|
||||
int lvdisplay_full(struct cmd_context *cmd,
|
||||
const struct logical_volume *lv,
|
||||
void *handle __attribute((unused)))
|
||||
void *handle __attribute__((unused)))
|
||||
{
|
||||
struct lvinfo info;
|
||||
int inkernel, snap_active = 0;
|
||||
char uuid[64] __attribute((aligned(8)));
|
||||
char uuid[64] __attribute__((aligned(8)));
|
||||
struct lv_segment *snap_seg = NULL, *mirror_seg = NULL;
|
||||
float snap_percent; /* fused, fsize; */
|
||||
percent_range_t percent_range;
|
||||
@ -646,7 +646,7 @@ int lvdisplay_segments(const struct logical_volume *lv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
void vgdisplay_extents(const struct volume_group *vg __attribute((unused)))
|
||||
void vgdisplay_extents(const struct volume_group *vg __attribute__((unused)))
|
||||
{
|
||||
}
|
||||
|
||||
@ -654,7 +654,7 @@ void vgdisplay_full(const struct volume_group *vg)
|
||||
{
|
||||
uint32_t access_str;
|
||||
uint32_t active_pvs;
|
||||
char uuid[64] __attribute((aligned(8)));
|
||||
char uuid[64] __attribute__((aligned(8)));
|
||||
|
||||
active_pvs = vg->pv_count - vg_missing_pv_count(vg);
|
||||
|
||||
@ -728,7 +728,7 @@ void vgdisplay_colons(const struct volume_group *vg)
|
||||
{
|
||||
uint32_t active_pvs;
|
||||
const char *access_str;
|
||||
char uuid[64] __attribute((aligned(8)));
|
||||
char uuid[64] __attribute__((aligned(8)));
|
||||
|
||||
active_pvs = vg->pv_count - vg_missing_pv_count(vg);
|
||||
|
||||
|
@ -40,20 +40,20 @@ static int _errseg_merge_segments(struct lv_segment *seg1, struct lv_segment *se
|
||||
}
|
||||
|
||||
#ifdef DEVMAPPER_SUPPORT
|
||||
static int _errseg_add_target_line(struct dev_manager *dm __attribute((unused)),
|
||||
struct dm_pool *mem __attribute((unused)),
|
||||
struct cmd_context *cmd __attribute((unused)),
|
||||
void **target_state __attribute((unused)),
|
||||
struct lv_segment *seg __attribute((unused)),
|
||||
static int _errseg_add_target_line(struct dev_manager *dm __attribute__((unused)),
|
||||
struct dm_pool *mem __attribute__((unused)),
|
||||
struct cmd_context *cmd __attribute__((unused)),
|
||||
void **target_state __attribute__((unused)),
|
||||
struct lv_segment *seg __attribute__((unused)),
|
||||
struct dm_tree_node *node, uint64_t len,
|
||||
uint32_t *pvmove_mirror_count __attribute((unused)))
|
||||
uint32_t *pvmove_mirror_count __attribute__((unused)))
|
||||
{
|
||||
return dm_tree_node_add_error_target(node, len);
|
||||
}
|
||||
|
||||
static int _errseg_target_present(struct cmd_context *cmd,
|
||||
const struct lv_segment *seg __attribute((unused)),
|
||||
unsigned *attributes __attribute((unused)))
|
||||
const struct lv_segment *seg __attribute__((unused)),
|
||||
unsigned *attributes __attribute__((unused)))
|
||||
{
|
||||
static int _errseg_checked = 0;
|
||||
static int _errseg_present = 0;
|
||||
@ -70,7 +70,7 @@ static int _errseg_target_present(struct cmd_context *cmd,
|
||||
#endif
|
||||
|
||||
static int _errseg_modules_needed(struct dm_pool *mem,
|
||||
const struct lv_segment *seg __attribute((unused)),
|
||||
const struct lv_segment *seg __attribute__((unused)),
|
||||
struct dm_list *modules)
|
||||
{
|
||||
if (!str_list_add(mem, modules, "error")) {
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#ifdef linux
|
||||
|
||||
static int _ignore_md(struct dev_filter *f __attribute((unused)),
|
||||
static int _ignore_md(struct dev_filter *f __attribute__((unused)),
|
||||
struct device *dev)
|
||||
{
|
||||
int ret;
|
||||
|
@ -326,7 +326,7 @@ struct dev_filter *sysfs_filter_create(const char *sysfs_dir)
|
||||
|
||||
#else
|
||||
|
||||
struct dev_filter *sysfs_filter_create(const char *sysfs_dir __attribute((unused)))
|
||||
struct dev_filter *sysfs_filter_create(const char *sysfs_dir __attribute__((unused)))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ static const device_info_t device_info[] = {
|
||||
{NULL, 0}
|
||||
};
|
||||
|
||||
static int _passes_lvm_type_device_filter(struct dev_filter *f __attribute((unused)),
|
||||
static int _passes_lvm_type_device_filter(struct dev_filter *f __attribute__((unused)),
|
||||
struct device *dev)
|
||||
{
|
||||
const char *name = dev_name(dev);
|
||||
|
@ -247,7 +247,7 @@ static int _read_uuids(struct disk_list *data)
|
||||
{
|
||||
unsigned num_read = 0;
|
||||
struct uuid_list *ul;
|
||||
char buffer[NAME_LEN] __attribute((aligned(8)));
|
||||
char buffer[NAME_LEN] __attribute__((aligned(8)));
|
||||
uint64_t pos = data->pvd.pv_uuidlist_on_disk.base;
|
||||
uint64_t end = pos + data->pvd.pv_uuidlist_on_disk.size;
|
||||
|
||||
@ -650,7 +650,7 @@ static int _write_pvd(struct disk_list *data)
|
||||
/*
|
||||
* assumes the device has been opened.
|
||||
*/
|
||||
static int __write_all_pvd(const struct format_type *fmt __attribute((unused)),
|
||||
static int __write_all_pvd(const struct format_type *fmt __attribute__((unused)),
|
||||
struct disk_list *data)
|
||||
{
|
||||
const char *pv_name = dev_name(data->dev);
|
||||
|
@ -148,7 +148,7 @@ struct pe_disk {
|
||||
|
||||
struct uuid_list {
|
||||
struct dm_list list;
|
||||
char uuid[NAME_LEN] __attribute((aligned(8)));
|
||||
char uuid[NAME_LEN] __attribute__((aligned(8)));
|
||||
};
|
||||
|
||||
struct lvd_list {
|
||||
@ -161,11 +161,11 @@ struct disk_list {
|
||||
struct dm_pool *mem;
|
||||
struct device *dev;
|
||||
|
||||
struct pv_disk pvd __attribute((aligned(8)));
|
||||
struct vg_disk vgd __attribute((aligned(8)));
|
||||
struct dm_list uuids __attribute((aligned(8)));
|
||||
struct dm_list lvds __attribute((aligned(8)));
|
||||
struct pe_disk *extents __attribute((aligned(8)));
|
||||
struct pv_disk pvd __attribute__((aligned(8)));
|
||||
struct vg_disk vgd __attribute__((aligned(8)));
|
||||
struct dm_list uuids __attribute__((aligned(8)));
|
||||
struct dm_list lvds __attribute__((aligned(8)));
|
||||
struct pe_disk *extents __attribute__((aligned(8)));
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -163,7 +163,7 @@ static struct volume_group *_build_vg(struct format_instance *fid,
|
||||
|
||||
static struct volume_group *_format1_vg_read(struct format_instance *fid,
|
||||
const char *vg_name,
|
||||
struct metadata_area *mda __attribute((unused)))
|
||||
struct metadata_area *mda __attribute__((unused)))
|
||||
{
|
||||
struct dm_pool *mem = dm_pool_create("lvm1 vg_read", VG_MEMPOOL_CHUNK);
|
||||
struct dm_list pvs;
|
||||
@ -241,7 +241,7 @@ static int _flatten_vg(struct format_instance *fid, struct dm_pool *mem,
|
||||
}
|
||||
|
||||
static int _format1_vg_write(struct format_instance *fid, struct volume_group *vg,
|
||||
struct metadata_area *mda __attribute((unused)))
|
||||
struct metadata_area *mda __attribute__((unused)))
|
||||
{
|
||||
struct dm_pool *mem = dm_pool_create("lvm1 vg_write", VG_MEMPOOL_CHUNK);
|
||||
struct dm_list pvds;
|
||||
@ -262,8 +262,8 @@ static int _format1_vg_write(struct format_instance *fid, struct volume_group *v
|
||||
}
|
||||
|
||||
static int _format1_pv_read(const struct format_type *fmt, const char *pv_name,
|
||||
struct physical_volume *pv, struct dm_list *mdas __attribute((unused)),
|
||||
int scan_label_only __attribute((unused)))
|
||||
struct physical_volume *pv, struct dm_list *mdas __attribute__((unused)),
|
||||
int scan_label_only __attribute__((unused)))
|
||||
{
|
||||
struct dm_pool *mem = dm_pool_create("lvm1 pv_read", 1024);
|
||||
struct disk_list *dl;
|
||||
@ -296,13 +296,13 @@ static int _format1_pv_read(const struct format_type *fmt, const char *pv_name,
|
||||
static int _format1_pv_setup(const struct format_type *fmt,
|
||||
uint64_t pe_start, uint32_t extent_count,
|
||||
uint32_t extent_size,
|
||||
unsigned long data_alignment __attribute((unused)),
|
||||
unsigned long data_alignment_offset __attribute((unused)),
|
||||
int pvmetadatacopies __attribute((unused)),
|
||||
uint64_t pvmetadatasize __attribute((unused)),
|
||||
unsigned metadataignore __attribute((unused)),
|
||||
struct dm_list *mdas __attribute((unused)),
|
||||
struct physical_volume *pv, struct volume_group *vg __attribute((unused)))
|
||||
unsigned long data_alignment __attribute__((unused)),
|
||||
unsigned long data_alignment_offset __attribute__((unused)),
|
||||
int pvmetadatacopies __attribute__((unused)),
|
||||
uint64_t pvmetadatasize __attribute__((unused)),
|
||||
unsigned metadataignore __attribute__((unused)),
|
||||
struct dm_list *mdas __attribute__((unused)),
|
||||
struct physical_volume *pv, struct volume_group *vg __attribute__((unused)))
|
||||
{
|
||||
if (pv->size > MAX_PV_SIZE)
|
||||
pv->size--;
|
||||
@ -354,7 +354,7 @@ static int _format1_lv_setup(struct format_instance *fid, struct logical_volume
|
||||
}
|
||||
|
||||
static int _format1_pv_write(const struct format_type *fmt, struct physical_volume *pv,
|
||||
struct dm_list *mdas __attribute((unused)), int64_t sector __attribute((unused)))
|
||||
struct dm_list *mdas __attribute__((unused)), int64_t sector __attribute__((unused)))
|
||||
{
|
||||
struct dm_pool *mem;
|
||||
struct disk_list *dl;
|
||||
@ -439,7 +439,7 @@ static int _format1_vg_setup(struct format_instance *fid, struct volume_group *v
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int _format1_segtype_supported(struct format_instance *fid __attribute((unused)),
|
||||
static int _format1_segtype_supported(struct format_instance *fid __attribute__((unused)),
|
||||
const struct segment_type *segtype)
|
||||
{
|
||||
if (!(segtype->flags & SEG_FORMAT1_SUPPORT))
|
||||
@ -454,9 +454,9 @@ static struct metadata_area_ops _metadata_format1_ops = {
|
||||
};
|
||||
|
||||
static struct format_instance *_format1_create_instance(const struct format_type *fmt,
|
||||
const char *vgname __attribute((unused)),
|
||||
const char *vgid __attribute((unused)),
|
||||
void *private __attribute((unused)))
|
||||
const char *vgname __attribute__((unused)),
|
||||
const char *vgid __attribute__((unused)),
|
||||
void *private __attribute__((unused)))
|
||||
{
|
||||
struct format_instance *fid;
|
||||
struct metadata_area *mda;
|
||||
@ -482,7 +482,7 @@ static struct format_instance *_format1_create_instance(const struct format_type
|
||||
return fid;
|
||||
}
|
||||
|
||||
static void _format1_destroy_instance(struct format_instance *fid __attribute((unused)))
|
||||
static void _format1_destroy_instance(struct format_instance *fid __attribute__((unused)))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ static int _system_id(struct cmd_context *cmd, char *s, const char *prefix)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int export_pv(struct cmd_context *cmd, struct dm_pool *mem __attribute((unused)),
|
||||
int export_pv(struct cmd_context *cmd, struct dm_pool *mem __attribute__((unused)),
|
||||
struct volume_group *vg,
|
||||
struct pv_disk *pvd, struct physical_volume *pv)
|
||||
{
|
||||
@ -552,7 +552,7 @@ int export_lvs(struct disk_list *dl, struct volume_group *vg,
|
||||
/*
|
||||
* FIXME: More inefficient code.
|
||||
*/
|
||||
int import_snapshots(struct dm_pool *mem __attribute((unused)), struct volume_group *vg,
|
||||
int import_snapshots(struct dm_pool *mem __attribute__((unused)), struct volume_group *vg,
|
||||
struct dm_list *pvds)
|
||||
{
|
||||
struct logical_volume *lvs[MAX_LV];
|
||||
@ -641,7 +641,7 @@ int export_uuids(struct disk_list *dl, struct volume_group *vg)
|
||||
* This calculates the nasty pv_number field
|
||||
* used by LVM1.
|
||||
*/
|
||||
void export_numbers(struct dm_list *pvds, struct volume_group *vg __attribute((unused)))
|
||||
void export_numbers(struct dm_list *pvds, struct volume_group *vg __attribute__((unused)))
|
||||
{
|
||||
struct disk_list *dl;
|
||||
int pv_num = 1;
|
||||
|
@ -30,7 +30,7 @@ static void _not_supported(const char *op)
|
||||
op);
|
||||
}
|
||||
|
||||
static int _lvm1_can_handle(struct labeller *l __attribute((unused)), void *buf, uint64_t sector)
|
||||
static int _lvm1_can_handle(struct labeller *l __attribute__((unused)), void *buf, uint64_t sector)
|
||||
{
|
||||
struct pv_disk *pvd = (struct pv_disk *) buf;
|
||||
uint32_t version;
|
||||
@ -48,7 +48,7 @@ static int _lvm1_can_handle(struct labeller *l __attribute((unused)), void *buf,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int _lvm1_write(struct label *label __attribute((unused)), void *buf __attribute((unused)))
|
||||
static int _lvm1_write(struct label *label __attribute__((unused)), void *buf __attribute__((unused)))
|
||||
{
|
||||
_not_supported("write");
|
||||
return 0;
|
||||
@ -87,14 +87,14 @@ static int _lvm1_read(struct labeller *l, struct device *dev, void *buf,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int _lvm1_initialise_label(struct labeller *l __attribute((unused)), struct label *label)
|
||||
static int _lvm1_initialise_label(struct labeller *l __attribute__((unused)), struct label *label)
|
||||
{
|
||||
strcpy(label->type, "LVM1");
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void _lvm1_destroy_label(struct labeller *l __attribute((unused)), struct label *label __attribute((unused)))
|
||||
static void _lvm1_destroy_label(struct labeller *l __attribute__((unused)), struct label *label __attribute__((unused)))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -34,10 +34,10 @@
|
||||
#define CPOUT_64(x, y) {(y) = xlate64_be((x));}
|
||||
|
||||
static int __read_pool_disk(const struct format_type *fmt, struct device *dev,
|
||||
struct dm_pool *mem __attribute((unused)), struct pool_list *pl,
|
||||
const char *vg_name __attribute((unused)))
|
||||
struct dm_pool *mem __attribute__((unused)), struct pool_list *pl,
|
||||
const char *vg_name __attribute__((unused)))
|
||||
{
|
||||
char buf[512] __attribute((aligned(8)));
|
||||
char buf[512] __attribute__((aligned(8)));
|
||||
|
||||
/* FIXME: Need to check the cache here first */
|
||||
if (!dev_read(dev, UINT64_C(0), 512, buf)) {
|
||||
@ -58,7 +58,7 @@ static void _add_pl_to_list(struct dm_list *head, struct pool_list *data)
|
||||
|
||||
dm_list_iterate_items(pl, head) {
|
||||
if (id_equal(&data->pv_uuid, &pl->pv_uuid)) {
|
||||
char uuid[ID_LEN + 7] __attribute((aligned(8)));
|
||||
char uuid[ID_LEN + 7] __attribute__((aligned(8)));
|
||||
|
||||
id_write_format(&pl->pv_uuid, uuid, ID_LEN + 7);
|
||||
|
||||
@ -84,7 +84,7 @@ int read_pool_label(struct pool_list *pl, struct labeller *l,
|
||||
struct lvmcache_info *info;
|
||||
struct id pvid;
|
||||
struct id vgid;
|
||||
char uuid[ID_LEN + 7] __attribute((aligned(8)));
|
||||
char uuid[ID_LEN + 7] __attribute__((aligned(8)));
|
||||
struct pool_disk *pd = &pl->pd;
|
||||
|
||||
pool_label_in(pd, buf);
|
||||
|
@ -158,7 +158,7 @@ static struct volume_group *_build_vg_from_pds(struct format_instance
|
||||
|
||||
static struct volume_group *_pool_vg_read(struct format_instance *fid,
|
||||
const char *vg_name,
|
||||
struct metadata_area *mda __attribute((unused)))
|
||||
struct metadata_area *mda __attribute__((unused)))
|
||||
{
|
||||
struct dm_pool *mem = dm_pool_create("pool vg_read", VG_MEMPOOL_CHUNK);
|
||||
struct dm_list pds;
|
||||
@ -188,26 +188,26 @@ out:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int _pool_pv_setup(const struct format_type *fmt __attribute((unused)),
|
||||
uint64_t pe_start __attribute((unused)),
|
||||
uint32_t extent_count __attribute((unused)),
|
||||
uint32_t extent_size __attribute((unused)),
|
||||
unsigned long data_alignment __attribute((unused)),
|
||||
unsigned long data_alignment_offset __attribute((unused)),
|
||||
int pvmetadatacopies __attribute((unused)),
|
||||
uint64_t pvmetadatasize __attribute((unused)),
|
||||
unsigned metadataignore __attribute((unused)),
|
||||
struct dm_list *mdas __attribute((unused)),
|
||||
struct physical_volume *pv __attribute((unused)),
|
||||
struct volume_group *vg __attribute((unused)))
|
||||
static int _pool_pv_setup(const struct format_type *fmt __attribute__((unused)),
|
||||
uint64_t pe_start __attribute__((unused)),
|
||||
uint32_t extent_count __attribute__((unused)),
|
||||
uint32_t extent_size __attribute__((unused)),
|
||||
unsigned long data_alignment __attribute__((unused)),
|
||||
unsigned long data_alignment_offset __attribute__((unused)),
|
||||
int pvmetadatacopies __attribute__((unused)),
|
||||
uint64_t pvmetadatasize __attribute__((unused)),
|
||||
unsigned metadataignore __attribute__((unused)),
|
||||
struct dm_list *mdas __attribute__((unused)),
|
||||
struct physical_volume *pv __attribute__((unused)),
|
||||
struct volume_group *vg __attribute__((unused)))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int _pool_pv_read(const struct format_type *fmt, const char *pv_name,
|
||||
struct physical_volume *pv,
|
||||
struct dm_list *mdas __attribute((unused)),
|
||||
int scan_label_only __attribute((unused)))
|
||||
struct dm_list *mdas __attribute__((unused)),
|
||||
int scan_label_only __attribute__((unused)))
|
||||
{
|
||||
struct dm_pool *mem = dm_pool_create("pool pv_read", 1024);
|
||||
struct pool_list *pl;
|
||||
@ -249,9 +249,9 @@ static struct metadata_area_ops _metadata_format_pool_ops = {
|
||||
/* *INDENT-ON* */
|
||||
|
||||
static struct format_instance *_pool_create_instance(const struct format_type *fmt,
|
||||
const char *vgname __attribute((unused)),
|
||||
const char *vgid __attribute((unused)),
|
||||
void *private __attribute((unused)))
|
||||
const char *vgname __attribute__((unused)),
|
||||
const char *vgid __attribute__((unused)),
|
||||
void *private __attribute__((unused)))
|
||||
{
|
||||
struct format_instance *fid;
|
||||
struct metadata_area *mda;
|
||||
@ -282,7 +282,7 @@ static struct format_instance *_pool_create_instance(const struct format_type *f
|
||||
return fid;
|
||||
}
|
||||
|
||||
static void _pool_destroy_instance(struct format_instance *fid __attribute((unused)))
|
||||
static void _pool_destroy_instance(struct format_instance *fid __attribute__((unused)))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ static void _pool_not_supported(const char *op)
|
||||
op);
|
||||
}
|
||||
|
||||
static int _pool_can_handle(struct labeller *l __attribute((unused)), void *buf, uint64_t sector)
|
||||
static int _pool_can_handle(struct labeller *l __attribute__((unused)), void *buf, uint64_t sector)
|
||||
{
|
||||
|
||||
struct pool_disk pd;
|
||||
@ -50,7 +50,7 @@ static int _pool_can_handle(struct labeller *l __attribute((unused)), void *buf,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int _pool_write(struct label *label __attribute((unused)), void *buf __attribute((unused)))
|
||||
static int _pool_write(struct label *label __attribute__((unused)), void *buf __attribute__((unused)))
|
||||
{
|
||||
_pool_not_supported("write");
|
||||
return 0;
|
||||
@ -64,14 +64,14 @@ static int _pool_read(struct labeller *l, struct device *dev, void *buf,
|
||||
return read_pool_label(&pl, l, dev, buf, label);
|
||||
}
|
||||
|
||||
static int _pool_initialise_label(struct labeller *l __attribute((unused)), struct label *label)
|
||||
static int _pool_initialise_label(struct labeller *l __attribute__((unused)), struct label *label)
|
||||
{
|
||||
strcpy(label->type, "POOL");
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void _pool_destroy_label(struct labeller *l __attribute((unused)), struct label *label __attribute((unused)))
|
||||
static void _pool_destroy_label(struct labeller *l __attribute__((unused)), struct label *label __attribute__((unused)))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,7 @@ static int _out_with_comment_file(struct formatter *f, const char *comment,
|
||||
}
|
||||
|
||||
static int _out_with_comment_raw(struct formatter *f,
|
||||
const char *comment __attribute((unused)),
|
||||
const char *comment __attribute__((unused)),
|
||||
const char *fmt, va_list ap)
|
||||
{
|
||||
int n;
|
||||
@ -413,7 +413,7 @@ static const char *_get_pv_name_from_uuid(struct formatter *f, char *uuid)
|
||||
|
||||
static const char *_get_pv_name(struct formatter *f, struct physical_volume *pv)
|
||||
{
|
||||
char uuid[64] __attribute((aligned(8)));
|
||||
char uuid[64] __attribute__((aligned(8)));
|
||||
|
||||
if (!pv || !id_write_format(&pv->id, uuid, sizeof(uuid)))
|
||||
return_NULL;
|
||||
|
@ -80,7 +80,7 @@ void rlocn_set_ignored(struct raw_locn *rlocn, unsigned mda_ignored)
|
||||
* NOTE: Currently there can be only one vg per text file.
|
||||
*/
|
||||
|
||||
static int _text_vg_setup(struct format_instance *fid __attribute((unused)),
|
||||
static int _text_vg_setup(struct format_instance *fid __attribute__((unused)),
|
||||
struct volume_group *vg)
|
||||
{
|
||||
if (vg->extent_size & (vg->extent_size - 1)) {
|
||||
@ -108,7 +108,7 @@ static uint64_t _mda_total_sectors_raw(struct metadata_area *mda)
|
||||
/*
|
||||
* Check if metadata area belongs to vg
|
||||
*/
|
||||
static int _mda_in_vg_raw(struct format_instance *fid __attribute((unused)),
|
||||
static int _mda_in_vg_raw(struct format_instance *fid __attribute__((unused)),
|
||||
struct volume_group *vg, struct metadata_area *mda)
|
||||
{
|
||||
struct mda_context *mdac = (struct mda_context *) mda->metadata_locn;
|
||||
@ -279,7 +279,7 @@ static int _pv_analyze_mda_raw (const struct format_type * fmt,
|
||||
|
||||
|
||||
|
||||
static int _text_lv_setup(struct format_instance *fid __attribute((unused)),
|
||||
static int _text_lv_setup(struct format_instance *fid __attribute__((unused)),
|
||||
struct logical_volume *lv)
|
||||
{
|
||||
/******** FIXME Any LV size restriction?
|
||||
@ -396,7 +396,7 @@ static struct raw_locn *_find_vg_rlocn(struct device_area *dev_area,
|
||||
int *precommitted)
|
||||
{
|
||||
size_t len;
|
||||
char vgnamebuf[NAME_LEN + 2] __attribute((aligned(8)));
|
||||
char vgnamebuf[NAME_LEN + 2] __attribute__((aligned(8)));
|
||||
struct raw_locn *rlocn, *rlocn_precommitted;
|
||||
struct lvmcache_info *info;
|
||||
|
||||
@ -892,7 +892,7 @@ static struct volume_group *_vg_read_precommit_file(struct format_instance *fid,
|
||||
return vg;
|
||||
}
|
||||
|
||||
static int _vg_write_file(struct format_instance *fid __attribute((unused)),
|
||||
static int _vg_write_file(struct format_instance *fid __attribute__((unused)),
|
||||
struct volume_group *vg, struct metadata_area *mda)
|
||||
{
|
||||
struct text_context *tc = (struct text_context *) mda->metadata_locn;
|
||||
@ -958,7 +958,7 @@ static int _vg_write_file(struct format_instance *fid __attribute((unused)),
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int _vg_commit_file_backup(struct format_instance *fid __attribute((unused)),
|
||||
static int _vg_commit_file_backup(struct format_instance *fid __attribute__((unused)),
|
||||
struct volume_group *vg,
|
||||
struct metadata_area *mda)
|
||||
{
|
||||
@ -1025,8 +1025,8 @@ static int _vg_commit_file(struct format_instance *fid, struct volume_group *vg,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int _vg_remove_file(struct format_instance *fid __attribute((unused)),
|
||||
struct volume_group *vg __attribute((unused)),
|
||||
static int _vg_remove_file(struct format_instance *fid __attribute__((unused)),
|
||||
struct volume_group *vg __attribute__((unused)),
|
||||
struct metadata_area *mda)
|
||||
{
|
||||
struct text_context *tc = (struct text_context *) mda->metadata_locn;
|
||||
@ -1105,8 +1105,8 @@ const char *vgname_from_mda(const struct format_type *fmt,
|
||||
uint32_t wrap = 0;
|
||||
const char *vgname = NULL;
|
||||
unsigned int len = 0;
|
||||
char buf[NAME_LEN + 1] __attribute((aligned(8)));
|
||||
char uuid[64] __attribute((aligned(8)));
|
||||
char buf[NAME_LEN + 1] __attribute__((aligned(8)));
|
||||
char uuid[64] __attribute__((aligned(8)));
|
||||
uint64_t buffer_size, current_usage;
|
||||
|
||||
if (mda_free_sectors)
|
||||
@ -1251,7 +1251,7 @@ static int _mda_setup(const struct format_type *fmt,
|
||||
int pvmetadatacopies, uint64_t pvmetadatasize,
|
||||
unsigned metadataignore, struct dm_list *mdas,
|
||||
struct physical_volume *pv,
|
||||
struct volume_group *vg __attribute((unused)))
|
||||
struct volume_group *vg __attribute__((unused)))
|
||||
{
|
||||
uint64_t mda_adjustment, disk_size, alignment, alignment_offset;
|
||||
uint64_t start1, mda_size1; /* First area - start of disk */
|
||||
@ -1407,7 +1407,7 @@ static int _text_pv_write(const struct format_type *fmt, struct physical_volume
|
||||
struct lvmcache_info *info;
|
||||
struct mda_context *mdac;
|
||||
struct metadata_area *mda;
|
||||
char buf[MDA_HEADER_SIZE] __attribute((aligned(8)));
|
||||
char buf[MDA_HEADER_SIZE] __attribute__((aligned(8)));
|
||||
struct mda_header *mdah = (struct mda_header *) buf;
|
||||
uint64_t adjustment;
|
||||
struct data_area_list *da;
|
||||
@ -1689,7 +1689,7 @@ static int _text_pv_read(const struct format_type *fmt, const char *pv_name,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void _text_destroy_instance(struct format_instance *fid __attribute((unused)))
|
||||
static void _text_destroy_instance(struct format_instance *fid __attribute__((unused)))
|
||||
{
|
||||
}
|
||||
|
||||
@ -2106,7 +2106,7 @@ static int _get_config_disk_area(struct cmd_context *cmd,
|
||||
}
|
||||
|
||||
if (!(dev_area.dev = device_from_pvid(cmd, &id, NULL))) {
|
||||
char buffer[64] __attribute((aligned(8)));
|
||||
char buffer[64] __attribute__((aligned(8)));
|
||||
|
||||
if (!id_write_format(&id, buffer, sizeof(buffer)))
|
||||
log_error("Couldn't find device.");
|
||||
|
@ -156,9 +156,9 @@ static int _read_flag_config(struct config_node *n, uint64_t *status, int type)
|
||||
|
||||
static int _read_pv(struct format_instance *fid, struct dm_pool *mem,
|
||||
struct volume_group *vg, struct config_node *pvn,
|
||||
struct config_node *vgn __attribute((unused)),
|
||||
struct config_node *vgn __attribute__((unused)),
|
||||
struct dm_hash_table *pv_hash,
|
||||
struct dm_hash_table *lv_hash __attribute((unused)),
|
||||
struct dm_hash_table *lv_hash __attribute__((unused)),
|
||||
unsigned *scan_done_once,
|
||||
unsigned report_missing_devices)
|
||||
{
|
||||
@ -194,7 +194,7 @@ static int _read_pv(struct format_instance *fid, struct dm_pool *mem,
|
||||
* Convert the uuid into a device.
|
||||
*/
|
||||
if (!(pv->dev = device_from_pvid(fid->fmt->cmd, &pv->id, scan_done_once))) {
|
||||
char buffer[64] __attribute((aligned(8)));
|
||||
char buffer[64] __attribute__((aligned(8)));
|
||||
|
||||
if (!id_write_format(&pv->id, buffer, sizeof(buffer)))
|
||||
buffer[0] = '\0';
|
||||
@ -491,14 +491,14 @@ static int _read_segments(struct dm_pool *mem, struct volume_group *vg,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int _read_lvnames(struct format_instance *fid __attribute((unused)),
|
||||
static int _read_lvnames(struct format_instance *fid __attribute__((unused)),
|
||||
struct dm_pool *mem,
|
||||
struct volume_group *vg, struct config_node *lvn,
|
||||
struct config_node *vgn __attribute((unused)),
|
||||
struct dm_hash_table *pv_hash __attribute((unused)),
|
||||
struct config_node *vgn __attribute__((unused)),
|
||||
struct dm_hash_table *pv_hash __attribute__((unused)),
|
||||
struct dm_hash_table *lv_hash,
|
||||
unsigned *scan_done_once __attribute((unused)),
|
||||
unsigned report_missing_devices __attribute((unused)))
|
||||
unsigned *scan_done_once __attribute__((unused)),
|
||||
unsigned report_missing_devices __attribute__((unused)))
|
||||
{
|
||||
struct logical_volume *lv;
|
||||
struct config_node *cn;
|
||||
@ -563,14 +563,14 @@ static int _read_lvnames(struct format_instance *fid __attribute((unused)),
|
||||
return link_lv_to_vg(vg, lv);
|
||||
}
|
||||
|
||||
static int _read_lvsegs(struct format_instance *fid __attribute((unused)),
|
||||
static int _read_lvsegs(struct format_instance *fid __attribute__((unused)),
|
||||
struct dm_pool *mem,
|
||||
struct volume_group *vg, struct config_node *lvn,
|
||||
struct config_node *vgn __attribute((unused)),
|
||||
struct config_node *vgn __attribute__((unused)),
|
||||
struct dm_hash_table *pv_hash,
|
||||