summaryrefslogtreecommitdiffstats
path: root/ANNOUNCE-3.3 (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-05-07Add "Name" defines to some ancillary programsNeilBrown2-0/+3
All programs now need to declare their "Name". Signed-off-by: NeilBrown <neilb@suse.de> Fixes: d56dd607ba43 ("Change way of printing name of a process")
2015-05-06Manage: fix test for 'is array failed'.NeilBrown1-1/+1
We 'active_disks' does not count spares, so if array is rebuilding, this will not necessarily find all devices, so may report an array as failed when it isn't. Counting up to nr_disks is better. Signed-off-by: NeilBrown <neilb@suse.de>
2015-04-09IMSM: Count arrays per oromPawel Baldysiak3-29/+71
Active arrays with IMSM metadata are counted per hba so far. This is bad due to new functionality of orom shared between multiple controllers i.e. more arrays can be created than is supported by orom. This patch changes the way of counting arrays, so the result will be sum of arrays under every hba supported by specific orom. Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
2015-04-08Assemble/force: make it possible to "force" a new device in a reshape.NeilBrown1-5/+30
Normally we do not "force"-assemble devices which are in the middle of recovery, as they are unlikely to have useful data. However, when a reshape increases the number of devices, the newly added devices appear to be recovering because they do not have complete data on them yet, but then they aren't expected to until the reshape completes. So in this case, it can be appropriate to force-assemble them. Reported-by: "Jonathan Harker (Jesusaurus)" <jesusaurus@gentlydownthe.net> Signed-off-by: NeilBrown <neilb@suse.de>
2015-04-08Assemble: remove stray ':' from error message.NeilBrown1-1/+1
Signed-off-by: NeilBrown <neilb@suse.de>
2015-04-08Assemble: allow a RAID4 to assemble easily when parity devices is missing.NeilBrown1-0/+7
If the parity device of a RAID4 is missing, then there is no immediate risk to data. So it doesn't matter if the array is dirty or not. This can be important when reshaping a RAID0, and is a much better solution that that in the resent-reverted. b720636a5849397dbc6dc1b0f0b671d17034a28b Reported-by: "Jonathan Harker (Jesusaurus)" <jesusaurus@gentlydownthe.net> Signed-off-by: NeilBrown <neilb@suse.de>
2015-04-08Revert "Assemble: support assembling of a RAID0 being reshaped."NeilBrown1-3/+1
This reverts commit b720636a5849397dbc6dc1b0f0b671d17034a28b. As it said, this was a hack. It causes problems when trying to --force assemble a RAID4. There is a better way. Reported-by: "Jonathan Harker (Jesusaurus)" <jesusaurus@gentlydownthe.net> Signed-off-by: NeilBrown <neilb@suse.de>
2015-04-08Assemble: fix "no uptodate device" message.NeilBrown1-1/+1
Since we introduced replacement devices, the 'i' used in start_array() is twice the slot number. So we need to adjust when printing. Signed-off-by: NeilBrown <neilb@suse.de>
2015-04-08Monitor: use the "space protocol" for "Wrong-Level".NeilBrown1-1/+1
"Wrong-Level" is a reason, not a component device, so it should start with a space to indiciate this to alert(). Signed-off-by: NeilBrown <neilb@suse.de>
2015-04-08Monitor: Obey "space protocol" when writing to syslog.NeilBrown1-1/+5
"alert" treats the "disc" arg differently if it starts with a space. At least it does for sending email. It doesn't for writing to syslog. Make this consistent and obey the 'space protocol' when writing to syslog. Signed-off-by: NeilBrown <neilb@suse.de>
2015-03-26reshape: support raid5 grow on certain older kernels.NeilBrown1-2/+13
Kernels between c6563a8c38fde3c1c7fc925a v3.5-rc1~110^2~53 and b5254dd5fdd9abcacadb5101 v3.5-rc1~110^2~51 allow new_offset to be set, but don't then allow a RAID5 to be reshaped to change that offset. Due to selective backports, this includes the SLES11-SP3 kernel. It is quite easy to handle this case in mdadm, so we do. Specifically: if the reshape with data-offset fails with EINVAL, abort the data-offset change and try the "old" way. Signed-off-by: NeilBrown <neilb@suse.de>
2015-03-04IncRemove: Set "auto-read" only after successful excl open.Pawel Baldysiak1-6/+10
"mdadm -If" - triggered from udev rules when disk is removed from OS - tries to set array in auto-read-only mode. This can interrupt rebuild process which is started automatically, e.g. if array is mounted and spare disk is available (I/O error is detected faster than removing failed disk by mdadm). This patch prevents "mdadm -If" from setting array into "auto-read-only", by requiring exclusive open to succeed. Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
2015-03-04IMSM-orom: make sure, that device list is supportedPawel Baldysiak1-1/+4
Devices list in PCI Data Structure is supported only in 3 and above revision. Make sure that this is checked. Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
2015-03-04imsm: simplified multiple OROMs supportArtur Paszkiewicz3-61/+57
Replaced oroms array with list, add_orom() now only appends to this list and add_orom_device_id() only appends devid_list node to an orom_entry. Reported-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
2015-03-04Assemble: don't ignore the return value from stat.NeilBrown1-7/+6
static checkers complain about that. So change the code to use 'fstat', as we really don't want to see an error here.. Reported-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
2015-03-04write_super_imsm_spares(): C statements are terminated by ;Jes Sorensen1-6/+6
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
2015-03-04IncrementalScan(): Make sure 'st' is valid before dereferencing itJes Sorensen1-1/+1
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
2015-02-24Grow.c: Fix classic readlink() buffer overflowJes Sorensen1-1/+1
The buffer passed on to readlink() needs to contain space for the terminating \0. See 'man 3 readlink' for details. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
2015-02-12Don't break long strings onto multiple lines.NeilBrown21-582/+275
It is best to keep strings all together so that they are easier to search for in the source code. If a string is so long that it looks ugly one line, them maybe it should be broken into multiple lines for display too. Only strings which contain a newline can be broken into multiple lines: "It is OK to\n" "break this string\n" Signed-off-by: NeilBrown <neilb@suse.de>
2015-02-12Consistently print program Name and __func__ in debug messages.NeilBrown14-272/+225
make dprintf() print program name and __func__, so that this messaging is consistent. Also remove all __func__ messages from pr_err(). We shouldn't leak that internal data in error message. If we really want function name there, we new pr_XXX might be wanted. Signed-off-by: NeilBrown <neilb@suse.de>
2015-02-12Change way of printing name of a processPawel Baldysiak11-31/+37
Sometimes mdadm prints messages with wrong name "mdmon", and vice versa. This patch solves this problem by changing method of determining process name. Now "Name" will be set in const at start of a program, previously was hardcoded as #define. Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com> Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
2015-02-11Monitor: fix for regression with container devicesArtur Paszkiewicz1-4/+10
This patch fixes 2 problems introduced by commit 9a518d8: not closing a file descriptor and ignoring container devices. Array state is always "inactive" for containers, so we make sure that the device is not a container by reading also the "level" sysfs entry. Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Reviewed-by: Pawel Baldysiak <pawel.baldysiak@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
2015-02-03mdcheck: be careful when sourcing the output of "mdadm --detail --export"NeilBrown1-1/+1
The output of "mdadm --detail --export" isn't quoted properly so fields that contain spaces can be a problem. We only want the MD_UUID field, and it has a very well defined format with no spaces. So use 'grep' to limit the output to just that. Signed-off-by: NeilBrown <neilb@suse.de>
2015-01-29IMSM: Clear migration record on disks more oftenPawel Baldysiak1-0/+26
Migration record is not always cleared after successful migration. This can block another reshape from being started. Migration will not be continued via systemd service due to error in verifying reshape position. This patch added clearing migration record when disk is added to container, and after successful migration. Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
2014-12-18util: remove rounding error where reporting "human sizes".NeilBrown1-4/+4
The division 1<<20 / 200 is not exact, so dividing by this to convert bytes into half-megs is wrong and results in incorrect output. As we are doing "long long" arithmetic, there is no risk of an overflow until we reach 64 petabytes. So change to * 200 / (1<<20). Reported-by: Jan Echternach <jan@goneko.de> Resolved-debian-bug: 763917 URL: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763917 Signed-off-by: NeilBrown <neilb@suse.de>
2014-12-01Grow: Fix wrong 'goto' in set_new_data_offsetPawel Baldysiak1-1/+1
Commit a821c95f114724b38df1ea99b2858178e0ed28ce besides introducing additional message, also changed direct return to "goto" instruction. 'goto release' will cause routine to return with '-1', when previously '1' was returned. Described behaviour breaks e.g. IMSM reshape process. This patch fixes this issue by changing 'goto' to proper one - the one that returns '1'. Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
2014-11-25Monitor: don't open md array that doesn't exist.NeilBrown1-1/+22
Opening a block-special-device for an array that doesn't exist causes that array to be instantiated (as an empty array). Races at array shutdown can cause the array to spontaneously re-appear if some deamon notices a 'change' event and goes to investigate. Teach "mdadm --monitor" to avoid this race by checking the "array_state" before opening the device. Reported-by: Francis Moreau <francis.moro@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
2014-11-25Makefile: binaries shouldn't directly depend on check_rundirNeilBrown1-3/+3
check_rundir always needs to be "built", so making mdadm and mdmon depend on it causes them to always be built. i.e. running make ; make will needlessly link the binaries a second time. So change the makefile to use "order-only" pre-requisites. Reported-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: NeilBrown <neilb@suse.de>
2014-11-25imsm: use efivarfs interface for reading UEFI variablesArtur Paszkiewicz1-1/+36
Read UEFI variables using the new efivarfs interface, fallback to sysfs-efivars if that fails. Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
2014-11-25imsm: detail-platform improvementsArtur Paszkiewicz3-39/+103
Print platform details per OROM, not per controller, differentiate RST(e) platforms from legacy IMSM, print NVMe device paths, adjust port printing to newer sysfs path. Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
2014-11-25imsm: add support for NVMe devicesPawel Baldysiak3-6/+56
Recognize Intel(R) NVMe devices as IMSM-capable. Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com> Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
2014-11-25imsm: support for second and combined AHCI controllers in UEFI modeArtur Paszkiewicz1-1/+23
Grantly platform introduces a second AHCI controller (sSATA) and two new UEFI variables for the RSTe firmware. This patch adds support for those variables in order to correctly determine IMSM platform capabilities in UEFI mode. Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
2014-11-25imsm: support for OROMs shared by multiple HBAsArtur Paszkiewicz3-144/+243
The IMSM platform code was based on an assumption that the OROM or UEFI capability structure (represented by struct imsm_orom) always belongs to only one HBA. This assumption is no longer valid, because of newer platforms with dual AHCI HBAs. Each HBA can have a separate OROM, but some versions have a combined OROM for both HBAs. This patch implements this HBA-OROM relationship in struct orom_entry, which matches an OROM with a list of HBA PCI ids. All the detected orom_entries are stored and retrieved using a global array and the functions add_orom(), add_orom_device_id() and get_orom_by_device_id(). This replaces the arrays: imsm_orom, populated_orom, imsm_efi, populated_efi. The scan() function is extended to find all HBAs for an OROM. The list of their device ids is retrieved from the PCI Expansion ROM Data Structure, hence the additional field devListOffset in struct pciExpDataStructFormat. In UEFI mode we can't read the PCI Expansion ROM Data Structure and the imsm_orom structures are stored in UEFI variables. They do not provide a similar device id list, so we also check the HBA PCI class to make sure that the HBA has RAID mode enabled. In super-intel.c there are changes which allow spanning of IMSM containers over HBAs of the same type, but only if the HBAs share the same OROM. This is done by comparing imsm_orom pointers, which (outside of platform-intel.c) always point to the global array containing all the detected oroms. Additional warnings are added to validate_container_imsm() to warn about potentially dangerous operations in all the possible cases, e.g. when an array is assembled using disks attached to HBAs with separate OROMs. Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
2014-11-05Incremental: don't be distracted by partition table when calling try_spare.NeilBrown1-2/+2
Currently a partition table on a device makes "mdadm -I" think the array has a particular metadata type and so will only add it to an array of that (partition table) type .. which doesn't make any sense. So tell guess_super to only look for 'array' metadata. Reported-by: Caspar Smit <c.smit@truebit.nl> Signed-off-by: NeilBrown <neilb@suse.de>
2014-11-03Detail: fix handling of 'disks' array.NeilBrown1-4/+4
Since the introduction of replacement devices, we reserve to places in the "disks" array for each raid disk. That means we should allocate to twice "max_disk" as the array could have that many raid_disks (though that would limit the number of replacements). A couple of other places need to use "max_disks*2" instead of "max_disks" to co-ordinate with this. Reported-by: Or Sagi <ors@reduxio.com> Signed-off-by: NeilBrown <neilb@suse.de>
2014-11-03super1: remove some debugging printfs in update_super1NeilBrown1-4/+0
These should never have been there. Signed-off-by: NeilBrown <neilb@suse.de>
2014-11-03Rebuildmap: strip local host name from device name.NeilBrown1-3/+10
When /run/mdadm/map is being rebuilt, e.g. by "mdadm -Ir", if the device doesn't exist in /dev, we have to choose a name. Currently we don't strip the hostname which is wrong if it is the local host. Reported-by: Stephen Kent <smkent@smkent.net> Signed-off-by: NeilBrown <neilb@suse.de>
2014-11-03mdcheck: don't git error if not /dev/md?* devices exist.NeilBrown1-0/+1
If there are no such devices, the 'for' will set '$dev' to '/dev/md?*', which should be ignored. Signed-off-by: NeilBrown <neilb@suse.de>
2014-10-29Grow: fix resize of array component size to > 32bitsJustin Maggard1-1/+1
If the request --size to --grow an array to is larger than 32bits, then mdadm may make the wrong choice and use ioctl instead of setting component_size via sysfs and the change is ignored. Instead of using casts to check for a 32-bit overflow, just check for set bits outside of INT32_MAX. Fixes: 4e9a3dd16d656b269f5602624ac4f7109a571368 Signed-off-by: NeilBrown <neilb@suse.de>
2014-09-17mdmon: already read sysfs files once after opening.NeilBrown1-7/+23
seq_file in the kernel will allocate a read buffer on first read. We want this to happen under the managemon thread, not the 'monitor' thread, as the latter is not allow to allocate memory (might deadlock). So do a first read after opening. Signed-off-by: NeilBrown <neilb@suse.de>
2014-09-03Grow: Report when grow needs metadata updateAndy Smith1-1/+3
Report when the array's metadata needs updating instead of just reporting the generic "kernel too old" message. Signed-off-by: Andy Smith <andy@strugglers.net> Signed-off-by: NeilBrown <neilb@suse.de>
2014-08-27--update: add 'bbl' and 'no-bbl' to the list of known updates.NeilBrown1-1/+3
so "mdadm -A --update=?" mentions them. Reported-by: Peter Hoeg <peter@hoeg.com> Signed-off-by: NeilBrown <neilb@suse.de>
2014-08-21Release mdadm-3.3.2mdadm-3.3.2NeilBrown7-6/+23
Minor bugfix/stability release. Signed-off-by: NeilBrown <neilb@suse.de>
2014-08-21Fix parallel make problem.Samuli Suominen1-9/+9
When make is called with, for example, "make -j9 install install-system" i.e. both install and install-systemd targets at the same line and with high -j value, then the same install.tmp file was used, and udev rules ends up in systemd service files, or otherway around. For more information, see: http://www.spinics.net/lists/raid/msg46782.html http://bugs.gentoo.org/show_bug.cgi?id=517218 Signed-off-by: NeilBrown <neilb@suse.de>
2014-08-21super1: make sure 'room' includes 'bbl_size' when creating array.NeilBrown1-2/+2
Because we then go ahead and subtrace bbl_size from room. Signed-off-by: NeilBrown <neilb@suse.de>
2014-08-15super1: don't allow adding a bitmap if there is no space.NeilBrown1-0/+4
If the data is too close to the superblock there may be no space for a bitmap. If that happens, fail the adding of the bitmap rather than corrupt data. Reported-by: Lars Wijtemans <rhelbugzilla@lars.wijtemans.nl> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=922944
2014-08-14Monitor: Stop monitoring devices that have disappeared.NeilBrown1-6/+18
If we are only monitoring a device because we found it in /proc/mdstat, and it has been gone for 5 checks, forget about it completely. Signed-off-by: NeilBrown <neilb@suse.de>
2014-08-14mdadm: document some more magic environment variables.NeilBrown1-0/+26
Others are mostly for developers. Signed-off-by: NeilBrown <neilb@suse.de>
2014-08-11Manage: fix removal of non-existent devices.NeilBrown1-1/+7
"--remove detached" and others stopped working a while back when I refactored some code. For 'remove' and 'fail', the device may not exist so if it is "MM:mm", (e.g. added by "detached"), just parse out the numbers. Reported-by: Killian De Volder <killian.de.volder@megasoft.be> Signed-off-by: NeilBrown <neilb@suse.de>
2014-08-11util: split get_maj_min() out from dev_open()NeilBrown2-5/+11
This allows other code to parse "8:3" style device names. Signed-off-by: NeilBrown <neilb@suse.de>