| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This is needed on 4K block devices such as DASD as we do O_DIRECT
reads.
Do the same alignment for gpt just to be safe.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
| |
We were adding 1, presumably to avoid div-by-zero possibilities.
It is better to only substitute '1' if the value actually is zero,
else for small numbers of bits the difference is visible.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
| |
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
| |
This produced lots of warning, some of which pointed to actual bugs.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When left-shifting we must be sure that the value being
shifted is large enough to not lose bits.
The 'chunkssize' in CreateBitmap is only 'long' so it
can overflow. So cast to 'long long' first.
Also fix a similar issue in Detail even though it isn't currently
being compiled.
Signed-off-by: NeilBrown <neilb@suse.de>
Reported-by: Tomasz Chmielewski <mangoo@wpkg.org>
|
|
|
|
|
|
|
| |
In particular, if the relevant bitmap method is NULL, don't try to
call it, print an error instead.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
| |
Unlike native md checkpointing some data about the geometry and type of
the migration process is coded into curr_migr_unit. Provide logic to
convert between md/{resync_start|recovery_start} and imsm/curr_migr_unit.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
Build.c
mdadm.c
mdadm.h
super1.c
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Apparently the dereferencing of a type-punned pointer breaks strict
aliasing rules. And we wouldn't want to do that.
So just make a different array of the appropriate type and use memcpy.
Resolves-Debian-bug: 505375
Signed-off-by: NeilBrown <neilb@suse.de>
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We really should never divide by 0.
Thanks to "Jon Nelson" <jnelson-linux-raid@jamponi.net>
for finding the problem.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|\ \
| |/
| |
| |
| |
| | |
Conflicts:
Manage.c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When adding a device to an array, we check that it is large enough.
Currently the check makes sure there is also room for a reasonably
sized bitmap. But if the array doesn't have a bitmap, then this test
might be too restrictive.
So when adding, only insist there is enough space for the current
bitmap.
When Creating, still require room for the standard sized bitmap.
This resolved Debian Bug 500309
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Made the mistake of recompiling the F9 mdadm rpm which has a patch to
remove -Werror and add "-Wp,-D_FORTIFY_SOURCE -O2" which turns on lots
of errors:
config.c:568: warning: ignoring return value of asprintf
Assemble.c:411: warning: ignoring return value of asprintf
Assemble.c:413: warning: ignoring return value of asprintf
super0.c:549: warning: ignoring return value of posix_memalign
super0.c:742: warning: ignoring return value of posix_memalign
super0.c:812: warning: ignoring return value of posix_memalign
super1.c:692: warning: ignoring return value of posix_memalign
super1.c:1039: warning: ignoring return value of posix_memalign
super1.c:1155: warning: ignoring return value of posix_memalign
super-ddf.c:508: warning: ignoring return value of posix_memalign
super-ddf.c:645: warning: ignoring return value of posix_memalign
super-ddf.c:696: warning: ignoring return value of posix_memalign
super-ddf.c:715: warning: ignoring return value of posix_memalign
super-ddf.c:1476: warning: ignoring return value of posix_memalign
super-ddf.c:1603: warning: ignoring return value of posix_memalign
super-ddf.c:1614: warning: ignoring return value of posix_memalign
super-ddf.c:1842: warning: ignoring return value of posix_memalign
super-ddf.c:2013: warning: ignoring return value of posix_memalign
super-ddf.c:2140: warning: ignoring return value of write
super-ddf.c:2143: warning: ignoring return value of write
super-ddf.c:2147: warning: ignoring return value of write
super-ddf.c:2150: warning: ignoring return value of write
super-ddf.c:2162: warning: ignoring return value of write
super-ddf.c:2169: warning: ignoring return value of write
super-ddf.c:2172: warning: ignoring return value of write
super-ddf.c:2176: warning: ignoring return value of write
super-ddf.c:2181: warning: ignoring return value of write
super-ddf.c:2686: warning: ignoring return value of posix_memalign
super-ddf.c:2690: warning: ignoring return value of write
super-ddf.c:3070: warning: ignoring return value of posix_memalign
super-ddf.c:3254: warning: ignoring return value of posix_memalign
bitmap.c:128: warning: ignoring return value of posix_memalign
mdmon.c:94: warning: ignoring return value of write
mdmon.c:221: warning: ignoring return value of pipe
mdmon.c:327: warning: ignoring return value of write
mdmon.c:330: warning: ignoring return value of chdir
mdmon.c:335: warning: ignoring return value of dup
monitor.c:415: warning: rv may be used uninitialized in this function
...some of these like the write() ones are not so trivial so save those
fixes for the next patch.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
|/
|
|
|
|
|
|
| |
Using buffered IO risks non-atomic updates to parts of the
device that we don't actually want to write to. This isn't in
general safe.
So switch to O_DIRECT for all that IO and make sure we have
properly aligned buffers.
|
|
|
|
| |
It is now in the 'supertype'
|
| |
|
|
|
|
| |
Rather than opencoding the byteswap all the time.
|
|
|
|
| |
A number of odd bugs here, but now we have a regression test as well.
|
|
|
|
| |
To ensure kernel never needs to allocate more than 1 page contiguously.
|
|
|
|
|
| |
Otheriwse the last write happens on fclose which is after ftruncate,
to the truncate has no effect.
|
|
|
|
| |
From: Paul Clements <paul.clements@steeleye.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Luca Berra <bluca@vodka.it>
glibc 2.4 is pedantic on ignoring return values from fprintf, fwrite and
write, so now we check the rval and actually do something with it.
in the Grow.c case i only print a warning, since i don't think we can do
anything in case we fail invalidating those superblocks (is should never
happen, but then...)
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
| |
When creating a file bitmap, choose a default size that
results in fewer than 2^21 chunks. Without this kmalloc
failure in the kernel becomes likely.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
| |
A pending patch to the kernel causes bitmap file updates
to not go through the page cache, so O_DIRECT is needed to
ensure that we read current data.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
| |
And a couple of other little things
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
| |
Version-3 bitmaps are host-endian. Version-4 are little-endian
and so more portable.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
| |
Also some more tests - r5 and r6 bitmaps
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
|
|
|
|
|
|
|
|
| |
Currently this includes
--write-behind to set level of write-behind supported
--write-mostly to flag devices as write-mostly.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
|
|
|
|
|
|
|
| |
Assemble would crash, or just not work.
A few other problem found by a new test-suite.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
|
|
|
|
|
|
| |
To quiet diet-libc
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
|
|
|
|
|
|
| |
For version 0.90 superblocks, an internal bitmap can be specified at create.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
|
|
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
|