]> sourceware.org Git - lvm2.git/log
lvm2.git
4 years agolvs: disable scanning optimization
David Teigland [Tue, 19 Nov 2019 16:27:02 +0000 (10:27 -0600)]
lvs: disable scanning optimization

The scanning optimization can produce warnings from
'lvs' when run concurrently with commands modifying LVs,
so disable the optimization until it can be improved.

Without the scanning optimization, lvs will always
read all PVs twice:

1. read metadata from all PVs, saving it in memory
2. for each VG
3. lock VG
4. reread metadata from all PVs in VG, replacing metadata
   saved from step 1
5. run command on VG
6. unlock VG

The optimization would usually cause step 4 to be skipped,
and PVs would be read only once.

Running the command in step 5 using metadata that was not
read under the VG lock is usually fine, except for the
fact that lvs attempts to validate the metadata by comparing
it to current dm state.  If other commands are modifying dm
state while lvs is running, lvs may see differences between
metadata from step 1 and dm state checked during step 5,
and print warnings.

(A better fix may be to detect the concurrent change and
fall back to rereading metadata in step 4 only when needed.)

4 years agotests: add more tracing info
Zdenek Kabelac [Fri, 15 Nov 2019 11:37:13 +0000 (12:37 +0100)]
tests: add more tracing info

4 years agotests: reduce amount of written date
Zdenek Kabelac [Fri, 15 Nov 2019 11:36:39 +0000 (12:36 +0100)]
tests: reduce amount of written date

Since we reduced created LV to 4M - dd also just 4M.

4 years agorevert "dmeventd: vdo plugin link lvm library"
Zdenek Kabelac [Fri, 15 Nov 2019 11:20:28 +0000 (12:20 +0100)]
revert "dmeventd: vdo plugin link lvm library"

This reverts commit cbabdf2fca6131660cfb5525ed9edb3f7a41525a.
and add extra comment why this code may look unused, but
in runtime is necessary.

4 years agoRevert "hints: rewrite function"
David Teigland [Thu, 14 Nov 2019 18:15:05 +0000 (12:15 -0600)]
Revert "hints: rewrite function"

This reverts commit 70fb31b5d6863248b5adfb2581b706cbb158b30e.

4 years agoRevert "debug: enhance debug messages"
David Teigland [Thu, 14 Nov 2019 18:11:53 +0000 (12:11 -0600)]
Revert "debug: enhance debug messages"

This reverts commit e92d3bd1f75d335fba5303c433516ea4ebe5cab1.

4 years agotests: enusure lib is initilized
Zdenek Kabelac [Thu, 14 Nov 2019 12:04:29 +0000 (13:04 +0100)]
tests: enusure lib is initilized

4 years agodebug: enhance debug messages
Zdenek Kabelac [Thu, 14 Nov 2019 16:00:56 +0000 (17:00 +0100)]
debug: enhance debug messages

4 years agohints: drop unneeded memset
Zdenek Kabelac [Thu, 14 Nov 2019 16:59:32 +0000 (17:59 +0100)]
hints: drop unneeded memset

strncpy will zero buffer itself.

4 years agohints: no need to check for NULL before free
Zdenek Kabelac [Thu, 14 Nov 2019 16:17:09 +0000 (17:17 +0100)]
hints: no need to check for NULL before free

free() itself checks for NULL.

4 years agocov: use zalloc
Zdenek Kabelac [Thu, 14 Nov 2019 16:13:58 +0000 (17:13 +0100)]
cov: use zalloc

Instead of malloc() memset() -> zalloc()

4 years agocov: add explicit ret value ignoring
Zdenek Kabelac [Thu, 14 Nov 2019 16:11:01 +0000 (17:11 +0100)]
cov: add explicit ret value ignoring

We don't need to check for any error result codes here.

4 years agocov: remove unused headers
Zdenek Kabelac [Thu, 14 Nov 2019 15:55:09 +0000 (16:55 +0100)]
cov: remove unused headers

4 years agocov: more checks for failing syscalls
Zdenek Kabelac [Thu, 14 Nov 2019 15:56:12 +0000 (16:56 +0100)]
cov: more checks for failing syscalls

4 years agodmeventd: vdo plugin link lvm library
Zdenek Kabelac [Thu, 14 Nov 2019 15:52:05 +0000 (16:52 +0100)]
dmeventd: vdo plugin link lvm library

Since we fixed linking of proper version of 'libdevmapper' with
linking lvm2 plugin correctly - we already have correct function
available linked with internal lvm library.
So drop unneeded include of parsing function.

4 years agocov: inline _build_desc_write
Zdenek Kabelac [Thu, 14 Nov 2019 15:58:18 +0000 (16:58 +0100)]
cov: inline _build_desc_write

Embed function into the code, since the function is actually
simpler written this as there are no memleak troubles
with failing allocation error path.

4 years agohints: check for _touch_hints
Zdenek Kabelac [Thu, 14 Nov 2019 17:01:05 +0000 (18:01 +0100)]
hints: check for _touch_hints

Exit when !_touch_hints().

4 years agohints: fix mem leaking buffers
Zdenek Kabelac [Thu, 14 Nov 2019 17:00:54 +0000 (18:00 +0100)]
hints: fix mem leaking buffers

4 years agohints: validate allocation result
Zdenek Kabelac [Thu, 14 Nov 2019 17:00:00 +0000 (18:00 +0100)]
hints: validate allocation result

4 years agohints: validate sscanf results
Zdenek Kabelac [Thu, 14 Nov 2019 16:59:17 +0000 (17:59 +0100)]
hints: validate sscanf results

4 years agohints: allocate hint only when needed
Zdenek Kabelac [Thu, 14 Nov 2019 16:57:43 +0000 (17:57 +0100)]
hints: allocate hint only when needed

Avoid mem leaking hint on every loop continue and
allocate hint only when it's going to be added into list.

Switch to use 'dm_strncpy()' and validate sizes.

4 years agohints: rewrite function
Zdenek Kabelac [Thu, 14 Nov 2019 16:15:18 +0000 (17:15 +0100)]
hints: rewrite function

4 years agopvck: check result of dev_get_size
Zdenek Kabelac [Thu, 14 Nov 2019 16:32:22 +0000 (17:32 +0100)]
pvck: check result of dev_get_size

Don't use garbage value for later computations.

4 years agocov: fix mem leaking buffer
Zdenek Kabelac [Thu, 14 Nov 2019 16:27:14 +0000 (17:27 +0100)]
cov: fix mem leaking buffer

Free allocated buffer on function's exit.
Also check for fwrite() results.

4 years agocov: avoid passing NULL to strstr function
Zdenek Kabelac [Thu, 14 Nov 2019 16:13:02 +0000 (17:13 +0100)]
cov: avoid passing NULL to strstr function

When 'str1' would be NULL, there is no point to run 2nd. strstr().

4 years agocov: check for retvalue
Zdenek Kabelac [Thu, 14 Nov 2019 16:12:44 +0000 (17:12 +0100)]
cov: check for retvalue

4 years agocov: fix memleak for duplicate device
Zdenek Kabelac [Thu, 14 Nov 2019 16:08:20 +0000 (17:08 +0100)]
cov: fix memleak for duplicate device

For  dev_in_device_list() != 0 allocated  'devl' was
actually leaking - so instead allocate 'devl' only
when !dev_in_device_list() and indent code around.

4 years agocov: check for NULL
Zdenek Kabelac [Thu, 14 Nov 2019 16:04:33 +0000 (17:04 +0100)]
cov: check for NULL

Since we check for NULL pointers earlier we need
to be consistent across function - since the NULL
would applies across whole function.

When dropping 'mda' check - we are actually
already dereferencing it before - so it can't
be NULL at that places (and it's validated
before entering  _read_mda_header_and_metadata).

4 years agodevtype: simplify code
Zdenek Kabelac [Thu, 14 Nov 2019 15:57:02 +0000 (16:57 +0100)]
devtype: simplify code

Update code with simpler form and check for fclose().

4 years agocov: fix memory leak
Zdenek Kabelac [Thu, 14 Nov 2019 15:23:38 +0000 (16:23 +0100)]
cov: fix memory leak

Reapply 23cc7ddc50e2800a6dc248de897a4c88c1514160 to internal version
of libdm.

4 years agofix dev_unset_last_byte after write error
Heming Zhao [Wed, 13 Nov 2019 15:15:07 +0000 (09:15 -0600)]
fix dev_unset_last_byte after write error

dev_unset_last_byte() must be called while the fd is still valid.
After a write error, dev_unset_last_byte() must be called before
closing the dev and resetting the fd.

In the write error path, dev_unset_last_byte() was being called
after label_scan_invalidate() which meant that it would not unset
the last_byte values.

After a write error, dev_unset_last_byte() is now called in
dev_write_bytes() before label_scan_invalidate(), instead of by
the caller of dev_write_bytes().

In the common case of a successful write, the sequence is still:
dev_set_last_byte(); dev_write_bytes(); dev_unset_last_byte();

Signed-off-by: Zhao Heming <heming.zhao@suse.com>
4 years agoWHATS_NEW: update
Zdenek Kabelac [Mon, 11 Nov 2019 16:44:14 +0000 (17:44 +0100)]
WHATS_NEW: update

4 years agotests: add test of resize of different segtypes
Zdenek Kabelac [Mon, 11 Nov 2019 16:43:24 +0000 (17:43 +0100)]
tests: add test of resize of different segtypes

4 years agolvextend: fix resizing volumes of different segtype
Zdenek Kabelac [Mon, 11 Nov 2019 16:36:58 +0000 (17:36 +0100)]
lvextend: fix resizing volumes of different segtype

When resizing 2 volumes like  thin-pool and it's metadata and they
would be of a different type - command would be actually expecting
both LVs being of a same segtype - and would throw an error in
case they are different.

This patch fixes is by setting a new segtype from last segment of
2nd. extented device.

Also it fixes the possible 'percentage' extension setup that
might have been used for 'primary' volume - while the 'secondary'
LV always goes with direct size - as we do not support 'percentage'
setup for them

This affects maily usage of thin-pool where the extension of
thin-pool data size may also lead to extension of metadata size.

4 years agotests: add extra settle
Zdenek Kabelac [Fri, 8 Nov 2019 14:09:17 +0000 (15:09 +0100)]
tests: add extra settle

To avoid removing, while 'add' might not have been processed yet.
(when emulating reboot in pvmove-restart)

4 years agotests: skip unneeded status check
Zdenek Kabelac [Fri, 8 Nov 2019 12:12:31 +0000 (13:12 +0100)]
tests: skip unneeded status check

If 'remove' was succesful - we can break loop immediatelly.

4 years agodaemons: check for non-zero thread_id
Zdenek Kabelac [Fri, 8 Nov 2019 12:10:49 +0000 (13:10 +0100)]
daemons: check for non-zero thread_id

Do not call pthread_join if thread_id would be 0.

4 years agodaemon: better error path handling for shutdown
Zdenek Kabelac [Fri, 8 Nov 2019 12:07:06 +0000 (13:07 +0100)]
daemon: better error path handling for shutdown

Report errors for open in better order.
Ensure descriptors are not leaked.

4 years agocov: ensure read_ahead is available
Zdenek Kabelac [Fri, 1 Nov 2019 20:01:51 +0000 (21:01 +0100)]
cov: ensure read_ahead is available

Make sure read_ahead pointer is not NULL when quering for RA.

4 years agocov: missing checks of syscalls
Zdenek Kabelac [Fri, 8 Nov 2019 14:42:42 +0000 (15:42 +0100)]
cov: missing checks of syscalls

Check for sigprocmask errors

4 years agogcc: avoid declaration shadowing
Zdenek Kabelac [Fri, 1 Nov 2019 18:35:28 +0000 (19:35 +0100)]
gcc: avoid declaration shadowing

dev_name is global in device.h

4 years agoman: adjust 'disks' to 'devices' as used throughout
Heinz Mauelshagen [Thu, 7 Nov 2019 16:45:37 +0000 (17:45 +0100)]
man: adjust 'disks' to 'devices' as used throughout

4 years agotest: Fix metadata-zero-space with long VG names
Marian Csontos [Thu, 24 Oct 2019 11:55:23 +0000 (13:55 +0200)]
test: Fix metadata-zero-space with long VG names

4 years agotests: be happy with less then 90 percent
Zdenek Kabelac [Fri, 1 Nov 2019 15:21:52 +0000 (16:21 +0100)]
tests: be happy with less then 90 percent

Thin metadata evolve between kernel version, so it's not always
precisely predictible its usage - so let's met test happy,
when it gets bellow 90%.

4 years agotests: skip test if scsi_debug is not available
Zdenek Kabelac [Fri, 1 Nov 2019 15:07:20 +0000 (16:07 +0100)]
tests: skip test if scsi_debug is not available

4 years agotests: slowdown delay of raid
Zdenek Kabelac [Fri, 1 Nov 2019 15:04:09 +0000 (16:04 +0100)]
tests: slowdown delay of raid

Slowdown 'delay' more.

4 years agotests: conversion only of exclusive lv
Zdenek Kabelac [Fri, 1 Nov 2019 14:59:17 +0000 (15:59 +0100)]
tests: conversion only of exclusive lv

We can 'cache' only exclusively active LV in cluster.

4 years agotests: avoid checking command result in cluster
Zdenek Kabelac [Fri, 1 Nov 2019 14:46:16 +0000 (15:46 +0100)]
tests: avoid checking command result in cluster

When running cluster test with clvmd, the actual 'monitoring'
happens in cluster - so the 'already monitored' message
is also logged within clvmd code and the command cannot
see such effect.

clvmd was incapable to report this information back to command
so it cannot be displayed this way.

Add 'lvs -o+seg_monitor' validation which also works in clustered mode.

4 years agoWHATS_NEW: update
Zdenek Kabelac [Thu, 31 Oct 2019 14:43:02 +0000 (15:43 +0100)]
WHATS_NEW: update

4 years agoactivation: drop removed declaration
Zdenek Kabelac [Thu, 31 Oct 2019 14:33:09 +0000 (15:33 +0100)]
activation: drop removed declaration

Seems this function has been removed long time ago with:
3e781ea446bb7ddc9a494cbba6b6104dd51c3910

4 years agotests: reduce space requirements
Zdenek Kabelac [Thu, 31 Oct 2019 12:14:50 +0000 (13:14 +0100)]
tests: reduce space requirements

Test well runs on smaller test machines.

4 years agoraid: drop internal error
Zdenek Kabelac [Thu, 31 Oct 2019 10:47:39 +0000 (11:47 +0100)]
raid: drop internal error

Fix some internal error reports and debug trace returns

4 years agomanip: optimize lvs_using_lv
Zdenek Kabelac [Thu, 31 Oct 2019 11:38:56 +0000 (12:38 +0100)]
manip: optimize lvs_using_lv

Instead of checking all LVs in a VG - do just a direct copy of LVs
from the existing list ->segs_using_thin_lv.

TODO: maybe it could be better to expose seg_list to /tools...

4 years agomirror: remove unused code
Zdenek Kabelac [Thu, 31 Oct 2019 11:10:00 +0000 (12:10 +0100)]
mirror: remove unused code

4 years agomirror: directly activate updated mirror
Zdenek Kabelac [Thu, 31 Oct 2019 09:05:40 +0000 (10:05 +0100)]
mirror: directly activate updated mirror

4 years agomirror: fix leg splitting
Zdenek Kabelac [Thu, 31 Oct 2019 10:45:28 +0000 (11:45 +0100)]
mirror: fix leg splitting

Enhance lv_info with lv_info_with_name_check.
This 'variant' not only check existance if UUID in DM table
but also compares its  DM name  whether it's matching expected LV name.
Otherwise activation may 'skip' activation with rename in case the
DM UUID already exists, just device is different name.

This change make fairly easier manipulation with i.e. detached mirror
leg which ATM is using same UUID - just the LV name have been changed.

Used code was not able to run 'activation' (and do a rename) and just
skipped the call. So the code used to do a workaround and 'tried'
to deactivate such LV firts - this however work only in non-clvmd case,
as cluster was not having the lock for deactivated LV.

With this extended lv_info code will run 'activation' and will
synchronize the name to match expected LV name.

Patch extends _lv_info() with new paramter 'with_name_check',
which is later translated into 'name_check' argument for
_info_run() which in case of name mismatch evaluates the
check as if device does not exists.

Such call is only used in one place _lv_activate() which then
let activation run.  All other invocation of _info() calls
are left intact.

TODO: fix mirror table manipulation (and raid)....

4 years agoExperimental VDO lvmdbusd support
Tony Asleson [Wed, 30 Oct 2019 15:55:06 +0000 (10:55 -0500)]
Experimental VDO lvmdbusd support

4 years agolvmdbustest.py: Use local data instead of fetching
Tony Asleson [Mon, 14 Oct 2019 19:33:16 +0000 (14:33 -0500)]
lvmdbustest.py: Use local data instead of fetching

Avoid making more dbus calls to get information we already have.  This
also avoids us getting an error where a dbus object representation is
being deleted by another process while we are trying to gather information
about it across the wire.

4 years agolvmdbustest.py: Improve concurrent test handling
Tony Asleson [Mon, 14 Oct 2019 19:31:27 +0000 (14:31 -0500)]
lvmdbustest.py: Improve concurrent test handling

Filter out LVs too, so that we can run more than 1 instance of the
unit test at the same time.

4 years agolvmdbustest.py: Add tests for LV interface
Tony Asleson [Fri, 11 Oct 2019 15:49:10 +0000 (10:49 -0500)]
lvmdbustest.py: Add tests for LV interface

Add tests for all the different LV types with the standard LV dbus
interface.  These tests shook out a couple of new bugs.

4 years agolvmdbusd: Debug msg. improvements.
Tony Asleson [Fri, 11 Oct 2019 15:46:22 +0000 (10:46 -0500)]
lvmdbusd: Debug msg. improvements.

4 years agolvmdbusd: Fix model inconsistency when LV loses interface
Tony Asleson [Thu, 10 Oct 2019 21:53:10 +0000 (16:53 -0500)]
lvmdbusd: Fix model inconsistency when LV loses interface

When a LV loses an interface it ends up getting removed and recreated.
This happens after the VGs have been processed and updated.  Thus when
this happens we need to re-check the VGs.

4 years agolvmdbusd: Bug fix for activate/deactivate
Tony Asleson [Thu, 10 Oct 2019 21:49:09 +0000 (16:49 -0500)]
lvmdbusd: Bug fix for activate/deactivate

Prevent the daemon from stalling when it gets stuck on a y/n prompt.

4 years agotestlib.py: Add interface instance vars.
Tony Asleson [Thu, 10 Oct 2019 14:01:27 +0000 (09:01 -0500)]
testlib.py: Add interface instance vars.

4 years agotestlib.py: WS corrections
Tony Asleson [Thu, 10 Oct 2019 00:59:44 +0000 (19:59 -0500)]
testlib.py: WS corrections

4 years agolvmdbustest.py: Add basic vdo test
Tony Asleson [Wed, 9 Oct 2019 21:55:39 +0000 (16:55 -0500)]
lvmdbustest.py: Add basic vdo test

4 years agotestlib.py: Correct dbus signature verification
Tony Asleson [Wed, 9 Oct 2019 21:53:34 +0000 (16:53 -0500)]
testlib.py: Correct dbus signature verification

This allows us to fully verify introspection data matches what we are
getting.

4 years agolvmdbusd: VDO Pool LV representation
Tony Asleson [Wed, 9 Oct 2019 12:49:58 +0000 (07:49 -0500)]
lvmdbusd: VDO Pool LV representation

VDO pool LVs are represented by a new dbus interface VgVdo.  Currently
the interface only has additional VDO properties, but when the
ability to support additional LV creation is added we can add a method
to the interface.

4 years agolvmdbustest.py: Create common func. _create_cache_lv
Tony Asleson [Wed, 9 Oct 2019 17:29:52 +0000 (12:29 -0500)]
lvmdbustest.py: Create common func. _create_cache_lv

4 years agolvmdbustest.py: Add nested helper function major_minor
Tony Asleson [Wed, 9 Oct 2019 16:48:00 +0000 (11:48 -0500)]
lvmdbustest.py: Add nested helper function major_minor

4 years agolvmdbustest.py: WS corrections
Tony Asleson [Wed, 9 Oct 2019 16:45:41 +0000 (11:45 -0500)]
lvmdbustest.py: WS corrections

4 years agolvmdbusd: Prevent running --nojson with VDO support
Tony Asleson [Wed, 9 Oct 2019 16:20:18 +0000 (11:20 -0500)]
lvmdbusd: Prevent running --nojson with VDO support

4 years agolvmdbustest.py: Add cache LV rename test
Tony Asleson [Tue, 8 Oct 2019 13:03:50 +0000 (08:03 -0500)]
lvmdbustest.py: Add cache LV rename test

4 years agolvmdbusd: Add VgVdo class & assoc. interface
Tony Asleson [Mon, 7 Oct 2019 21:58:10 +0000 (16:58 -0500)]
lvmdbusd: Add VgVdo class & assoc. interface

When VDO support is available we will create VG object instances
which will allow the API user to create VDO pool LVs.

4 years agolvmdbusd: Add cfg.vdo_support
Tony Asleson [Mon, 7 Oct 2019 21:57:05 +0000 (16:57 -0500)]
lvmdbusd: Add cfg.vdo_support

Will be used to add vdo interfaces on demand.

4 years agolvmdbustest.py: Remove 2 TODOs
Tony Asleson [Thu, 3 Oct 2019 22:01:27 +0000 (17:01 -0500)]
lvmdbustest.py: Remove 2 TODOs

This issue has been resolved, sizes > 2**32-1 not supported.

4 years agolvmdbustest.py: Add func. _pv_scan
Tony Asleson [Thu, 3 Oct 2019 21:11:18 +0000 (16:11 -0500)]
lvmdbustest.py: Add func. _pv_scan

4 years agolvmdbustest.py: Use existing _create_lv
Tony Asleson [Thu, 3 Oct 2019 20:56:45 +0000 (15:56 -0500)]
lvmdbustest.py: Use existing _create_lv

4 years agolvmdbustest.py: Add func. _create_thin_lv
Tony Asleson [Thu, 3 Oct 2019 20:50:08 +0000 (15:50 -0500)]
lvmdbustest.py: Add func. _create_thin_lv

4 years agolvmdbustest.py: Add func. _all_pv_object_paths
Tony Asleson [Thu, 3 Oct 2019 20:25:17 +0000 (15:25 -0500)]
lvmdbustest.py: Add func. _all_pv_object_paths

This is needed in a number of places.

4 years agolvmdbustest.py: Add function for lv path check
Tony Asleson [Thu, 3 Oct 2019 20:19:51 +0000 (15:19 -0500)]
lvmdbustest.py: Add function for lv path check

4 years agolvmdbusdtest.py: Use common function for tag add
Tony Asleson [Thu, 3 Oct 2019 20:05:37 +0000 (15:05 -0500)]
lvmdbusdtest.py: Use common function for tag add

4 years agolvmdbustest.py: Remove duplicate setup code
Tony Asleson [Thu, 3 Oct 2019 19:55:51 +0000 (14:55 -0500)]
lvmdbustest.py: Remove duplicate setup code

Remove the same copy & pasted code which simply creates a VG to
use.

4 years agoman lvmvdo: Correct spellings
Tony Asleson [Wed, 9 Oct 2019 14:35:14 +0000 (09:35 -0500)]
man lvmvdo: Correct spellings

4 years agoman: Include '_vdata' as reserved name
Tony Asleson [Thu, 3 Oct 2019 17:30:18 +0000 (12:30 -0500)]
man: Include '_vdata' as reserved name

4 years agolvmdbusd: Add check for reserved name '_vdata'
Tony Asleson [Thu, 3 Oct 2019 17:19:07 +0000 (12:19 -0500)]
lvmdbusd: Add check for reserved name '_vdata'

Added for vdo support.

4 years agolvmdbustest.py: Add blurb about scan_lvs = 1
Tony Asleson [Thu, 3 Oct 2019 16:57:10 +0000 (11:57 -0500)]
lvmdbustest.py: Add blurb about scan_lvs = 1

When developing and testing on a local system, to get the unit
test to pass the test_nesting test, editing the test conf will achieve
the success too.

4 years agolvmdbusd: Add d and D to type map for VolumeType
Tony Asleson [Tue, 1 Oct 2019 21:36:11 +0000 (16:36 -0500)]
lvmdbusd: Add d and D to type map for VolumeType

These were added for vdo integration.

4 years agolvmdbusd: Remove use of tmp variables
Tony Asleson [Tue, 1 Oct 2019 20:18:46 +0000 (15:18 -0500)]
lvmdbusd: Remove use of tmp variables

We can use tuple expansion from the command handler functions
directly.

4 years agolvmdbusd: Remove duplicate error handling code
Tony Asleson [Tue, 1 Oct 2019 20:17:30 +0000 (15:17 -0500)]
lvmdbusd: Remove duplicate error handling code

vg, lv, pv code had the same function for handling command execution.
Move to utility function and abstract the difference.

4 years ago[bcache] bcache_invalidate_fd, only remove prefixes on success.
Joe Thornber [Tue, 29 Oct 2019 15:21:11 +0000 (15:21 +0000)]
[bcache] bcache_invalidate_fd, only remove prefixes on success.

4 years ago[bcache] reverse earlier patch.
Joe Thornber [Tue, 29 Oct 2019 15:14:07 +0000 (15:14 +0000)]
[bcache] reverse earlier patch.

It broke some unit tests, for v. little benefit

4 years ago[bcache] pass up the error from io_submit rather than using generic -EIO
Joe Thornber [Tue, 29 Oct 2019 10:39:20 +0000 (10:39 +0000)]
[bcache] pass up the error from io_submit rather than using generic -EIO

Author: Heming Zhao

4 years ago[bcache] add unit test
Joe Thornber [Tue, 29 Oct 2019 10:33:31 +0000 (10:33 +0000)]
[bcache] add unit test

abort-forces-read

4 years ago[label] Use bcache_abort_fd() to ensure blocks are no longer in the cache.
Joe Thornber [Mon, 28 Oct 2019 15:01:47 +0000 (15:01 +0000)]
[label] Use bcache_abort_fd() to ensure blocks are no longer in the cache.

The return value from bcache_invalidate_fd() was not being checked.

So I've introduced a little function, _invalidate_fd() that always
calls bcache_abort_fd() if the write fails.

4 years ago[bcache] add bcache_abort()
Joe Thornber [Mon, 28 Oct 2019 14:29:47 +0000 (14:29 +0000)]
[bcache] add bcache_abort()

This gives us a way to cope with write failures.

4 years agoWHATS_NEW
Zdenek Kabelac [Fri, 25 Oct 2019 22:48:00 +0000 (00:48 +0200)]
WHATS_NEW

4 years agotests: explicit testing of thin snapshot
Zdenek Kabelac [Fri, 25 Oct 2019 22:15:31 +0000 (00:15 +0200)]
tests: explicit testing of thin snapshot

Check merging of old snapshot of thin LV.

4 years agosnapshot: use single merging sequence
Zdenek Kabelac [Fri, 25 Oct 2019 21:29:16 +0000 (23:29 +0200)]
snapshot: use single merging sequence

The resume of 'released' 'COW' should preceed the resume of origin.
The fact we need to do the sequence differently for merge was
cause by bugs fixed in 2 previous commits - so we no longer need
to recognize 'merging' and we should always go with single
sequence.

The importance of this order is - to properly remove  '-real' device
from origin LV. When COW is activated as 2nd. '-real' device is
kept in table as it cannot be removed during 1st. resume of origin,
and later activation of COW LV no longer builds tree associated
with origin LV.

4 years agosnapshot: fix checking of merged thin volume
Zdenek Kabelac [Fri, 25 Oct 2019 21:30:26 +0000 (23:30 +0200)]
snapshot: fix checking of merged thin volume

When merging of thin snapshot is taking place, the origin target will
be of thin type.

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