package init
This commit is contained in:
parent
17f8f9f4d8
commit
7fcf2fc3c3
5422
0000-dmraid-1.0.0.rc16-test_devices.patch
Normal file
5422
0000-dmraid-1.0.0.rc16-test_devices.patch
Normal file
File diff suppressed because it is too large
Load Diff
21
0001-ddf1_lsi_persistent_name.patch
Normal file
21
0001-ddf1_lsi_persistent_name.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
diff --git a/lib/format/ddf/ddf1.c.lsi_name b/lib/format/ddf/ddf1.c
|
||||||
|
index 05b550b..c8e484b 100644
|
||||||
|
--- a/lib/format/ddf/ddf1.c
|
||||||
|
+++ b/lib/format/ddf/ddf1.c
|
||||||
|
@@ -696,6 +696,16 @@ name(struct lib_context *lc, struct ddf1 *ddf1, struct raid_dev *rd)
|
||||||
|
sprintf(b, "%02x%02x%02x%02x",
|
||||||
|
vd->guid[i], vd->guid[i + 1],
|
||||||
|
vd->guid[i + 2], vd->guid[i + 3]);
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * Because the LSI bios changes the timestamp in the
|
||||||
|
+ * metadata on every boot, we have to neutralize it
|
||||||
|
+ * in order to allow for persistent names.
|
||||||
|
+ *
|
||||||
|
+ * Using a dummy string "47114711" for that.
|
||||||
|
+ */
|
||||||
|
+ if (!strncmp((char *) vd->guid, "LSI", 3))
|
||||||
|
+ strncpy(buf + prefix + 32, "47114711", 8);
|
||||||
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
15
0002-pdc_raid10_failure.patch
Normal file
15
0002-pdc_raid10_failure.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
diff --git a/lib/format/ataraid/pdc.c.raid10_failure b/lib/format/ataraid/pdc.c
|
||||||
|
index b0bb652..8b14d71 100644
|
||||||
|
--- a/lib/format/ataraid/pdc.c
|
||||||
|
+++ b/lib/format/ataraid/pdc.c
|
||||||
|
@@ -490,7 +490,9 @@ devices(struct raid_dev *rd, void *context)
|
||||||
|
if (context && pdc->raid.type != PDC_T_SPAN)
|
||||||
|
*((uint64_t *) context) += rd->sectors;
|
||||||
|
|
||||||
|
- return pdc->raid.total_disks;
|
||||||
|
+ return is_raid10(pdc) ?
|
||||||
|
+ pdc->raid.total_disks / 2 :
|
||||||
|
+ pdc->raid.total_disks;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
22
0003-return_error_wo_disks.patch
Normal file
22
0003-return_error_wo_disks.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
|
||||||
|
index eb8af10..4da6b64 100644
|
||||||
|
--- a/lib/metadata/metadata.c
|
||||||
|
+++ b/lib/metadata/metadata.c
|
||||||
|
@@ -2096,7 +2096,7 @@ get_metadata(struct lib_context *lc, enum action action,
|
||||||
|
|
||||||
|
if (!count_devices(lc, DEVICE)) {
|
||||||
|
log_print(lc, "no block devices found");
|
||||||
|
- return 1;
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(M_RAID & p->metadata))
|
||||||
|
@@ -2118,7 +2118,7 @@ get_metadata(struct lib_context *lc, enum action action,
|
||||||
|
if (!OPT_HOT_SPARE_SET(lc) && !OPT_CREATE(lc)
|
||||||
|
&& !count_devices(lc, RAID)) {
|
||||||
|
format_error(lc, "disks", argv);
|
||||||
|
- return 1;
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (M_SET & p->metadata) {
|
||||||
57
0004-fix_sil_jbod.patch
Normal file
57
0004-fix_sil_jbod.patch
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
diff --git a/lib/format/ataraid/sil.c.fix_sil_jbod b/lib/format/ataraid/sil.c
|
||||||
|
index 6089682..8c3df38 100644
|
||||||
|
--- a/lib/format/ataraid/sil.c.fix_sil_jbod
|
||||||
|
+++ b/lib/format/ataraid/sil.c
|
||||||
|
@@ -1,8 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Silicon Image Medley ATARAID metadata format handler.
|
||||||
|
*
|
||||||
|
- * Copyright (C) 2004,2005 Heinz Mauelshagen, Red Hat GmbH.
|
||||||
|
- * All rights reserved.
|
||||||
|
+ * Copyright (C) 2004,2005,2009 Heinz Mauelshagen, Red Hat GmbH.
|
||||||
|
+ * All rights reserved.
|
||||||
|
*
|
||||||
|
* See file LICENSE at the top of this source tree for license information.
|
||||||
|
*/
|
||||||
|
@@ -166,6 +166,16 @@ sil_valid(struct lib_context *lc, struct dev_info *di,
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
+/* Return number of array sectors. */
|
||||||
|
+static uint64_t
|
||||||
|
+array_size(struct raid_dev *rd)
|
||||||
|
+{
|
||||||
|
+ struct sil *sil = META(rd, sil);
|
||||||
|
+
|
||||||
|
+ return (((uint64_t) sil->array_sectors_high) << 32) +
|
||||||
|
+ sil->array_sectors_low;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static void
|
||||||
|
free_sils(struct sil **sils, unsigned int i)
|
||||||
|
{
|
||||||
|
@@ -381,6 +391,10 @@ devices(struct raid_dev *rd, void *context)
|
||||||
|
struct sil *sil = META(rd, sil);
|
||||||
|
|
||||||
|
switch (sil->type) {
|
||||||
|
+ case SIL_T_JBOD:
|
||||||
|
+ ret = array_size(rd) < rd->sectors ?
|
||||||
|
+ 1 : sil->drives_per_striped_set;
|
||||||
|
+ break;
|
||||||
|
case SIL_T_RAID0:
|
||||||
|
case SIL_T_RAID10:
|
||||||
|
ret = sil->drives_per_striped_set;
|
||||||
|
@@ -519,12 +533,9 @@ stripes(struct sil *sil)
|
||||||
|
static uint64_t
|
||||||
|
sectors(struct raid_dev *rd)
|
||||||
|
{
|
||||||
|
- uint64_t array_sectors, ret = 0;
|
||||||
|
+ uint64_t array_sectors = array_size(rd), ret = 0;
|
||||||
|
struct sil *sil = META(rd, sil);
|
||||||
|
|
||||||
|
- array_sectors = (((uint64_t) sil->array_sectors_high) << 32) +
|
||||||
|
- sil->array_sectors_low;
|
||||||
|
-
|
||||||
|
switch (sil->type) {
|
||||||
|
case SIL_T_SPARE:
|
||||||
|
/* Cook them up... */
|
||||||
31
0005-avoid_register.patch
Normal file
31
0005-avoid_register.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
diff --git a/lib/activate/activate.c.avoid_register b/lib/activate/activate.c
|
||||||
|
index 1d71ea8..86882f7 100644
|
||||||
|
--- a/lib/activate/activate.c.avoid_register
|
||||||
|
+++ b/lib/activate/activate.c
|
||||||
|
@@ -964,11 +964,13 @@ activate_subset(struct lib_context *lc, struct raid_set *rs, enum dm_what what)
|
||||||
|
{
|
||||||
|
int ret = 0;
|
||||||
|
char *table = NULL;
|
||||||
|
+ struct dmraid_format *fmt = get_format(rs);
|
||||||
|
|
||||||
|
if (T_GROUP(rs))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
- if (what == DM_REGISTER)
|
||||||
|
+ if (what == DM_REGISTER &&
|
||||||
|
+ fmt->metadata_handler)
|
||||||
|
return register_devices(lc, rs);
|
||||||
|
|
||||||
|
/* Call type handler */
|
||||||
|
@@ -1053,8 +1055,10 @@ deactivate_superset(struct lib_context *lc, struct raid_set *rs,
|
||||||
|
enum dm_what what)
|
||||||
|
{
|
||||||
|
int ret = 1, status;
|
||||||
|
+ struct dmraid_format *fmt = get_format(rs);
|
||||||
|
|
||||||
|
- if (what == DM_REGISTER)
|
||||||
|
+ if (what == DM_REGISTER &&
|
||||||
|
+ fmt->metadata_handler)
|
||||||
|
return unregister_devices(lc, rs);
|
||||||
|
|
||||||
|
status = dm_status(lc, rs);
|
||||||
14
0006-move_pattern_file_to_var.patch
Normal file
14
0006-move_pattern_file_to_var.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
diff --git a/logwatch/dmeventd.var_cache_logwatch b/logwatch/dmeventd
|
||||||
|
index 9b01676..9bc262d 100644
|
||||||
|
--- a/logwatch/dmeventd.var_cache_logwatch
|
||||||
|
+++ b/logwatch/dmeventd
|
||||||
|
@@ -36,8 +36,7 @@
|
||||||
|
# Set the location of the folder to store last time stamp
|
||||||
|
# (This is used to record the last log sent out so repeats
|
||||||
|
# are not mailed in error.)
|
||||||
|
-$syslogpattern_file =
|
||||||
|
- "/etc/logwatch/scripts/services/dmeventd_syslogpattern.txt";
|
||||||
|
+$syslogpattern_file = "/var/cache/logwatch/dmeventd/syslogpattern.txt";
|
||||||
|
|
||||||
|
if (-e $syslogpattern_file) {
|
||||||
|
open(FD, "+<", $syslogpattern_file) or die $!;
|
||||||
12
0007-libversion.patch
Normal file
12
0007-libversion.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff --git a/lib/version.h.libversion b/lib/version.h
|
||||||
|
index c0e4e68..ca7369b 100644
|
||||||
|
--- a/lib/version.h.libversion
|
||||||
|
+++ b/lib/version.h
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
#ifndef DMRAID_LIB_VERSION
|
||||||
|
|
||||||
|
-#define DMRAID_LIB_VERSION "1.0.0.rc16"
|
||||||
|
+#define DMRAID_LIB_VERSION "1"
|
||||||
|
|
||||||
|
#define DMRAID_LIB_MAJOR_VERSION 1
|
||||||
|
#define DMRAID_LIB_MINOR_VERSION 0
|
||||||
43
0008-libversion-display.patch
Normal file
43
0008-libversion-display.patch
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
diff --git a/lib/misc/lib_context.c b/lib/misc/lib_context.c
|
||||||
|
index f1995e1..00023e7 100644
|
||||||
|
--- a/lib/misc/lib_context.c
|
||||||
|
+++ b/lib/misc/lib_context.c
|
||||||
|
@@ -138,25 +138,30 @@ init_paths(struct lib_context *lc, void *arg)
|
||||||
|
static void
|
||||||
|
init_version(struct lib_context *lc, void *arg)
|
||||||
|
{
|
||||||
|
- lc->version.text = DMRAID_LIB_VERSION;
|
||||||
|
+ static char version[80];
|
||||||
|
+
|
||||||
|
+ lc->version.text = version;
|
||||||
|
lc->version.date = DMRAID_LIB_DATE;
|
||||||
|
lc->version.v.major = DMRAID_LIB_MAJOR_VERSION;
|
||||||
|
lc->version.v.minor = DMRAID_LIB_MINOR_VERSION;
|
||||||
|
lc->version.v.sub_minor = DMRAID_LIB_SUBMINOR_VERSION;
|
||||||
|
lc->version.v.suffix = DMRAID_LIB_VERSION_SUFFIX;
|
||||||
|
+ snprintf(version, sizeof(version), "%d.%d.%d.%s",
|
||||||
|
+ lc->version.v.major, lc->version.v.minor,
|
||||||
|
+ lc->version.v.sub_minor, lc->version.v.suffix);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Put init functions into an array because of the potentially growing list. */
|
||||||
|
struct init_fn {
|
||||||
|
void (*func) (struct lib_context * lc, void *arg);
|
||||||
|
} init_fn[] = {
|
||||||
|
- {
|
||||||
|
- init_options}, {
|
||||||
|
- init_cmd}, {
|
||||||
|
- init_lists}, {
|
||||||
|
- init_mode}, {
|
||||||
|
- init_paths}, {
|
||||||
|
-init_version},};
|
||||||
|
+ { init_options},
|
||||||
|
+ { init_cmd},
|
||||||
|
+ { init_lists},
|
||||||
|
+ { init_mode},
|
||||||
|
+ { init_paths},
|
||||||
|
+ { init_version},
|
||||||
|
+};
|
||||||
|
|
||||||
|
struct lib_context *
|
||||||
|
alloc_lib_context(char **argv)
|
||||||
@ -0,0 +1,88 @@
|
|||||||
|
--- a/lib/activate/activate.c
|
||||||
|
+++ a/lib/activate/activate.c
|
||||||
|
@@ -370,7 +370,10 @@ get_dm_devs(struct raid_set *rs, int valid)
|
||||||
|
return ret + get_rds(rs, valid);
|
||||||
|
}
|
||||||
|
|
||||||
|
-/* Retrieve number of drive to rebuild from metadata format handler. */
|
||||||
|
+/* Retrieve number of drive to rebuild from metadata format handler.
|
||||||
|
+ *
|
||||||
|
+ * Returns number of drive to rebuild or -1 if there is no drive to rebuild
|
||||||
|
+ */
|
||||||
|
static int
|
||||||
|
get_rebuild_drive(struct lib_context *lc, struct raid_set *rs,
|
||||||
|
struct handler_info *info)
|
||||||
|
@@ -378,25 +381,23 @@ get_rebuild_drive(struct lib_context *lc, struct raid_set *rs,
|
||||||
|
/* Initialize drive to rebuild invalid. */
|
||||||
|
info->data.i32 = -1;
|
||||||
|
|
||||||
|
- if (lc->options[LC_REBUILD_SET].opt) {
|
||||||
|
- struct raid_dev *rd;
|
||||||
|
+ struct raid_dev *rd;
|
||||||
|
|
||||||
|
- if (list_empty(&rs->devs))
|
||||||
|
- LOG_ERR(lc, 0, "RAID set has no devices!");
|
||||||
|
+ if (list_empty(&rs->devs))
|
||||||
|
+ LOG_ERR(lc, 0, "RAID set has no devices!");
|
||||||
|
|
||||||
|
- rd = list_entry(rs->devs.next, typeof(*rd), devs);
|
||||||
|
- if (rd->fmt->metadata_handler) {
|
||||||
|
- if (!rd->
|
||||||
|
- fmt->metadata_handler(lc, GET_REBUILD_DRIVE_NO,
|
||||||
|
- info, rs))
|
||||||
|
- LOG_ERR(lc, 0, "Can't get rebuild drive #!");
|
||||||
|
- } else
|
||||||
|
- LOG_ERR(lc, 0,
|
||||||
|
- "Can't rebuild w/o metadata_handler for %s",
|
||||||
|
- rd->fmt->name);
|
||||||
|
- }
|
||||||
|
+ rd = list_entry(rs->devs.next, typeof(*rd), devs);
|
||||||
|
+ if (rd->fmt->metadata_handler) {
|
||||||
|
+ if (!rd->
|
||||||
|
+ fmt->metadata_handler(lc, GET_REBUILD_DRIVE_NO,
|
||||||
|
+ info, rs))
|
||||||
|
+ LOG_ERR(lc, 0, "Can't get rebuild drive #!");
|
||||||
|
+ } else
|
||||||
|
+ LOG_ERR(lc, 0,
|
||||||
|
+ "Can't rebuild w/o metadata_handler for %s",
|
||||||
|
+ rd->fmt->name);
|
||||||
|
|
||||||
|
- return 1;
|
||||||
|
+ return info->data.i32;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return true if RAID set needs rebuilding. */
|
||||||
|
@@ -458,7 +459,7 @@ dm_raid1(struct lib_context *lc, char **table, struct raid_set *rs)
|
||||||
|
*/
|
||||||
|
need_sync = rs_need_sync(rs);
|
||||||
|
rebuild_drive.data.i32 = -1;
|
||||||
|
- if (need_sync && !get_rebuild_drive(lc, rs, &rebuild_drive))
|
||||||
|
+ if (need_sync && get_rebuild_drive(lc, rs, &rebuild_drive) < 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (!_dm_raid1_bol(lc, table, rs, sectors, mirrors, need_sync))
|
||||||
|
@@ -540,7 +541,7 @@ _dm_raid45_bol(struct lib_context *lc, char **table, struct raid_set *rs,
|
||||||
|
|
||||||
|
/* Get drive as rebuild target. */
|
||||||
|
rebuild_drive.data.i32 = -1;
|
||||||
|
- if (need_sync && !get_rebuild_drive(lc, rs, &rebuild_drive))
|
||||||
|
+ if (need_sync && get_rebuild_drive(lc, rs, &rebuild_drive) < 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return p_fmt(lc, table, "0 %U %s core 2 %u %s %s 1 %u %u %d",
|
||||||
|
--- a/lib/format/ataraid/isw.c
|
||||||
|
+++ a/lib/format/ataraid/isw.c
|
||||||
|
@@ -1302,11 +1302,9 @@ isw_metadata_handler(struct lib_context *lc, enum handler_commands command,
|
||||||
|
case GET_REBUILD_DRIVE_NO:
|
||||||
|
rd = list_entry(rs->devs.next, typeof(*rd), devs);
|
||||||
|
isw = META(rd, isw);
|
||||||
|
- idx = rd_idx_by_name(isw, lc->options[LC_REBUILD_SET].arg.str);
|
||||||
|
- if (idx < 0)
|
||||||
|
- return 0;
|
||||||
|
|
||||||
|
- dev = raiddev(isw, idx);
|
||||||
|
+ /* Get disk to rebuild index form metadata stored on first disk */
|
||||||
|
+ dev = raiddev(isw, 0);
|
||||||
|
disk = isw->disk;
|
||||||
|
|
||||||
|
if (info) {
|
||||||
176
0011-bz626417_19-enabling_registration_degraded_volume.patch
Normal file
176
0011-bz626417_19-enabling_registration_degraded_volume.patch
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
--- a/lib/events/libdmraid-events-isw.c
|
||||||
|
+++ a/lib/events/libdmraid-events-isw.c
|
||||||
|
@@ -308,6 +308,7 @@ static void __dso_dev_copy(struct dso_raid_dev *dst, struct dso_raid_dev *src)
|
||||||
|
strcpy(dst->name, src->name);
|
||||||
|
strcpy(dst->major_minor, src->major_minor);
|
||||||
|
dst->port = src->port;
|
||||||
|
+ dst->active = src->active;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Copy a struct dso_raid_dev. */
|
||||||
|
@@ -316,7 +317,7 @@ static void _dso_dev_copy(struct dso_raid_set *rs, struct dso_raid_dev *dst)
|
||||||
|
struct dso_raid_dev *src = rs->devs + rs->num_devs - 1;
|
||||||
|
|
||||||
|
if (rs->num_devs < 0)
|
||||||
|
- syslog(LOG_ERR, "Programatic error: num_devs < o");
|
||||||
|
+ syslog(LOG_ERR, "Programatic error: num_devs < 0");
|
||||||
|
|
||||||
|
if (src != dst)
|
||||||
|
__dso_dev_copy(dst, src);
|
||||||
|
@@ -595,7 +596,7 @@ static int _get_sysfs_major_minor(const char *d_name, char *major_minor,
|
||||||
|
* Retrieve device properties for @dev_name from sysfs
|
||||||
|
* (major:minor and port number) into @dev.
|
||||||
|
*
|
||||||
|
- * Return 0 for failure, 0 for success.
|
||||||
|
+ * Return 1 for failure, 0 for success.
|
||||||
|
*/
|
||||||
|
/* FIXME: straighten this by using libsysfs ? */
|
||||||
|
static int _set_raid_dev_properties(const char *dev_name,
|
||||||
|
@@ -611,11 +612,11 @@ static int _set_raid_dev_properties(const char *dev_name,
|
||||||
|
|
||||||
|
/* Get major:minor of this RAID device. */
|
||||||
|
if (_get_sysfs_major_minor(dev_name, dev->major_minor, log_type))
|
||||||
|
- return -ENOENT;
|
||||||
|
+ return 1;
|
||||||
|
|
||||||
|
dir_entries = _scandir(sys_scsi_path, &dir_ent, _scandir_dot_filter);
|
||||||
|
if (dir_entries < 0)
|
||||||
|
- return -ENOENT;
|
||||||
|
+ return 1;
|
||||||
|
|
||||||
|
/* Remember length of initial sysfs path. */
|
||||||
|
strcpy(path, sys_scsi_path);
|
||||||
|
@@ -788,8 +789,8 @@ static struct dso_raid_set *_add_raid_dev(struct dso_raid_set *rs,
|
||||||
|
grown_raid_set->devs + grown_raid_set->num_devs - 1;
|
||||||
|
|
||||||
|
if (_set_raid_dev_properties(d_name, dev, log_type)) {
|
||||||
|
- dm_free(grown_raid_set);
|
||||||
|
- return NULL;
|
||||||
|
+ /* Unable to get device properties - reset them to initial values */
|
||||||
|
+ _dso_dev_init(dev);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -915,11 +916,9 @@ static struct dso_raid_set *_get_slave_devices(const char *rs_name,
|
||||||
|
|
||||||
|
/* Append to RAID sets list of RAID devices. */
|
||||||
|
rs = _add_raid_dev(rs, rs_name, d_name, log_type);
|
||||||
|
- if (!rs)
|
||||||
|
- break;
|
||||||
|
+ _check_raid_dev_active(d_name, rs->devs + rs->num_devs - 1);
|
||||||
|
|
||||||
|
dm_free(dir_ent[i]);
|
||||||
|
- _check_raid_dev_active(d_name, rs->devs + rs->num_devs - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
_destroy_dirent(dir_ent, i, dir_entries);
|
||||||
|
@@ -957,6 +956,7 @@ static struct dso_raid_set *_create_raid_set(const char *rs_name,
|
||||||
|
struct dm_task *dmt;
|
||||||
|
struct dm_info dev_info;
|
||||||
|
struct dirent *dent, **dir_ent;
|
||||||
|
+ struct dso_raid_dev *dev = NULL;
|
||||||
|
|
||||||
|
/* Get device Info. */
|
||||||
|
dmt = dm_task_create(DM_DEVICE_INFO);
|
||||||
|
@@ -1007,6 +1007,15 @@ static struct dso_raid_set *_create_raid_set(const char *rs_name,
|
||||||
|
free(dent);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /* Check if all devices are avaliable */
|
||||||
|
+ for (dev = rs->devs, i = 0; i < rs->num_devs; i++, dev++) {
|
||||||
|
+ /* If there is no major:minor number device is missing */
|
||||||
|
+ if (*dev->major_minor == '\0') {
|
||||||
|
+ /* Replace failed device with last device in set; reduce num_devs. */
|
||||||
|
+ _dso_dev_copy(rs, dev);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
return rs;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1292,13 +1301,13 @@ static enum disk_state_type _process_raid45_event(struct dm_task *dmt,
|
||||||
|
|
||||||
|
dev_status_str = args[num_devs + 1];
|
||||||
|
|
||||||
|
- /* Consistency check on num_devs and status chars. */
|
||||||
|
- i = _get_num_devs_from_status(dev_status_str);
|
||||||
|
- if (i != num_devs)
|
||||||
|
- goto err;
|
||||||
|
+ /* check if is it rebuilding in progress */
|
||||||
|
+ if (strchr(dev_status_str, 'i'))
|
||||||
|
+ return D_FAILURE_NOSYNC;
|
||||||
|
|
||||||
|
+ syslog(LOG_INFO, "dev_status_str= %s", dev_status_str);
|
||||||
|
/* Check for bad raid45 devices. */
|
||||||
|
- for (i = 0, p = dev_status_str; i < rs->num_devs; i++) {
|
||||||
|
+ for (i = 0, p = dev_status_str; i <= rs->num_devs; i++) {
|
||||||
|
/* Skip past any non active/dead identifiers. */
|
||||||
|
dead = *(p++) == 'D';
|
||||||
|
while (*p && *p != 'A' && *p != 'D')
|
||||||
|
@@ -1318,7 +1327,8 @@ static enum disk_state_type _process_raid45_event(struct dm_task *dmt,
|
||||||
|
/* Copy last device in set; reduce num_devs. */
|
||||||
|
_dso_dev_copy(rs, dev);
|
||||||
|
ret = D_FAILURE_DISK;
|
||||||
|
- }
|
||||||
|
+ } else
|
||||||
|
+ ret = D_FAILURE_NOSYNC;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
--- a/lib/register/dmreg.c
|
||||||
|
+++ a/lib/register/dmreg.c
|
||||||
|
@@ -374,6 +374,7 @@ static int _dm_raid_state(char *dev_name)
|
||||||
|
/* Skip past raid45 target chars. */
|
||||||
|
if (status[i] != 'p' &&
|
||||||
|
status[i] != 'i' &&
|
||||||
|
+ status[i] != 'D' &&
|
||||||
|
status[i] != 'A')
|
||||||
|
errors++;
|
||||||
|
}
|
||||||
|
@@ -422,17 +423,34 @@ static int _validate_dev_and_dso_names(char *dev_name, char *dso_name)
|
||||||
|
return (dso_name && _dm_valid_dso(dso_name)) ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+/*
|
||||||
|
+ * Function removes unnecassary path to the DSO library
|
||||||
|
+ * (leaves only library name)
|
||||||
|
+ */
|
||||||
|
+char * dso_lib_name_prepare(char * dso_path)
|
||||||
|
+{
|
||||||
|
+ char *ptr = NULL;
|
||||||
|
+ char *lib_name = dso_path;
|
||||||
|
+
|
||||||
|
+ while (ptr = strchr(lib_name, '/'))
|
||||||
|
+ lib_name = ptr + 1;
|
||||||
|
+
|
||||||
|
+ return lib_name;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/* Register a device to be monitored for events. */
|
||||||
|
/* FIXME: correct dev_name vs. _dm_raid_state() check of device. */
|
||||||
|
int dm_register_device(char *dev_name, char *dso_name)
|
||||||
|
{
|
||||||
|
- int errors, pending,
|
||||||
|
- ret = _validate_dev_and_dso_names(dev_name, dso_name);
|
||||||
|
+ int errors, pending,ret;
|
||||||
|
+ char *dso_lib_name = dso_lib_name_prepare(dso_name);
|
||||||
|
+
|
||||||
|
+ ret= _validate_dev_and_dso_names(dev_name, dso_lib_name);
|
||||||
|
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
- if (dm_monitored_events(&pending, dev_name, dso_name)) {
|
||||||
|
+ if (dm_monitored_events(&pending, dev_name, dso_lib_name)) {
|
||||||
|
printf("ERROR: device \"%s\" %s\n", dev_name,
|
||||||
|
pending ? "has a registration event pending" :
|
||||||
|
"is already being monitored");
|
||||||
|
@@ -452,7 +470,7 @@ int dm_register_device(char *dev_name, char *dso_name)
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (_dm_set_events(EVENTS_REGISTER, dev_name, dso_name)) {
|
||||||
|
+ if (_dm_set_events(EVENTS_REGISTER, dev_name, dso_lib_name)) {
|
||||||
|
printf("ERROR: Unable to register a device mapper "
|
||||||
|
"event handler for device \"%s\"\n", dev_name);
|
||||||
|
return 1;
|
||||||
63
0012-bz626417_20-cleanup_some_compilation_warning.patch
Normal file
63
0012-bz626417_20-cleanup_some_compilation_warning.patch
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
--- a/lib/events/libdmraid-events-isw.c
|
||||||
|
+++ a/lib/events/libdmraid-events-isw.c
|
||||||
|
@@ -101,13 +101,12 @@ enum rebuild_type { REBUILD_START, REBUILD_END };
|
||||||
|
static const char *default_dmraid_events_lib = "libdmraid-events.so";
|
||||||
|
static const char *sys_dm_dm = "dm-";
|
||||||
|
static const char *sys_block_path = "/sys/block/";
|
||||||
|
-static const char *sys_dm_path = "/sys/block/dm-";
|
||||||
|
+//static const char *sys_dm_path = "/sys/block/dm-";
|
||||||
|
static const char *sys_scsi_path = "/sys/class/scsi_device/";
|
||||||
|
static const char *sys_slaves_dir = "/slaves";
|
||||||
|
static const char *sys_scsi_dev_blk = "/device/block";
|
||||||
|
static const char sys_scsi_dev_blk_delims[] = { '/', ':' };
|
||||||
|
static const char *sys_dev_dir = "/dev";
|
||||||
|
-static const char *syslog_ident = "libdmraid-events";
|
||||||
|
|
||||||
|
/* Logging. */
|
||||||
|
enum log_type { LOG_NAMES, LOG_PORTS, LOG_OPEN_FAILURE, LOG_NONE };
|
||||||
|
@@ -1534,7 +1533,7 @@ int register_device(const char *rs_name, const char *uuid,
|
||||||
|
/* FIXME: need to run first to get syslog() to work. */
|
||||||
|
_check_sgpio();
|
||||||
|
|
||||||
|
- rs_name = basename(rs_name);
|
||||||
|
+ rs_name = basename((char *)rs_name);
|
||||||
|
|
||||||
|
/* Check for double registration attempt. */
|
||||||
|
pthread_mutex_lock(&_register_mutex);
|
||||||
|
@@ -1595,7 +1594,7 @@ int unregister_device(const char *rs_name, const char *uuid,
|
||||||
|
{
|
||||||
|
struct dso_raid_set *prev, *rs;
|
||||||
|
|
||||||
|
- rs_name = basename(rs_name);
|
||||||
|
+ rs_name = basename((char *)rs_name);
|
||||||
|
|
||||||
|
pthread_mutex_lock(&_register_mutex);
|
||||||
|
|
||||||
|
--- a/lib/format/ataraid/isw.c
|
||||||
|
+++ a/lib/format/ataraid/isw.c
|
||||||
|
@@ -1250,7 +1250,7 @@ static int
|
||||||
|
isw_metadata_handler(struct lib_context *lc, enum handler_commands command,
|
||||||
|
struct handler_info *info, void *context)
|
||||||
|
{
|
||||||
|
- int idx, ret = 0;
|
||||||
|
+ int ret = 0;
|
||||||
|
struct raid_set *rs = context;
|
||||||
|
struct raid_dev *rd = list_entry(rs->devs.next, struct raid_dev, devs);
|
||||||
|
struct isw *isw, *new_isw;
|
||||||
|
--- a/lib/register/dmreg.c
|
||||||
|
+++ a/lib/register/dmreg.c
|
||||||
|
@@ -427,12 +427,12 @@ static int _validate_dev_and_dso_names(char *dev_name, char *dso_name)
|
||||||
|
* Function removes unnecassary path to the DSO library
|
||||||
|
* (leaves only library name)
|
||||||
|
*/
|
||||||
|
-char * dso_lib_name_prepare(char * dso_path)
|
||||||
|
+char *dso_lib_name_prepare(char *dso_path)
|
||||||
|
{
|
||||||
|
char *ptr = NULL;
|
||||||
|
char *lib_name = dso_path;
|
||||||
|
|
||||||
|
- while (ptr = strchr(lib_name, '/'))
|
||||||
|
+ while ((ptr = strchr(lib_name, '/')) != NULL)
|
||||||
|
lib_name = ptr + 1;
|
||||||
|
|
||||||
|
return lib_name;
|
||||||
@ -0,0 +1,215 @@
|
|||||||
|
diff --git a/include/dmraid/lib_context.h b/include/dmraid/lib_context.h
|
||||||
|
index c2e16e6..c2b3c4d 100644
|
||||||
|
--- a/include/dmraid/lib_context.h
|
||||||
|
+++ b/include/dmraid/lib_context.h
|
||||||
|
@@ -46,7 +46,8 @@ enum lc_options {
|
||||||
|
LC_CREATE,
|
||||||
|
LC_REBUILD_SET,
|
||||||
|
LC_REBUILD_DISK,
|
||||||
|
- LC_HOT_SPARE_SET, /* Add new options below this one ! */
|
||||||
|
+ LC_HOT_SPARE_SET,
|
||||||
|
+ LC_DEFER_UPDATE, /* Add new options below this one ! */
|
||||||
|
LC_OPTIONS_SIZE, /* Must be the last enumerator. */
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -67,6 +68,7 @@ enum lc_options {
|
||||||
|
#define OPT_CREATE(lc) (lc_opt(lc, LC_CREATE))
|
||||||
|
#define OPT_HOT_SPARE_SET(lc) (lc_opt(lc, LC_HOT_SPARE_SET))
|
||||||
|
#define OPT_REBUILD_DISK(lc) (lc_opt(lc, LC_REBUILD_DISK))
|
||||||
|
+#define OPT_DEFER_UPDATE(lc) (lc_opt(lc, LC_DEFER_UPDATE))
|
||||||
|
|
||||||
|
/* Return option value. */
|
||||||
|
#define OPT_STR(lc, o) (lc->options[o].arg.str)
|
||||||
|
@@ -76,6 +78,7 @@ enum lc_options {
|
||||||
|
#define OPT_STR_PARTCHAR(lc) OPT_STR(lc, LC_PARTCHAR)
|
||||||
|
#define OPT_STR_HOT_SPARE_SET(lc) OPT_STR(lc, LC_HOT_SPARE_SET)
|
||||||
|
#define OPT_STR_REBUILD_DISK(lc) OPT_STR(lc, LC_REBUILD_DISK)
|
||||||
|
+#define OPT_STR_DEFER_UPDATE(lc) OPT_STR(lc, LC_DEFER_UPDATE)
|
||||||
|
|
||||||
|
struct lib_version {
|
||||||
|
const char *text;
|
||||||
|
diff --git a/lib/metadata/reconfig.c b/lib/metadata/reconfig.c
|
||||||
|
index 73f7604..19768a9 100644
|
||||||
|
--- a/lib/metadata/reconfig.c
|
||||||
|
+++ b/lib/metadata/reconfig.c
|
||||||
|
@@ -249,9 +249,9 @@ add_dev_to_raid(struct lib_context *lc, struct raid_set *rs,
|
||||||
|
strncat(lib_name, ".so", 3);
|
||||||
|
} else
|
||||||
|
goto err;
|
||||||
|
-
|
||||||
|
+
|
||||||
|
/* Check registration */
|
||||||
|
- if (!dm_monitored_events(&pending, sub_rs->name, lib_name)) {
|
||||||
|
+ if (!dm_monitored_events(&pending, sub_rs->name, lib_name) && !OPT_DEFER_UPDATE(lc)) {
|
||||||
|
/* If NOT registered update metadata to OK state. */
|
||||||
|
if (check_rd->fmt->metadata_handler)
|
||||||
|
check_rd->fmt->metadata_handler(lc, UPDATE_REBUILD_STATE, NULL, (void *) rs);
|
||||||
|
diff --git a/man/dmraid.8 b/man/dmraid.8
|
||||||
|
index b4de737..62a6091 100644
|
||||||
|
--- a/man/dmraid.8
|
||||||
|
+++ b/man/dmraid.8
|
||||||
|
@@ -11,6 +11,7 @@ dmraid \- discover, configure and activate software (ATA)RAID
|
||||||
|
[-Z|--rm_partitions]
|
||||||
|
[--separator SEPARATOR]
|
||||||
|
[-t|--test]
|
||||||
|
+ [-u|--update_defer]
|
||||||
|
[RAID-set...]
|
||||||
|
|
||||||
|
.B dmraid
|
||||||
|
@@ -38,6 +39,7 @@ dmraid \- discover, configure and activate software (ATA)RAID
|
||||||
|
{-R| --rebuild}
|
||||||
|
RAID-set
|
||||||
|
[device-path]
|
||||||
|
+ [-u|--update_defer]
|
||||||
|
|
||||||
|
.B dmraid
|
||||||
|
{-x| --remove}
|
||||||
|
@@ -118,7 +120,14 @@ underlying the set, ie if sda is part of the set, remove sda1, sda2, etc.
|
||||||
|
This prevents applications from directly accessiong the disks bypassing dmraid.
|
||||||
|
RAID set names given on command line don't need to be fully specified
|
||||||
|
(eg, "dmraid -ay sil" would activate all discovered Silicon Image Medley
|
||||||
|
-RAID sets).
|
||||||
|
+RAID sets). Option
|
||||||
|
+.B -u
|
||||||
|
+defers metadata update in case of rebuild is triggered parallelly with activation.
|
||||||
|
+Awoids metadata update to "OK" state if volume is not registered to the event
|
||||||
|
+monitoring.
|
||||||
|
+Useful if volume is activating at early stage of booting process when registration
|
||||||
|
+to the event monitoring is impossible.
|
||||||
|
+
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.I {-b|--block_devices} [device-path...]
|
||||||
|
@@ -208,7 +217,11 @@ Use CHAR as the separator between the device name and the partition number.
|
||||||
|
.I {-R| --rebuild} RAID-set [device-path]
|
||||||
|
Rebuild raid array after a drive has failed and a new drive is added.
|
||||||
|
For Intel chipset based systems, there are two methods in which a new drive
|
||||||
|
-is added to the system.
|
||||||
|
+is added to the system. Option
|
||||||
|
+.B -u
|
||||||
|
+defers metadata update in case of rebuild is triggered.
|
||||||
|
+Awoids metadata update to "OK" state if volume is not registered to the event
|
||||||
|
+monitoring.
|
||||||
|
|
||||||
|
1. Using OROM to identify a new drive
|
||||||
|
During system reboot, enter OROM and mark the new drive as the rebuild drive.
|
||||||
|
diff --git a/tools/commands.c b/tools/commands.c
|
||||||
|
index 4c71ae1..a3c77d2 100644
|
||||||
|
--- a/tools/commands.c
|
||||||
|
+++ b/tools/commands.c
|
||||||
|
@@ -30,7 +30,7 @@ int add_dev_to_array(struct lib_context *lc, struct raid_set *rs,
|
||||||
|
/*
|
||||||
|
* Command line options.
|
||||||
|
*/
|
||||||
|
-static char const *short_opts = "a:hipP:"
|
||||||
|
+static char const *short_opts = "a:hipP:u"
|
||||||
|
#ifndef DMRAID_MINI
|
||||||
|
"bc::dDEf:glxM:"
|
||||||
|
#ifdef DMRAID_NATIVE_LOG
|
||||||
|
@@ -46,6 +46,7 @@ static struct option long_opts[] = {
|
||||||
|
{"format", required_argument, NULL, 'f'},
|
||||||
|
{"partchar", required_argument, NULL, 'P'},
|
||||||
|
{"no_partitions", no_argument, NULL, 'p'},
|
||||||
|
+ {"update_defer", no_argument, NULL, 'u'},
|
||||||
|
# ifndef DMRAID_MINI
|
||||||
|
{"block_devices", no_argument, NULL, 'b'},
|
||||||
|
{"display_columns", optional_argument, NULL, 'c'},
|
||||||
|
@@ -197,6 +198,15 @@ check_part_separator(struct lib_context *lc, int arg)
|
||||||
|
return lc_stralloc_opt(lc, LC_PARTCHAR, optarg) ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+/* Defer any mtadata updates in case of volume activation
|
||||||
|
+ * at early stage of OS boot */
|
||||||
|
+static int
|
||||||
|
+defer_update(struct lib_context *lc, int arg)
|
||||||
|
+{
|
||||||
|
+ lc_inc_opt(lc, arg);
|
||||||
|
+ return 1;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/* Display help information */
|
||||||
|
static int
|
||||||
|
help(struct lib_context *lc, int arg)
|
||||||
|
@@ -211,6 +221,7 @@ help(struct lib_context *lc, int arg)
|
||||||
|
"\t[-P|--partchar CHAR]\n"
|
||||||
|
"\t[-p|--no_partitions]\n"
|
||||||
|
"\t[-Z|--rm_partitions]\n"
|
||||||
|
+ "\t[-d|--update_defer]\n"
|
||||||
|
"\t[--separator SEPARATOR]\n" "\t[RAID-set...]\n", c);
|
||||||
|
log_print(lc, "%s\t{-h|--help}\n", c);
|
||||||
|
log_print(lc, "%s\t{-V/--version}\n", c);
|
||||||
|
@@ -219,11 +230,12 @@ help(struct lib_context *lc, int arg)
|
||||||
|
log_print(lc,
|
||||||
|
"* = [-d|--debug]... [-v|--verbose]... [-i|--ignorelocking]\n");
|
||||||
|
log_print(lc,
|
||||||
|
- "%s\t{-a|--activate} {y|n|yes|no} *\n"
|
||||||
|
+ "%s\t{-a|--activate} {y|n|yes|no} \n"
|
||||||
|
"\t[-f|--format FORMAT[,FORMAT...]]\n"
|
||||||
|
"\t[-P|--partchar CHAR]\n" "\t[-p|--no_partitions]\n"
|
||||||
|
"\t[--separator SEPARATOR]\n" "\t[-t|--test]\n"
|
||||||
|
- "\t[-Z|--rm_partitions] [RAID-set...]\n", c);
|
||||||
|
+ "\t[-Z|--rm_partitions] [RAID-set...]\n"
|
||||||
|
+ "\t[-u|--update_defer]", c);
|
||||||
|
log_print(lc,
|
||||||
|
"%s\t{-b|--block_devices} *\n"
|
||||||
|
"\t[-c|--display_columns][FIELD[,FIELD...]]...\n"
|
||||||
|
@@ -255,7 +267,8 @@ help(struct lib_context *lc, int arg)
|
||||||
|
"\t[--str[i[de]] [0-9]...[kK][bB]]\n"
|
||||||
|
"\t{--disk[s] \"device-path[, device-path...\"}\n", c);
|
||||||
|
log_print(lc, "%s\t{-x|--remove RAID-set} \n");
|
||||||
|
- log_print(lc, "%s\t{-R|--rebuild} RAID-set [drive_name]\n", c);
|
||||||
|
+ log_print(lc, "%s\t{-R|--rebuild} RAID-set [drive_name]\n"
|
||||||
|
+ "\t[-u|--update_defer]", c);
|
||||||
|
log_print(lc, "%s\t[{-f|--format FORMAT}]\n"
|
||||||
|
"\t{-S|--spare [RAID-set]} \n"
|
||||||
|
"\t{-M|--media \"device-path\"}\n", c);
|
||||||
|
@@ -285,6 +298,19 @@ static struct actions actions[] = {
|
||||||
|
0,
|
||||||
|
},
|
||||||
|
|
||||||
|
+ /* Defer metadata update */
|
||||||
|
+ {'u',
|
||||||
|
+ UNDEF,
|
||||||
|
+ UNDEF,
|
||||||
|
+ ACTIVATE | REBUILD
|
||||||
|
+#ifndef DMRAID_MINI
|
||||||
|
+ | DBG | TEST | VERBOSE
|
||||||
|
+#endif
|
||||||
|
+ , NO_ARGS,
|
||||||
|
+ defer_update,
|
||||||
|
+ LC_DEFER_UPDATE,
|
||||||
|
+ },
|
||||||
|
+
|
||||||
|
/* Format option. */
|
||||||
|
{'f',
|
||||||
|
FORMAT,
|
||||||
|
@@ -726,7 +752,7 @@ handle_args(struct lib_context *lc, int argc, char ***argv)
|
||||||
|
if (o == 'C') {
|
||||||
|
*argv += optind - 1;
|
||||||
|
return 1;
|
||||||
|
- } else if (o == 'R' && argc == 4) {
|
||||||
|
+ } else if (o == 'R' && (argc == 4 || argc == 5)) {
|
||||||
|
if (*(*argv + optind))
|
||||||
|
save_drive_name(lc, *(*argv + optind));
|
||||||
|
}
|
||||||
|
@@ -744,7 +770,7 @@ handle_args(struct lib_context *lc, int argc, char ***argv)
|
||||||
|
ret = check_actions_arguments(lc);
|
||||||
|
|
||||||
|
*argv += optind;
|
||||||
|
- if (argc == 4 && lc->options[LC_REBUILD_SET].opt)
|
||||||
|
+ if ((argc == 4 || argc == 5) && lc->options[LC_REBUILD_SET].opt)
|
||||||
|
*argv += 1;
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
@@ -871,7 +897,7 @@ struct prepost prepost[] = {
|
||||||
|
0,
|
||||||
|
activate_or_deactivate_sets,
|
||||||
|
},
|
||||||
|
-
|
||||||
|
+
|
||||||
|
#ifndef DMRAID_MINI
|
||||||
|
/* Display block devices. */
|
||||||
|
{BLOCK_DEVICES,
|
||||||
|
--
|
||||||
|
1.7.0.4
|
||||||
|
|
||||||
17
0014-dmraid-fix-build-to-honour-cflags-var.patch
Normal file
17
0014-dmraid-fix-build-to-honour-cflags-var.patch
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
diff -purN 1.0.0.rc16.orig/tools/Makefile.in 1.0.0.rc16.new/tools/Makefile.in
|
||||||
|
--- 1.0.0.rc16.orig/tools/Makefile.in 2009-09-16 10:55:23.000000000 +0200
|
||||||
|
+++ 1.0.0.rc16.new/tools/Makefile.in 2015-07-21 14:51:42.004800788 +0200
|
||||||
|
@@ -71,11 +71,11 @@ all: $(TARGETS)
|
||||||
|
.PHONY: install_dmraid_tools remove_dmraid_tools
|
||||||
|
|
||||||
|
dmraid: $(OBJECTS) $(top_srcdir)/lib/libdmraid.a
|
||||||
|
- $(CC) -o $@ $(OBJECTS) $(LDFLAGS) -L$(top_srcdir)/lib \
|
||||||
|
+ $(CC) -o $@ $(OBJECTS) $(CFLAGS) $(LDFLAGS) -L$(top_srcdir)/lib \
|
||||||
|
-L$(DESTDIR)$(libdir) $(DMRAIDLIBS) $(DMEVENTTOOLLIBS) $(DMRAIDLIBS) $(LIBS)
|
||||||
|
|
||||||
|
dmevent_tool: $(top_srcdir)/lib/libdmraid.a
|
||||||
|
- $(CC) -o $@ $@.c $(INCLUDES) $(LDFLAGS) -L$(top_srcdir)/lib \
|
||||||
|
+ $(CC) -o $@ $@.c $(INCLUDES) $(CFLAGS) $(LDFLAGS) -L$(top_srcdir)/lib \
|
||||||
|
-L$(DESTDIR)$(libdir) $(DMRAIDLIBS) $(DMEVENTTOOLLIBS) $(DMRAIDLIBS) $(LIBS)
|
||||||
|
|
||||||
|
install_dmraid_tools: $(TARGETS)
|
||||||
@ -0,0 +1,65 @@
|
|||||||
|
lib/events/libdmraid-events-isw.c | 6 +++---
|
||||||
|
lib/format/ataraid/jm.c | 4 ++--
|
||||||
|
lib/metadata/metadata.c | 2 +-
|
||||||
|
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/events/libdmraid-events-isw.c b/lib/events/libdmraid-events-isw.c
|
||||||
|
index cc78b58..9d4e902 100644
|
||||||
|
--- a/lib/events/libdmraid-events-isw.c
|
||||||
|
+++ b/lib/events/libdmraid-events-isw.c
|
||||||
|
@@ -838,13 +838,13 @@ static void _log_either(enum log_type log_type,
|
||||||
|
|
||||||
|
sz = _log_all_devs(log_type, rs, NULL, 0);
|
||||||
|
if (!sz) {
|
||||||
|
- syslog(LOG_ERR, msg[0]);
|
||||||
|
+ syslog(LOG_ERR, "%s", msg[0]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
str = dm_malloc(++sz);
|
||||||
|
if (!str) {
|
||||||
|
- syslog(LOG_ERR, msg[1]);
|
||||||
|
+ syslog(LOG_ERR, "%s", msg[1]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1076,7 +1076,7 @@ static enum disk_state_type _process_stripe_event(struct dm_task *dmt,
|
||||||
|
char *params)
|
||||||
|
{
|
||||||
|
int argc, i, num_devs, ret = D_INSYNC;
|
||||||
|
- char **args, *dev_status_str, *p;
|
||||||
|
+ char **args = NULL, *dev_status_str, *p;
|
||||||
|
const char *rs_name = dm_task_get_name(dmt);
|
||||||
|
struct dso_raid_set *rs = _find_raid_set(rs_name, NULL, 1);
|
||||||
|
struct dso_raid_dev *dev;
|
||||||
|
diff --git a/lib/format/ataraid/jm.c b/lib/format/ataraid/jm.c
|
||||||
|
index 431f0de..d1e5df7 100644
|
||||||
|
--- a/lib/format/ataraid/jm.c
|
||||||
|
+++ b/lib/format/ataraid/jm.c
|
||||||
|
@@ -32,10 +32,10 @@ name(struct lib_context *lc, struct raid_dev *rd, unsigned int subset)
|
||||||
|
|
||||||
|
/* Sanitize name, make sure it's null terminated */
|
||||||
|
strncpy(buf, name, JM_NAME_LEN);
|
||||||
|
- while (i && isspace(buf[i])) {
|
||||||
|
+ i = strlen(buf);
|
||||||
|
+ while (i-- && isspace(buf[i])) {
|
||||||
|
name[i]='\0';
|
||||||
|
buf[i]='\0';
|
||||||
|
- --i;
|
||||||
|
}
|
||||||
|
|
||||||
|
len = strlen(buf) + sizeof(HANDLER) + (jm->mode == JM_T_RAID01 ? 3 : 2);
|
||||||
|
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
|
||||||
|
index 4da6b64..14dc459 100644
|
||||||
|
--- a/lib/metadata/metadata.c
|
||||||
|
+++ b/lib/metadata/metadata.c
|
||||||
|
@@ -1433,7 +1433,7 @@ create_raidset(struct lib_context *lc, struct raid_set_descr *rsd)
|
||||||
|
rd->sectors = 0;
|
||||||
|
list_add_tail(&rd->devs, &rs->devs);
|
||||||
|
n++;
|
||||||
|
- } while (end++ != '\0');
|
||||||
|
+ } while (end++ != NULL);
|
||||||
|
|
||||||
|
rs->total_devs = rs->found_devs = n;
|
||||||
|
rs_tmp = rs;
|
||||||
|
|
||||||
60
0016-dmraid-fix-destdir.patch
Normal file
60
0016-dmraid-fix-destdir.patch
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
dmraid.spec | 8 ++++----
|
||||||
|
make.tmpl.in | 4 ----
|
||||||
|
tools/Makefile.in | 4 ++--
|
||||||
|
3 files changed, 6 insertions(+), 10 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/dmraid.spec b/dmraid.spec
|
||||||
|
index 681964c..5c602dc 100644
|
||||||
|
--- a/dmraid.spec
|
||||||
|
+++ b/dmraid.spec
|
||||||
|
@@ -59,12 +59,12 @@ Device failure reporting has to be activated manually by activating the
|
||||||
|
%setup -q -n dmraid/%{version}
|
||||||
|
|
||||||
|
%build
|
||||||
|
-%configure --prefix=${RPM_BUILD_ROOT}/usr --sbindir=${RPM_BUILD_ROOT}/sbin --libdir=${RPM_BUILD_ROOT}/%{_libdir} --mandir=${RPM_BUILD_ROOT}/%{_mandir} --includedir=${RPM_BUILD_ROOT}/%{_includedir} --enable-debug --enable-libselinux --enable-libsepol --enable-static_link --enable-led --enable-intel_led
|
||||||
|
-make DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
+%configure --enable-debug --enable-libselinux --enable-libsepol --enable-static_link --enable-led --enable-intel_led
|
||||||
|
+make
|
||||||
|
mv tools/dmraid tools/dmraid.static
|
||||||
|
make clean
|
||||||
|
-%configure --prefix=${RPM_BUILD_ROOT}/usr --sbindir=${RPM_BUILD_ROOT}/sbin --libdir=${RPM_BUILD_ROOT}/%{_libdir} --mandir=${RPM_BUILD_ROOT}/%{_mandir} --includedir=${RPM_BUILD_ROOT}/%{_includedir} --enable-debug --enable-libselinux --enable-libsepol --disable-static_linko --enable-led --enable-intel_led
|
||||||
|
-make DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
+%configure --enable-debug --enable-libselinux --enable-libsepol --disable-static_linko --enable-led --enable-intel_led
|
||||||
|
+make
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
diff --git a/make.tmpl.in b/make.tmpl.in
|
||||||
|
index 48e5a99..2a26153 100644
|
||||||
|
--- a/make.tmpl.in
|
||||||
|
+++ b/make.tmpl.in
|
||||||
|
@@ -88,10 +88,6 @@ INCLUDES+=-I. -I$(top_srcdir)/include -I$(top_srcdir)/lib
|
||||||
|
|
||||||
|
STRIP=
|
||||||
|
|
||||||
|
-ifdef DESTDIR
|
||||||
|
- INCLUDES+=-I$(DESTDIR)/usr/include
|
||||||
|
-endif
|
||||||
|
-
|
||||||
|
DEPS=$(top_srcdir)/make.tmpl $(top_srcdir)/tools/VERSION Makefile
|
||||||
|
|
||||||
|
OBJECTS=$(SOURCES:%.c=%.o)
|
||||||
|
diff --git a/tools/Makefile.in b/tools/Makefile.in
|
||||||
|
index 0342d2a..ea2c915 100644
|
||||||
|
--- a/tools/Makefile.in
|
||||||
|
+++ b/tools/Makefile.in
|
||||||
|
@@ -72,11 +72,11 @@ all: $(TARGETS)
|
||||||
|
|
||||||
|
dmraid: $(OBJECTS) $(top_srcdir)/lib/libdmraid.a
|
||||||
|
$(CC) -o $@ $(OBJECTS) $(CFLAGS) $(LDFLAGS) -L$(top_srcdir)/lib \
|
||||||
|
- -L$(DESTDIR)$(libdir) $(DMRAIDLIBS) $(DMEVENTTOOLLIBS) $(DMRAIDLIBS) $(LIBS)
|
||||||
|
+ $(DMRAIDLIBS) $(DMEVENTTOOLLIBS) $(DMRAIDLIBS) $(LIBS)
|
||||||
|
|
||||||
|
dmevent_tool: $(top_srcdir)/lib/libdmraid.a
|
||||||
|
$(CC) -o $@ $@.c $(INCLUDES) $(CFLAGS) $(LDFLAGS) -L$(top_srcdir)/lib \
|
||||||
|
- -L$(DESTDIR)$(libdir) $(DMRAIDLIBS) $(DMEVENTTOOLLIBS) $(DMRAIDLIBS) $(LIBS)
|
||||||
|
+ $(DMRAIDLIBS) $(DMEVENTTOOLLIBS) $(DMRAIDLIBS) $(LIBS)
|
||||||
|
|
||||||
|
install_dmraid_tools: $(TARGETS)
|
||||||
|
@echo "Installing $(TARGETS) in $(sbindir)"; \
|
||||||
|
|
||||||
34
0017-dmraid-fix-missing-destdir.patch
Normal file
34
0017-dmraid-fix-missing-destdir.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
make.tmpl.in | 14 ++++++--------
|
||||||
|
1 file changed, 6 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/make.tmpl.in b/make.tmpl.in
|
||||||
|
index 2a26153..1f1d1e5 100644
|
||||||
|
--- a/make.tmpl.in
|
||||||
|
+++ b/make.tmpl.in
|
||||||
|
@@ -23,20 +23,18 @@ SOFLAG += @SOFLAG@
|
||||||
|
# Setup directory variables
|
||||||
|
prefix = $(DESTDIR)@prefix@
|
||||||
|
exec_prefix = $(DESTDIR)@exec_prefix@
|
||||||
|
-bindir = @bindir@
|
||||||
|
+bindir = $(DESTDIR)@bindir@
|
||||||
|
ifeq ("@KLIBC@", "no")
|
||||||
|
- libdir = @libdir@
|
||||||
|
- sbindir = @sbindir@
|
||||||
|
- includedir = @includedir@
|
||||||
|
- infodir = @infodir@
|
||||||
|
- mandir = @mandir@
|
||||||
|
+ libdir = $(DESTDIR)@libdir@
|
||||||
|
+ sbindir = $(DESTDIR)@sbindir@
|
||||||
|
+ includedir = $(DESTDIR)@includedir@
|
||||||
|
else
|
||||||
|
libdir = $(DESTDIR)@KLIBC_LIB_DIR@
|
||||||
|
sbindir = $(DESTDIR)@KLIBC_SBIN_DIR@
|
||||||
|
includedir = $(DESTDIR)@KLIBC_INCLUDE_DIR@
|
||||||
|
- infodir = @infodir@
|
||||||
|
- mandir = @mandir@
|
||||||
|
endif
|
||||||
|
+infodir = $(DESTDIR)@infodir@
|
||||||
|
+mandir = $(DESTDIR)@mandir@
|
||||||
|
|
||||||
|
|
||||||
|
# setup misc variables
|
||||||
17
0018-dmraid-fix-so-flags.patch
Normal file
17
0018-dmraid-fix-so-flags.patch
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
make.tmpl.in | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/make.tmpl.in b/make.tmpl.in
|
||||||
|
index 1f1d1e5..ef863ba 100644
|
||||||
|
--- a/make.tmpl.in
|
||||||
|
+++ b/make.tmpl.in
|
||||||
|
@@ -129,7 +129,7 @@ $(TARGETS): $(OBJECTS)
|
||||||
|
%.so: $(OBJECTS) .export.sym
|
||||||
|
|
||||||
|
%.so: $(OBJECTS)
|
||||||
|
- $(CC) -shared -Wl,-soname,$(notdir $@).$(DMRAID_LIB_VERSION) \
|
||||||
|
+ $(CC) -shared $(CFLAGS) $(LDFLAGS) -Wl,-soname,$(notdir $@).$(DMRAID_LIB_VERSION) \
|
||||||
|
-Wl,--version-script,.export.sym $(OBJECTS) -o $@ -ldevmapper-event
|
||||||
|
|
||||||
|
$(LIB_STATIC): $(OBJECTS)
|
||||||
|
|
||||||
BIN
dmraid-1.0.0.rc16.tar.bz2
Normal file
BIN
dmraid-1.0.0.rc16.tar.bz2
Normal file
Binary file not shown.
408
dmraid.spec
Normal file
408
dmraid.spec
Normal file
@ -0,0 +1,408 @@
|
|||||||
|
#This spec file is coming from https://github.com/Distrotech/dmraid/blob/master/dmraid.spec
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright (C) Heinz Mauelshagen, 2004-2010 Red Hat GmbH. All rights reserved.
|
||||||
|
#
|
||||||
|
# See file LICENSE at the top of this source tree for license information.
|
||||||
|
#
|
||||||
|
|
||||||
|
Summary: dmraid (Device-mapper RAID tool and library)
|
||||||
|
Name: dmraid
|
||||||
|
Version: 1.0.0.rc16
|
||||||
|
Release: 52
|
||||||
|
License: GPLv2+
|
||||||
|
Group: System Environment/Base
|
||||||
|
URL: http://people.redhat.com/heinzm/sw/dmraid
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
BuildRequires: device-mapper-devel >= 1.02.02-2
|
||||||
|
BuildRequires: device-mapper-event-devel
|
||||||
|
BuildRequires: libselinux-devel
|
||||||
|
BuildRequires: libsepol-devel git
|
||||||
|
Requires: device-mapper >= 1.02.02-2
|
||||||
|
Requires: dmraid-events
|
||||||
|
Requires: kpartx
|
||||||
|
Requires(post): systemd
|
||||||
|
|
||||||
|
Obsoletes: dmraid-libs < %{version}-%{release}
|
||||||
|
Provides: dmraid-libs = %{version}-%{release}
|
||||||
|
Source0: ftp://people.redhat.com/heinzm/sw/dmraid/src/%{name}-%{version}.tar.bz2
|
||||||
|
|
||||||
|
|
||||||
|
Patch0: 0000-dmraid-1.0.0.rc16-test_devices.patch
|
||||||
|
Patch1: 0001-ddf1_lsi_persistent_name.patch
|
||||||
|
Patch2: 0002-pdc_raid10_failure.patch
|
||||||
|
Patch3: 0003-return_error_wo_disks.patch
|
||||||
|
Patch4: 0004-fix_sil_jbod.patch
|
||||||
|
Patch5: 0005-avoid_register.patch
|
||||||
|
Patch6: 0006-move_pattern_file_to_var.patch
|
||||||
|
Patch7: 0007-libversion.patch
|
||||||
|
Patch8: 0008-libversion-display.patch
|
||||||
|
|
||||||
|
Patch9: 0009-bz635995-data_corruption_during_activation_volume_marked_for_rebuild.patch
|
||||||
|
Patch11: 0011-bz626417_19-enabling_registration_degraded_volume.patch
|
||||||
|
Patch12: 0012-bz626417_20-cleanup_some_compilation_warning.patch
|
||||||
|
Patch13: 0013-bz626417_21-add_option_that_postpones_any_metadata_updates.patch
|
||||||
|
Patch14: 0014-dmraid-fix-build-to-honour-cflags-var.patch
|
||||||
|
Patch15: 0015-dmraid-fix-errors-and-warnings-triggered-by-CFLAGS.patch
|
||||||
|
Patch16: 0016-dmraid-fix-destdir.patch
|
||||||
|
Patch17: 0017-dmraid-fix-missing-destdir.patch
|
||||||
|
Patch18: 0018-dmraid-fix-so-flags.patch
|
||||||
|
|
||||||
|
%description
|
||||||
|
DMRAID supports RAID device discovery, RAID set activation, creation,
|
||||||
|
removal, rebuild and display of properties for ATARAID/DDF1 metadata on
|
||||||
|
Linux >= 2.4 using device-mapper.
|
||||||
|
|
||||||
|
%package -n dmraid-devel
|
||||||
|
Summary: Development libraries and headers for dmraid.
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: dmraid = %{version}-%{release}, sgpio
|
||||||
|
|
||||||
|
%description -n dmraid-devel
|
||||||
|
dmraid-devel provides a library interface for RAID device discovery,
|
||||||
|
RAID set activation and display of properties for ATARAID volumes.
|
||||||
|
|
||||||
|
%package -n dmraid-events
|
||||||
|
Summary: dmevent_tool (Device-mapper event tool) and DSO
|
||||||
|
Group: System Environment/Base
|
||||||
|
Requires: dmraid = %{version}-%{release}, sgpio
|
||||||
|
Requires: device-mapper-event
|
||||||
|
|
||||||
|
%description -n dmraid-events
|
||||||
|
Provides a dmeventd DSO and the dmevent_tool to register devices with it
|
||||||
|
for device monitoring. All active RAID sets should be manually registered
|
||||||
|
with dmevent_tool.
|
||||||
|
|
||||||
|
%package -n dmraid-events-logwatch
|
||||||
|
Summary: dmraid logwatch-based email reporting
|
||||||
|
Group: System Environment/Base
|
||||||
|
Requires: dmraid-events = %{version}-%{release}, logwatch, /etc/cron.d
|
||||||
|
|
||||||
|
%description -n dmraid-events-logwatch
|
||||||
|
Provides device failure reporting via logwatch-based email reporting.
|
||||||
|
Device failure reporting has to be activated manually by activating the
|
||||||
|
/etc/cron.d/dmeventd-logwatch entry and by calling the dmevent_tool
|
||||||
|
(see manual page for examples) for any active RAID sets.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n dmraid/%{version} -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%define _libdir /%{_lib}
|
||||||
|
|
||||||
|
%configure --prefix=/usr --sbindir=%{_sbindir} --libdir=%{_libdir} --mandir=%{_mandir} --includedir=%{_includedir} --enable-debug --disable-static_link --enable-led --enable-intel_led
|
||||||
|
make
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
install -m 755 -d $RPM_BUILD_ROOT{%{_libdir},/sbin,%{_sbindir},%{_bindir},%{_libdir},%{_includedir}/dmraid/,/var/lock/dmraid,/etc/cron.d/,/etc/logwatch/conf/services/,/etc/logwatch/scripts/services/,/var/cache/logwatch/dmeventd/}
|
||||||
|
make DESTDIR=$RPM_BUILD_ROOT install
|
||||||
|
ln -s dmraid $RPM_BUILD_ROOT/%{_sbindir}/dmraid.static
|
||||||
|
|
||||||
|
# Provide convenience link from dmevent_tool
|
||||||
|
(cd $RPM_BUILD_ROOT/%{_sbindir} ; ln -f dmevent_tool dm_dso_reg_tool)
|
||||||
|
(cd $RPM_BUILD_ROOT/%{_mandir}/man8 ; ln -f dmevent_tool.8 dm_dso_reg_tool.8 ; ln -f dmraid.8 dmraid.static.8)
|
||||||
|
|
||||||
|
install -m 644 include/dmraid/*.h $RPM_BUILD_ROOT/%{_includedir}/dmraid/
|
||||||
|
|
||||||
|
# Install logwatch config file and script for dmeventd
|
||||||
|
install -m 644 logwatch/dmeventd.conf $RPM_BUILD_ROOT/etc/logwatch/conf/services/dmeventd.conf
|
||||||
|
install -m 755 logwatch/dmeventd $RPM_BUILD_ROOT/etc/logwatch/scripts/services/dmeventd
|
||||||
|
install -m 644 logwatch/dmeventd_cronjob.txt $RPM_BUILD_ROOT/etc/cron.d/dmeventd-logwatch
|
||||||
|
install -m 0700 /dev/null $RPM_BUILD_ROOT/var/cache/logwatch/dmeventd/syslogpattern.txt
|
||||||
|
|
||||||
|
install -d %{buildroot}%{_prefix}/lib/systemd
|
||||||
|
install -d %{buildroot}%{_unitdir}
|
||||||
|
|
||||||
|
rm -f $RPM_BUILD_ROOT/%{_libdir}/libdmraid.a
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
%post
|
||||||
|
/sbin/ldconfig
|
||||||
|
|
||||||
|
%postun
|
||||||
|
/sbin/ldconfig
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc CHANGELOG CREDITS KNOWN_BUGS LICENSE LICENSE_GPL LICENSE_LGPL README TODO doc/dmraid_design.txt
|
||||||
|
/%{_mandir}/man8/dmraid*
|
||||||
|
%{_sbindir}/dmraid
|
||||||
|
%{_sbindir}/dmraid.static
|
||||||
|
%{_libdir}/libdmraid.so*
|
||||||
|
%{_libdir}/libdmraid-events-isw.so*
|
||||||
|
%ghost /var/lock/dmraid
|
||||||
|
|
||||||
|
%files -n dmraid-devel
|
||||||
|
%dir %{_includedir}/dmraid
|
||||||
|
%{_includedir}/dmraid/*
|
||||||
|
|
||||||
|
%files -n dmraid-events
|
||||||
|
/%{_mandir}/man8/dmevent_tool*
|
||||||
|
/%{_mandir}/man8/dm_dso_reg_tool*
|
||||||
|
%{_sbindir}/dmevent_tool
|
||||||
|
%{_sbindir}/dm_dso_reg_tool
|
||||||
|
|
||||||
|
%files -n dmraid-events-logwatch
|
||||||
|
%config(noreplace) /etc/logwatch/*
|
||||||
|
%config(noreplace) /etc/cron.d/dmeventd-logwatch
|
||||||
|
%dir /var/cache/logwatch/dmeventd
|
||||||
|
%ghost /var/cache/logwatch/dmeventd/syslogpattern.txt
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Tue Dec 31 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.0.0.rc16-52
|
||||||
|
- Type:enhancement
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:delete some unused files
|
||||||
|
|
||||||
|
* Tue Oct 29 2019 zhanghaibo <ted.zhang@huawei.com> - 1.0.0.rc16-51
|
||||||
|
- add ghost tag to /var/lock/dmraid
|
||||||
|
|
||||||
|
* Wed Aug 28 2019 zhanghaibo <ted.zhang@huawei.com> - 1.0.0.rc16-50
|
||||||
|
- Type:enhancemnet
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:Package init
|
||||||
|
|
||||||
|
* Fri Dec 2 2011 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc16-7
|
||||||
|
- Avoid error message for sector sizes != 512 bytes
|
||||||
|
|
||||||
|
* Mon May 31 2010 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc16-6
|
||||||
|
- remove superfluous libselinux/libsepol configure options
|
||||||
|
|
||||||
|
* Tue Jan 12 2010 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc16-5
|
||||||
|
- Support DESTDIR in all Makefiles
|
||||||
|
- Fix handling spares in RAID names in vendor metadata
|
||||||
|
|
||||||
|
* Tue Jan 12 2010 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc16-4
|
||||||
|
- Change dmraid DSO version to "1" and allow for display of
|
||||||
|
extended internal library version
|
||||||
|
|
||||||
|
* Tue Jan 12 2010 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc16-3
|
||||||
|
- Add logwatch files and move pattern file to /var/cache
|
||||||
|
- Fix multiple options (eg. "-ccc") not recognized properly
|
||||||
|
|
||||||
|
* Mon Nov 2 2009 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc16-2
|
||||||
|
- Fix manual path in specfile
|
||||||
|
- fix manual pages for dmraid.static and dm_dso_reg_tool
|
||||||
|
- ddf1 metadata format handler LSI persistent name fix
|
||||||
|
- fix pdc metadata format handler to report the correct number
|
||||||
|
of devices in a RAID10 subset
|
||||||
|
- move libraries to /lib* in order to avoid catch22
|
||||||
|
with unmountable /usr
|
||||||
|
|
||||||
|
* Wed Oct 09 2008 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc16-1
|
||||||
|
- Updated
|
||||||
|
|
||||||
|
* Wed Sep 17 2008 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc15
|
||||||
|
- Added support for RAID set create/delete/rebuild and event handling
|
||||||
|
(Intel contributions)
|
||||||
|
- Resolves: rhbz#437169 rhbz#437173 rhbz#437177 rhbz#439088
|
||||||
|
|
||||||
|
* Fri Feb 08 2008 Ian Kent <ikent@redhat.com> - 1.0.0.rc15
|
||||||
|
- Bug 427550: dmraid segfaults on boot resulting in broken mirror
|
||||||
|
- patch to fix SEGV when requesting activation of invalid raid set.
|
||||||
|
the feature.
|
||||||
|
Related: rhbz#427550
|
||||||
|
|
||||||
|
* Wed Feb 06 2008 Peter Jones <pjones@redhat.com> - 1.0.0.rc13-8
|
||||||
|
- Revert fix for 381501, since the RHEL kernel doesn't currently support
|
||||||
|
the feature.
|
||||||
|
Related: rhbz#381501
|
||||||
|
* Fri Jan 18 2008 Ian Kent <ikent@redhat.com> - 1.0.0.rc13-7
|
||||||
|
- fix incorrectly applied patch in spec file.
|
||||||
|
- Related: rhbz#236891
|
||||||
|
|
||||||
|
* Wed Nov 21 2007 Ian Kent <ikent@redhat.com> - 1.0.0.rc13-6
|
||||||
|
- Bug 381511: dmraid needs to generate UUIDs for lib device-mapper
|
||||||
|
- add patch to set UUID.
|
||||||
|
- add "DMRAID-" prefix to dmraid UUID string.
|
||||||
|
- Bug 381501: dmraid needs to activate device-mapper mirror resynchronization error handling
|
||||||
|
- Resolves: rhbz#381511 rhbz#381501
|
||||||
|
|
||||||
|
* Fri Nov 2 2007 Ian Kent <ikent@redhat.com> - 1.0.0.rc13-5
|
||||||
|
- Fix SEGV on "dmraid -r -E" (bz 236891)
|
||||||
|
- Resolves: rhbz#236891
|
||||||
|
|
||||||
|
* Mon Sep 10 2007 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc13-4
|
||||||
|
- Adjusted %dist to rebuild
|
||||||
|
- Resolves: #211012
|
||||||
|
|
||||||
|
* Mon Sep 10 2007 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc13-4
|
||||||
|
- Missed a bug with dm map names
|
||||||
|
- Resolves: #211012
|
||||||
|
|
||||||
|
* Tue Jun 26 2007 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc13-3
|
||||||
|
- Fix dmraid map names
|
||||||
|
- Resolves: #211012
|
||||||
|
- Fix unaligned access messages
|
||||||
|
Resolves: #210361, #211150
|
||||||
|
- Fix jmicron name parsing (bz#219058)
|
||||||
|
|
||||||
|
* Wed Nov 8 2006 Peter Jones <pjones@redhat.com> - 1.0.0.rc13-2
|
||||||
|
- We didn't change the API or ABI, so don't change the version number
|
||||||
|
because it'll change the SONAME, which means we have to needlessly rebuild
|
||||||
|
other packages.
|
||||||
|
|
||||||
|
* Wed Nov 08 2006 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc14-1
|
||||||
|
- asr.c: fixed Adaptec HostRAID DDF1 metadata discovery (bz#211016)
|
||||||
|
- ddf1_crc.c: added crc() routine to avoid linking to zlib alltogether,
|
||||||
|
because Ubuntu had problems with this
|
||||||
|
- dropped zlib build requirement
|
||||||
|
|
||||||
|
* Thu Oct 26 2006 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc14-bz211016-1
|
||||||
|
- ddf1.c: get_size() fixed (bz#211016)
|
||||||
|
- ddf1_lib.c: ddf1_cr_off_maxpds_helper() fixed (bz#211016)
|
||||||
|
|
||||||
|
* Wed Oct 11 2006 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc13-1
|
||||||
|
- metadata.c: fixed bug returning wrang unified RAID type (bz#210085)
|
||||||
|
- pdc.c: fixed magic number check
|
||||||
|
|
||||||
|
* Sun Oct 01 2006 Jesse Keating <jkeating@redhat.com> - 1.0.0.rc12-7
|
||||||
|
- rebuilt for unwind info generation, broken in gcc-4.1.1-21
|
||||||
|
|
||||||
|
* Fri Sep 22 2006 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc12-1
|
||||||
|
- sil.c: quorate() OBO fix
|
||||||
|
- activate.c: handler() OBO fix
|
||||||
|
- added SNIA DDF1 support
|
||||||
|
- added reload functionality to devmapper.c
|
||||||
|
- added log_zero_sectors() to various metadata format handlers
|
||||||
|
- sil.[ch]: added JBOD support
|
||||||
|
|
||||||
|
* Fri Sep 1 2006 Peter Jones <pjones@redhat.com> - 1.0.0.rc11-4
|
||||||
|
- Require kpartx, so initscripts doesn't have to if you're not using dmraid
|
||||||
|
|
||||||
|
* Thu Aug 17 2006 Jesse Keating <jkeating@redhat.com> - 1.0.0.rc11-3
|
||||||
|
- Change Release to follow guidelines, and add dist tag.
|
||||||
|
|
||||||
|
* Thu Aug 17 2006 Peter Jones <pjones@redhat.com> - 1.0.0.rc11-FC6.3
|
||||||
|
- No more excludearch for s390/s390x
|
||||||
|
|
||||||
|
* Fri Jul 28 2006 Peter Jones <pjones@redhat.com> - 1.0.0.rc11-FC6.2
|
||||||
|
- Fix bounds checking on hpt37x error log
|
||||||
|
- Only build the .so, not the .a
|
||||||
|
- Fix asc.c duplication in makefile rule
|
||||||
|
|
||||||
|
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.0.0.rc11-FC6.1.1
|
||||||
|
- rebuild
|
||||||
|
|
||||||
|
* Fri Jul 7 2006 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc11-FC6.1
|
||||||
|
- rebuilt for FC6 with dos partition discovery fix (#197573)
|
||||||
|
|
||||||
|
* Tue May 16 2006 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc11-FC6
|
||||||
|
- rebuilt for FC6 with better tag
|
||||||
|
|
||||||
|
* Tue May 16 2006 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc11-FC5_7.2
|
||||||
|
- rebuilt for FC5
|
||||||
|
|
||||||
|
* Tue May 16 2006 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc11-FC5_7.1
|
||||||
|
- jm.c: checksum() calculation
|
||||||
|
- misc.c: support "%d" in p_fmt and fix segfault with wrong format identifier
|
||||||
|
- nv.c: size fix in setup_rd()
|
||||||
|
- activate.c:
|
||||||
|
o striped devices could end on non-chunk boundaries
|
||||||
|
o calc_region_size() calculated too small sizes causing large
|
||||||
|
dirty logs in memory
|
||||||
|
- isw.c: set raid5 type to left asymmetric
|
||||||
|
- toollib.c: fixed 'No RAID...' message
|
||||||
|
- support selection of RAID5 allocation algorithm in metadata format handlers
|
||||||
|
- build
|
||||||
|
|
||||||
|
* Mon Mar 27 2006 Milan Broz <mbroz@redhat.com> - 1.0.0.rc10-FC5_6.2
|
||||||
|
- fixed /var/lock/dmraid in specfile (#168195)
|
||||||
|
|
||||||
|
* Fri Feb 17 2006 Heinz Mauelshagen <heinzm@redhat.com> - 1.0.0.rc10-FC5_6
|
||||||
|
- add doc/dmraid_design.txt to %doc (#181885)
|
||||||
|
- add --enable-libselinux --enable-libsepol to configure
|
||||||
|
- rebuilt
|
||||||
|
|
||||||
|
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.0.0.rc9-FC5_5.2
|
||||||
|
- bump again for double-long bug on ppc(64)
|
||||||
|
|
||||||
|
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.0.0.rc9-FC5_5.1
|
||||||
|
- rebuilt for new gcc4.1 snapshot and glibc changes
|
||||||
|
|
||||||
|
* Sun Jan 22 2006 Peter Jones <pjones@redhat.com> 1.0.0.rc9-FC5_5
|
||||||
|
- Add selinux build deps
|
||||||
|
- Don't set owner during make install
|
||||||
|
|
||||||
|
* Fri Dec 9 2005 Jesse Keating <jkeating@redhat.com> 1.0.0.rc9-FC5_4.1
|
||||||
|
- rebuilt
|
||||||
|
|
||||||
|
* Sun Dec 3 2005 Peter Jones <pjones@redhat.com> 1.0.0.rc9-FC5_4
|
||||||
|
- rebuild for device-mapper-1.02.02-2
|
||||||
|
|
||||||
|
* Fri Dec 2 2005 Peter Jones <pjones@redhat.com> 1.0.0.rc9-FC5_3
|
||||||
|
- rebuild for device-mapper-1.02.02-1
|
||||||
|
|
||||||
|
* Thu Nov 10 2005 Peter Jones <pjones@redhat.com> 1.0.0.rc9-FC5_2
|
||||||
|
- update to 1.0.0.rc9
|
||||||
|
- make "make install" do the right thing with the DSO
|
||||||
|
- eliminate duplicate definitions in the headers
|
||||||
|
- export more symbols in the DSO
|
||||||
|
- add api calls to retrieve dm tables
|
||||||
|
- fix DESTDIR for 'make install'
|
||||||
|
- add api calls to identify degraded devices
|
||||||
|
- remove several arch excludes
|
||||||
|
|
||||||
|
* Sat Oct 15 2005 Florian La Roche <laroche@redhat.com>
|
||||||
|
- add -lselinux -lsepol for new device-mapper deps
|
||||||
|
|
||||||
|
* Fri May 20 2005 Heinz Mauelshagen <heinzm@redhat.com> 1.0.0.rc8-FC4_2
|
||||||
|
- specfile change to build static and dynamic binray into one package
|
||||||
|
- rebuilt
|
||||||
|
|
||||||
|
* Thu May 19 2005 Heinz Mauelshagen <heinzm@redhat.com> 1.0.0.rc8-FC4_1
|
||||||
|
- nv.c: fixed stripe size
|
||||||
|
- sil.c: avoid incarnation_no in name creation, because the Windows
|
||||||
|
driver changes it every time
|
||||||
|
- added --ignorelocking option to avoid taking out locks in early boot
|
||||||
|
where no read/write access to /var is given
|
||||||
|
|
||||||
|
* Wed Mar 16 2005 Elliot Lee <sopwith@redhat.com>
|
||||||
|
- rebuilt
|
||||||
|
|
||||||
|
* Tue Mar 15 2005 Heinz Mauelshagen <heinzm@redhat.com> 1.0.0.rc6.1-4_FC4
|
||||||
|
- VIA metadata format handler
|
||||||
|
- added RAID10 to lsi metadata format handler
|
||||||
|
- "dmraid -rD": file device size into {devicename}_{formatname}.size
|
||||||
|
- "dmraid -tay": pretty print multi-line tables ala "dmsetup table"
|
||||||
|
- "dmraid -l": display supported RAID levels + manual update
|
||||||
|
- _sil_read() used LOG_NOTICE rather than LOG_INFO in order to
|
||||||
|
avoid messages about valid metadata areas being displayed
|
||||||
|
during "dmraid -vay".
|
||||||
|
- isw, sil filed metadata offset on "-r -D" in sectors rather than in bytes.
|
||||||
|
- isw needed dev_sort() to sort RAID devices in sets correctly.
|
||||||
|
- pdc metadata format handler name creation. Lead to
|
||||||
|
wrong RAID set grouping logic in some configurations.
|
||||||
|
- pdc RAID1 size calculation fixed (rc6.1)
|
||||||
|
- dos.c: partition table code fixes by Paul Moore
|
||||||
|
- _free_dev_pointers(): fixed potential OOB error
|
||||||
|
- hpt37x_check: deal with raid_disks = 1 in mirror sets
|
||||||
|
- pdc_check: status & 0x80 doesn't always show a failed device;
|
||||||
|
removed that check for now. Status definitions needed.
|
||||||
|
- sil addition of RAID sets to global list of sets
|
||||||
|
- sil spare device memory leak
|
||||||
|
- group_set(): removal of RAID set in case of error
|
||||||
|
- hpt37x: handle total_secs > device size
|
||||||
|
- allow -p with -f
|
||||||
|
- enhanced error message by checking target type against list of
|
||||||
|
registered target types
|
||||||
|
|
||||||
|
* Fri Jan 21 2005 Alasdair Kergon <agk@redhat.com> 1.0.0.rc5f-2
|
||||||
|
- Rebuild to pick up new libdevmapper.
|
||||||
|
|
||||||
|
* Fri Nov 26 2004 Heinz Mauelshagen <heinzm@redhat.com> 1.0.0.rc5f
|
||||||
|
- specfile cleanup
|
||||||
|
|
||||||
|
* Tue Aug 20 2004 Heinz Mauelshagen <heinzm@redhat.com> 1.0.0-rc4-pre1
|
||||||
|
- Removed make flag after fixing make.tmpl.in
|
||||||
|
|
||||||
|
* Tue Aug 18 2004 Heinz Mauelshagen <heinzm@redhat.com> 1.0.0-rc3
|
||||||
|
- Added make flag to prevent make 3.80 from looping infinitely
|
||||||
|
|
||||||
|
* Thu Jun 17 2004 Heinz Mauelshagen <heinzm@redhat.com> 1.0.0-pre1
|
||||||
|
- Created
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user