]> sourceware.org Git - lvm2.git/log
lvm2.git
6 years agoRevert "build: Calculate dependencies at same time as compiling."
Joe Thornber [Fri, 4 May 2018 08:48:40 +0000 (09:48 +0100)]
Revert "build: Calculate dependencies at same time as compiling."

This reverts commit 0931067dc5549c443e144d599683b53220021f44.

The dep files should be in the build dir, which is not necc. the src dir.

Easy to fix, but reverting for now until I have time to revisit.

6 years agoMerge branch '2018-05-03-improve-bcache-utils'
Joe Thornber [Thu, 3 May 2018 19:15:13 +0000 (20:15 +0100)]
Merge branch '2018-05-03-improve-bcache-utils'

6 years agounit-test: a bunch of tests for bcache-utils
Joe Thornber [Thu, 3 May 2018 19:13:13 +0000 (20:13 +0100)]
unit-test: a bunch of tests for bcache-utils

6 years agolvconvert: don't return success on degraded -m raid1 conversion
Heinz Mauelshagen [Thu, 3 May 2018 16:00:21 +0000 (18:00 +0200)]
lvconvert: don't return success on degraded -m raid1 conversion

In case "lvconvert -mN RaidLV" was used on a degraded
raid1 LV, success was returned instead of an error.

Provide message to inform about the need to repair first
before changing number of mirrors and exit with error.

Add new lvconvert-m-raid1-degraded.sh test.

Resolves: rhbz1573960

6 years agoconfigure.ac: bad configure generated due to stray ;;
Joe Thornber [Thu, 3 May 2018 14:38:05 +0000 (15:38 +0100)]
configure.ac: bad configure generated due to stray ;;

6 years agoMerge branch 'master' of git+ssh://sourceware.org/git/lvm2
Joe Thornber [Thu, 3 May 2018 13:23:12 +0000 (14:23 +0100)]
Merge branch 'master' of git+ssh://sourceware.org/git/lvm2

6 years agofunctional tests: Update have_raid function
Joe Thornber [Thu, 3 May 2018 13:22:24 +0000 (14:22 +0100)]
functional tests: Update have_raid function

No need to check if it's built in.

6 years agoconfigure.ac: Remove some more remnants of optional RAID
Joe Thornber [Thu, 3 May 2018 13:21:21 +0000 (14:21 +0100)]
configure.ac: Remove some more remnants of optional RAID

(It's now always 'internal')

6 years agobcache-utils: rewrite
Joe Thornber [Thu, 3 May 2018 10:36:15 +0000 (11:36 +0100)]
bcache-utils: rewrite

They take care to avoid redundant reads now.

6 years agobcache: rename bcache_write_zeroes() -> bcache_zero_bytes()
Joe Thornber [Thu, 3 May 2018 09:21:14 +0000 (10:21 +0100)]
bcache: rename bcache_write_zeroes() -> bcache_zero_bytes()

Now matches the other util functions:

bcache_{prefetch,read,write,zero}_bytes()

6 years agobcache: rewrite bcache_write_zeros()
Joe Thornber [Thu, 3 May 2018 09:14:56 +0000 (10:14 +0100)]
bcache: rewrite bcache_write_zeros()

It now uses GF_ZERO to avoid reading blocks that are going to be
completely zeroed.

6 years agobcache: switch off_t -> uint64_t
Joe Thornber [Thu, 3 May 2018 08:37:43 +0000 (09:37 +0100)]
bcache: switch off_t -> uint64_t

We always want it to be 64bit

6 years agobcache: Move the utils to a separate file.
Joe Thornber [Thu, 3 May 2018 08:34:41 +0000 (09:34 +0100)]
bcache: Move the utils to a separate file.

This makes it clearer that they don't access the cache internals.

6 years agobcache: add bcache_block_sectors() query fn
Joe Thornber [Thu, 3 May 2018 08:33:55 +0000 (09:33 +0100)]
bcache: add bcache_block_sectors() query fn

6 years agobcache: add a comment
Joe Thornber [Thu, 3 May 2018 08:14:59 +0000 (09:14 +0100)]
bcache: add a comment

6 years agofilters: increase MAX_FILTERS for new filter
David Teigland [Wed, 2 May 2018 19:10:30 +0000 (14:10 -0500)]
filters: increase MAX_FILTERS for new filter

The new signature filter was added without increasing this.

6 years agobcache: reorder includes in .c file too
Joe Thornber [Wed, 2 May 2018 18:45:06 +0000 (19:45 +0100)]
bcache: reorder includes in .c file too

6 years agodevice/bcache: reorder includes
Joe Thornber [Wed, 2 May 2018 17:59:43 +0000 (18:59 +0100)]
device/bcache: reorder includes

6 years agobuild: add -D_FILE_OFFSET_BITS=64
Joe Thornber [Wed, 2 May 2018 17:40:38 +0000 (18:40 +0100)]
build: add -D_FILE_OFFSET_BITS=64

I don't like having this in a common header because it means you end
up including too much and causing unneccessary dependencies.  eg,
lib/misc/lib.h includes libdevmapper.h, internationalisation, and
logging stuff.

6 years agounit-test/matcher_t: Fixup Kabi's test
Joe Thornber [Wed, 2 May 2018 12:53:43 +0000 (13:53 +0100)]
unit-test/matcher_t: Fixup Kabi's test

The matcher matches the regexes in reverse order.

6 years agounit-test/matcher_t: add another (failing!) test for Kabi
Joe Thornber [Wed, 2 May 2018 12:31:57 +0000 (13:31 +0100)]
unit-test/matcher_t: add another (failing!) test for Kabi

6 years agotests: add gfs-pool test
David Teigland [Tue, 1 May 2018 20:24:42 +0000 (15:24 -0500)]
tests: add gfs-pool test

Put back a test like the old one that was removed
in d709d8445f206b67cfc06266ce7553f9cb6f3df5.

It verifies that lvm will ignore and not use a
gfs-pool device.

6 years agodevices: ignore lvm1 and pool devices
David Teigland [Tue, 1 May 2018 19:32:15 +0000 (14:32 -0500)]
devices: ignore lvm1 and pool devices

6 years agoMerge branch 'master' of git+ssh://sourceware.org/git/lvm2
Joe Thornber [Tue, 1 May 2018 19:04:30 +0000 (20:04 +0100)]
Merge branch 'master' of git+ssh://sourceware.org/git/lvm2

6 years agoRevert "build: Stop creating the symlinks in include/ on the fly."
Joe Thornber [Tue, 1 May 2018 19:03:51 +0000 (20:03 +0100)]
Revert "build: Stop creating the symlinks in include/ on the fly."

This reverts commit cdcea0bf55c170f538c3ffc114792eb3c993f4ac.

6 years agotests: remove use of lvm1 metadatatype
David Teigland [Tue, 1 May 2018 18:28:10 +0000 (13:28 -0500)]
tests: remove use of lvm1 metadatatype

6 years agotests: remove gfs pool test
David Teigland [Tue, 1 May 2018 18:25:40 +0000 (13:25 -0500)]
tests: remove gfs pool test

6 years agotests: update lvmetad-disabled to not use lvm1
David Teigland [Tue, 1 May 2018 16:32:15 +0000 (11:32 -0500)]
tests: update lvmetad-disabled to not use lvm1

6 years agobcache_write_bytes needs to be followed by flush
David Teigland [Tue, 1 May 2018 14:33:55 +0000 (09:33 -0500)]
bcache_write_bytes needs to be followed by flush

The improved bcache_write_bytes is not flushing, so
the caller needs to do that.

6 years agolvmcache: fix typo in lvmcache_get_saved_vg
David Teigland [Tue, 1 May 2018 14:06:04 +0000 (09:06 -0500)]
lvmcache: fix typo in lvmcache_get_saved_vg

6 years agounit-test/bcache_t: test was using too large a block size
Joe Thornber [Tue, 1 May 2018 13:17:12 +0000 (14:17 +0100)]
unit-test/bcache_t: test was using too large a block size

6 years agobcache: squash some warnings on rhel6
Joe Thornber [Tue, 1 May 2018 12:21:53 +0000 (13:21 +0100)]
bcache: squash some warnings on rhel6

6 years agounit-test/bcache_t: Use a stripped down fixture for some tests
Joe Thornber [Tue, 1 May 2018 11:54:57 +0000 (12:54 +0100)]
unit-test/bcache_t: Use a stripped down fixture for some tests

6 years agobuild: update ./configure and configure.h.in
Joe Thornber [Tue, 1 May 2018 11:12:07 +0000 (12:12 +0100)]
build: update ./configure and configure.h.in

Fallout from Dave's removal of format1 and pool.

6 years agobcache: rewrite bcache_{write,zero}_bytes
Joe Thornber [Tue, 1 May 2018 11:07:33 +0000 (12:07 +0100)]
bcache: rewrite bcache_{write,zero}_bytes

These are utility functions so should only use the public interface.

Also write_bytes was flushing, which will kill performance.

6 years agoMerge branch 'master' of git+ssh://sourceware.org/git/lvm2
Joe Thornber [Tue, 1 May 2018 09:48:42 +0000 (10:48 +0100)]
Merge branch 'master' of git+ssh://sourceware.org/git/lvm2

6 years agounit-test/io_engine_t: add a little test for bcache_{read,write}_bytes
Joe Thornber [Tue, 1 May 2018 09:47:40 +0000 (10:47 +0100)]
unit-test/io_engine_t: add a little test for bcache_{read,write}_bytes

6 years agounit-test/bcache_t: fixup a test.
Joe Thornber [Tue, 1 May 2018 08:17:55 +0000 (09:17 +0100)]
unit-test/bcache_t: fixup a test.

Problem found with valgrind.

6 years agoRemove lvm1 and pool disk formats
David Teigland [Fri, 27 Apr 2018 21:22:46 +0000 (16:22 -0500)]
Remove lvm1 and pool disk formats

There are likely more bits of code that can be removed,
e.g. lvm1/pool-specific bits of code that were identified
using FMT flags.

The vgconvert command can likely be reduced further.

The lvm1-specific config settings should probably have
some other fields set for proper deprecation.

6 years agoclvmd: don't repair vg from vg_read in clvmd
David Teigland [Mon, 30 Apr 2018 20:47:00 +0000 (15:47 -0500)]
clvmd: don't repair vg from vg_read in clvmd

The mixed up vg repair code in vg_read was trying
to repair a vg when vg_read was called by clvmd.
The clvmd daemon isn't supposed to be repairing
or writing a vg.

(This is a temporary workaround; vg repair will soon
be pulled out of vg_read so it can be called in a
controlled way and consolidated instead of spread
around.)

6 years agotests: fix THIN built-in check
David Teigland [Mon, 30 Apr 2018 18:10:52 +0000 (13:10 -0500)]
tests: fix THIN built-in check

6 years agoclvmd: keep old saved_vg if it matches new
David Teigland [Mon, 30 Apr 2018 18:00:05 +0000 (13:00 -0500)]
clvmd: keep old saved_vg if it matches new

There is no need to release the old saved_vg
if it matches the new version.

6 years agounit-test/io_engine_t: Improve the read test.
Joe Thornber [Mon, 30 Apr 2018 16:09:24 +0000 (17:09 +0100)]
unit-test/io_engine_t: Improve the read test.

Now verifies what it reads.

6 years agounit-test/io_engine_t: use posix_memalign() rather than aligned_alloc()
Joe Thornber [Mon, 30 Apr 2018 15:55:19 +0000 (16:55 +0100)]
unit-test/io_engine_t: use posix_memalign() rather than aligned_alloc()

Not present on older systems.

6 years agoMerge branch 'master' of git+ssh://sourceware.org/git/lvm2
Joe Thornber [Mon, 30 Apr 2018 15:33:57 +0000 (16:33 +0100)]
Merge branch 'master' of git+ssh://sourceware.org/git/lvm2

6 years agoconfigure: Remove --enable-testing
Joe Thornber [Mon, 30 Apr 2018 15:31:33 +0000 (16:31 +0100)]
configure: Remove --enable-testing

6 years agobuild: fix typo in dmeventd/plugins/Makefile.in
Joe Thornber [Mon, 30 Apr 2018 14:31:57 +0000 (15:31 +0100)]
build: fix typo in dmeventd/plugins/Makefile.in

6 years agotoollib: fix wrong dev reference in process_each_label
David Teigland [Mon, 30 Apr 2018 14:08:40 +0000 (09:08 -0500)]
toollib: fix wrong dev reference in process_each_label

6 years agobuild: Remove unused Makefiles from configure.ac
Joe Thornber [Mon, 30 Apr 2018 13:58:45 +0000 (14:58 +0100)]
build: Remove unused Makefiles from configure.ac

Should have been in earlier patch.

6 years agobuild: remove --with-{snapshots,mirrors,raid,thin,cache} options from ./configure
Joe Thornber [Mon, 30 Apr 2018 09:11:23 +0000 (10:11 +0100)]
build: remove --with-{snapshots,mirrors,raid,thin,cache} options from ./configure

It now behaves as if the were all set as 'internal'

6 years agoMerge branch 'master' of git+ssh://sourceware.org/git/lvm2
Joe Thornber [Mon, 30 Apr 2018 08:56:04 +0000 (09:56 +0100)]
Merge branch 'master' of git+ssh://sourceware.org/git/lvm2

6 years ago[scripts] remove scripts/vg_convert
Joe Thornber [Mon, 12 Feb 2018 16:14:32 +0000 (16:14 +0000)]
[scripts] remove scripts/vg_convert

- it doesn't do anything other than tell you to run vgconvert
- it used to convert from lvm1 format, which is obsolete

6 years ago[metadata-liblvm.c] comment out some dead code and add a FIXME
Joe Thornber [Mon, 12 Feb 2018 14:14:40 +0000 (14:14 +0000)]
[metadata-liblvm.c] comment out some dead code and add a FIXME

6 years ago[lvmetad.h] Use static inline functions to stub out functions.
Joe Thornber [Mon, 12 Feb 2018 13:41:27 +0000 (13:41 +0000)]
[lvmetad.h] Use static inline functions to stub out functions.

The macros were causing warnings because the arguments were percieved as
unused.

6 years ago[build] uncomment 'serial 3' in an m4 file.
Joe Thornber [Mon, 12 Feb 2018 09:22:10 +0000 (09:22 +0000)]
[build] uncomment 'serial 3' in an m4 file.

Squashes another autoreconf warning

6 years agobuild: rename configure.in -> configure.ac
Joe Thornber [Mon, 30 Apr 2018 08:42:11 +0000 (09:42 +0100)]
build: rename configure.in -> configure.ac

Squashes a warning from autotools

6 years agotests: add also snapshot monitoring
Zdenek Kabelac [Sat, 28 Apr 2018 20:18:00 +0000 (22:18 +0200)]
tests: add also snapshot monitoring

6 years agomirror: improve table update
Zdenek Kabelac [Sat, 28 Apr 2018 20:14:47 +0000 (22:14 +0200)]
mirror: improve table update

Shift refresh of mirror table right into monitor_dev_for_events().
Use  !vg_write_lock_held() to recognize use of lvchange/vgchange.
(this shall change if this would no longer work, but requires
futher some API changes).

With this patch  dm mirror table is only refreshed when necassary.

Also update WARNING message about mirror usage without monitoring
and display LV name.

6 years agoaux: enhance teardown to better handle weird names
Zdenek Kabelac [Fri, 27 Apr 2018 21:23:45 +0000 (23:23 +0200)]
aux: enhance teardown to better handle weird names

When 'dmsetup' reports result with --nameprefixes it currently
incorrectly 'escapes' problematic characters.

Letting pass such string though shell 'eval' function is hard task.
So instead cut away substring.

Once dmsetup will start to properly escape backslash and apostrophe
this function may need further tuning.

6 years agoMerge branch 'master' of git+ssh://sourceware.org/git/lvm2 into merge
Joe Thornber [Mon, 30 Apr 2018 08:34:12 +0000 (09:34 +0100)]
Merge branch 'master' of git+ssh://sourceware.org/git/lvm2 into merge

6 years agobuild: Calculate dependencies at same time as compiling.
Joe Thornber [Mon, 30 Apr 2018 08:32:14 +0000 (09:32 +0100)]
build: Calculate dependencies at same time as compiling.

Speeds up the build slightly.

6 years agotest: remove pv-duplicate
David Teigland [Fri, 27 Apr 2018 16:42:58 +0000 (11:42 -0500)]
test: remove pv-duplicate

This wasn't testing duplicate PVs, which are tested by
process-each-duplicate-pvs.sh.

6 years agounit-tests: Move to test/unit
Joe Thornber [Fri, 27 Apr 2018 15:55:07 +0000 (16:55 +0100)]
unit-tests: Move to test/unit

6 years agobuild: Stop creating the symlinks in include/ on the fly.
Joe Thornber [Fri, 27 Apr 2018 15:06:59 +0000 (16:06 +0100)]
build: Stop creating the symlinks in include/ on the fly.

Git handles symlinks, tar handles symlinks.  So I've just put the
links themselves into git.

This simplifies dependencies a little, and stop some build loops I was
hitting.

External build dir now works too.

6 years agoRevert "build: Stop creating the symlinks in include/ on the fly."
Joe Thornber [Fri, 27 Apr 2018 14:30:08 +0000 (15:30 +0100)]
Revert "build: Stop creating the symlinks in include/ on the fly."

This reverts commit f8f621951315087c4e7720682be495941dc3cf37.

It wasn't taking builds outside the src dir into account.

6 years agobuild: Stop creating the symlinks in include/ on the fly.
Joe Thornber [Fri, 27 Apr 2018 14:12:15 +0000 (15:12 +0100)]
build: Stop creating the symlinks in include/ on the fly.

Git handles symlinks, tar handles symlinks.  So I've just put the
links themselves into git.

This simplifies dependencies a little, and stop some build loops I was
hitting.

6 years agobcache: write some sanity checks for the asyn io engine
Joe Thornber [Fri, 27 Apr 2018 13:24:05 +0000 (14:24 +0100)]
bcache: write some sanity checks for the asyn io engine

Mainly checks aio is installed properly.

6 years ago[bcache] Some work on bcache_invalidate()
Joe Thornber [Fri, 27 Apr 2018 09:56:13 +0000 (10:56 +0100)]
[bcache] Some work on bcache_invalidate()

bcache_invalidate() now returns a bool to indicate success.  If fails
if the block is currently held, or the block is dirty and writeback
fails.

Added a bunch of unit tests for the invalidate functions.

Fixed some bugs to do with invalidating errored blocks.

6 years ago[bcache] Add some unit tests for invalidate block.
Joe Thornber [Fri, 27 Apr 2018 08:12:57 +0000 (09:12 +0100)]
[bcache] Add some unit tests for invalidate block.

Trying to identify dct's lockup.

6 years agoclvmd: drop old saved_vg when returning new saved_vg
David Teigland [Thu, 26 Apr 2018 19:41:57 +0000 (14:41 -0500)]
clvmd: drop old saved_vg when returning new saved_vg

In some pvmove tests, clvmd uses the new (precommitted)
saved_vg, but then requests the old saved_vg, and
expects that the new saved_vg be returned instead of
the old.  So, when returning the new saved_vg, forget
the old one so we don't return it again.

6 years agoscan: refresh filters before scan
David Teigland [Thu, 26 Apr 2018 19:48:13 +0000 (14:48 -0500)]
scan: refresh filters before scan

The filters save information about devices that should
be ignored, so if we need to repeat a scan  (unusual,
but happens in clvmd), we need to update the filters.

6 years ago[bcache] get all unit tests passing again
Joe Thornber [Thu, 26 Apr 2018 12:13:27 +0000 (13:13 +0100)]
[bcache] get all unit tests passing again

6 years ago[unit-test] Push the new unit test framwork.
Joe Thornber [Thu, 26 Apr 2018 10:59:39 +0000 (11:59 +0100)]
[unit-test] Push the new unit test framwork.

See doc/unit-test.txt for details.

Some bcache tests failing.  Probably due to dct changing semantics, will
fix in follow up patch.

6 years agopvmove: in fork mode destroy bcache in child
David Teigland [Wed, 25 Apr 2018 21:23:55 +0000 (16:23 -0500)]
pvmove: in fork mode destroy bcache in child

When pvmove was run in background mode and forks
instead of using lvmpolld, the child pvmove process
was not clearing the bcache from the parent, so all
the aio ops in the child were failing.

6 years agoscan: don't use cmd mem pool in scan
David Teigland [Wed, 25 Apr 2018 20:48:19 +0000 (15:48 -0500)]
scan: don't use cmd mem pool in scan

Make it consistent with all the other allocations
in scanning.

6 years agoskip some clvmd-specific code in common cases
David Teigland [Wed, 25 Apr 2018 20:08:54 +0000 (15:08 -0500)]
skip some clvmd-specific code in common cases

This, or something like it, can probably be done
in many other places.

6 years agoclvmd: skip dev rescan after full scan
David Teigland [Tue, 24 Apr 2018 19:48:30 +0000 (14:48 -0500)]
clvmd: skip dev rescan after full scan

When clvmd does a full label scan just prior to
calling _vg_read(), pass a new flag into _vg_read
to indicate that the normal rescan of VG devs is
not needed.

6 years agoclvmd: reuse a vg struct for sequential LV operations
David Teigland [Tue, 24 Apr 2018 18:19:48 +0000 (13:19 -0500)]
clvmd: reuse a vg struct for sequential LV operations

After reading a VG, stash it in lvmcache as "saved_vg".
Before reading the VG again, try to use the saved_vg.
The saved_vg is dropped on VG lock operations.

6 years agolvmcache: rename suspended_vg to saved_vg
David Teigland [Tue, 24 Apr 2018 17:18:22 +0000 (12:18 -0500)]
lvmcache: rename suspended_vg to saved_vg

The copy of the VG which clvmd stashes in lvmcache should
not only be used between suspend and resume, but between
sequential LV operations in clvmd, so that clvmd does not
need to reread the VG for each one.  Prepare for that by
renaming the stashed VG as "saved_vg".

6 years agoMerge remote-tracking branch 'sourceware/master' into upstream
Joe Thornber [Wed, 25 Apr 2018 08:18:42 +0000 (09:18 +0100)]
Merge remote-tracking branch 'sourceware/master' into upstream

6 years agotests: more zero usage
Zdenek Kabelac [Wed, 21 Mar 2018 10:21:38 +0000 (11:21 +0100)]
tests: more zero usage

Another case where usage of zero backend for mirror legs is more
effective then using delayed_dev.

6 years agotests: update testing to not use delay dev
Zdenek Kabelac [Mon, 23 Apr 2018 19:26:05 +0000 (21:26 +0200)]
tests: update testing to not use delay dev

Instead of using delayer device user 'zero' device and let mirror
do some real work which takes some time.

In case the test machine is too fast - mirror might need to be made bigger
to meet needed criteria.

Also move all test needed this 'zero' PV trick to the end of test
so  $dev2  and $dev4 are covered with 'zero' and can take any amount of
write without consuming any real space.

6 years agodebug: more explanatory error message
Zdenek Kabelac [Mon, 23 Apr 2018 20:11:38 +0000 (22:11 +0200)]
debug: more explanatory error message

6 years agolvconvert: preserve regionsize from existing mirror
Zdenek Kabelac [Mon, 23 Apr 2018 20:13:03 +0000 (22:13 +0200)]
lvconvert: preserve regionsize from existing mirror

When adding leg to existing mirror - preserve its regionsize.

6 years agolvchange: update mirror table when changing monitoring
Zdenek Kabelac [Mon, 23 Apr 2018 19:28:35 +0000 (21:28 +0200)]
lvchange: update mirror table when changing monitoring

Since for non-monitored mirrors we let mirror running without
error handling - when monitoring changes for mirror, updated
table (refresh) is needed.

6 years agogcc: remove duplicate typedef
Zdenek Kabelac [Mon, 23 Apr 2018 20:28:47 +0000 (22:28 +0200)]
gcc: remove duplicate typedef

6 years ago[git] Update .gitignore
Joe Thornber [Mon, 29 Jan 2018 09:40:21 +0000 (09:40 +0000)]
[git] Update .gitignore

6 years agoclvm: rescan when VG or PV not found
David Teigland [Fri, 20 Apr 2018 21:09:49 +0000 (16:09 -0500)]
clvm: rescan when VG or PV not found

Rescan devices to update lvmcache content when
clvmd vg_read doesn't find a VG or PV.

6 years agoliblvm2app: missed the addition of lvmcache_label_scan
David Teigland [Fri, 20 Apr 2018 17:00:49 +0000 (12:00 -0500)]
liblvm2app: missed the addition of lvmcache_label_scan

6 years agoscan: skip device rescan in vg_read
David Teigland [Wed, 18 Apr 2018 21:29:42 +0000 (16:29 -0500)]
scan: skip device rescan in vg_read

For reporting commands (pvs,vgs,lvs,pvdisplay,vgdisplay,lvdisplay)
we do not need to repeat the label scan of devices in vg_read if
they all had matching metadata in the initial label scan.  The
data read by label scan can just be reused for the vg_read.
This cuts the amount of device i/o in half, from two reads of
each device to one.  We have to be careful to avoid repairing
the VG if we've skipped rescanning.  (The VG repair code is very
poor, and will be redone soon.)

6 years agolvmpolld: update to use new scanning correctly
David Teigland [Fri, 13 Apr 2018 19:40:00 +0000 (14:40 -0500)]
lvmpolld: update to use new scanning correctly

6 years agobcache: intercept test mode before write
David Teigland [Mon, 9 Apr 2018 18:57:44 +0000 (13:57 -0500)]
bcache: intercept test mode before write

Don't allow writes in test mode.  test mode should be
more sophisticated than just faking writes, and this
should be a last defense for cases where test mode is
not being checked correctly.

6 years agolvmcache: simplify
David Teigland [Mon, 9 Apr 2018 18:40:49 +0000 (13:40 -0500)]
lvmcache: simplify

Recent changes allow some major simplification of the way
lvmcache works and is used.  lvmcache_label_scan is now
called in a controlled fashion at the start of commands,
and not via various unpredictable side effects.  Remove
various calls to it from other places.  lvmcache_label_scan
should not be called from anywhere during a command, because
it produces an incorrect representation of PVs with no MDAs,
and misclassifies them as orphans.  This has been a long
standing problem.  The invalid flag and rescanning based on
that is no longer used and removed.  The 'force' variation is
no longer needed and removed.

6 years agodev_cache: clean up scan
David Teigland [Mon, 9 Apr 2018 16:13:43 +0000 (11:13 -0500)]
dev_cache: clean up scan

Pull out all of the twisted logic and simply call dev_cache_scan
at the start of the command prior to label scan.

6 years agoremove unnecessary REQUIRES_FULL_LABEL_SCAN
David Teigland [Fri, 6 Apr 2018 18:18:03 +0000 (13:18 -0500)]
remove unnecessary REQUIRES_FULL_LABEL_SCAN

we always scan all devices

6 years agoscan: improve io error checking and reporting
David Teigland [Fri, 6 Apr 2018 18:12:26 +0000 (13:12 -0500)]
scan: improve io error checking and reporting

6 years agobcache: let caller see an error
David Teigland [Fri, 6 Apr 2018 18:11:39 +0000 (13:11 -0500)]
bcache: let caller see an error

6 years agoscan: drop bcache between lvm shell commands
David Teigland [Fri, 6 Apr 2018 18:05:17 +0000 (13:05 -0500)]
scan: drop bcache between lvm shell commands

A running lvm shell keeps all lvm devices open
unless the bcache is dropped.

6 years agotests: vgck now exits with error for bad vg
David Teigland [Fri, 9 Mar 2018 19:18:38 +0000 (13:18 -0600)]
tests: vgck now exits with error for bad vg

6 years agolvmetad: more fixes related to bcache
David Teigland [Fri, 9 Mar 2018 17:39:12 +0000 (11:39 -0600)]
lvmetad: more fixes related to bcache

Need to open devs prior to bcache io.

This page took 0.065774 seconds and 5 git commands to generate.