]> sourceware.org Git - lvm2.git/log
lvm2.git
2 months agocleanup: correct invalid function
long.yunjian@zte.com.cn [Wed, 16 Oct 2024 02:16:27 +0000 (10:16 +0800)]
cleanup: correct invalid function

Use proper function names in annotation

There are no fuction named print_common_options_cmd()
and print_common_options_lvm(). So, rename them to the
real function named print_usage_common_cmd() and
print_usage_common_lvm().

Signed-off-by: YunJian Long
2 months agotests: do not use shell pipe for reshape_len
Zdenek Kabelac [Thu, 24 Oct 2024 18:31:38 +0000 (20:31 +0200)]
tests: do not use shell pipe for reshape_len

Tricky one - as the pipe exit codes may result into whole
test failure depending on how quick/slow command exits
are within pipeline.

So get the len without piping.

2 months agodevicesfile: move opendir after fclose
Zdenek Kabelac [Thu, 24 Oct 2024 19:19:01 +0000 (21:19 +0200)]
devicesfile: move opendir after fclose

Call opendir() after new file is stored within dir,
otherwise this new file would not accounted.

2 months agometadata: missed lv_set_name users
Zdenek Kabelac [Thu, 24 Oct 2024 19:00:52 +0000 (21:00 +0200)]
metadata: missed lv_set_name users

Missed when introduced lv_set_name().

2 months agolv: add lv_set_vg
Zdenek Kabelac [Thu, 24 Oct 2024 17:43:10 +0000 (19:43 +0200)]
lv: add lv_set_vg

To keep vg->lv_names up-to-date also for merge & split,
add function lv_set_vg() the will update also radix tree
reference for a VG.

2 months agoWHATS_NEW: update 1510961636
Zdenek Kabelac [Thu, 24 Oct 2024 15:28:31 +0000 (17:28 +0200)]
WHATS_NEW: update

2 months agometadata: use radix tree to find lv_names
Zdenek Kabelac [Thu, 24 Oct 2024 14:12:18 +0000 (16:12 +0200)]
metadata: use radix tree to find lv_names

Replace usage of dm_hash with radix_tree to quickly find LV name
with a vg and also index PV names with set of available PVs.
This PV index is only needed during the import, but instead
of passing 'radix_tree *' everywhere, just keep this within
a VG struct as well and once the parsing is finished, release
this PV index radix_tree.

This also makes it easier to replace this structure
in the future if needed.

lv_set_name now uses  radix_tree remove+insert to keep lv_names
tree in-sync and usable for  find_lv queries.

2 months agorevert "metadata: use lv_hash in segment-specific metadata parsing"
Zdenek Kabelac [Sat, 12 Oct 2024 19:58:14 +0000 (21:58 +0200)]
revert "metadata: use lv_hash in segment-specific metadata parsing"

This reverts commit f42aef47064fcc3fa8f78beea9e9b7e7c028e123.

Going to replace dm_hash with radix_tree and use 'find_lv()'
to abstract lookup for LV with VG.

2 months agometadata: use lv_set_name for raid and mirror
Zdenek Kabelac [Mon, 21 Oct 2024 11:11:28 +0000 (13:11 +0200)]
metadata: use lv_set_name for raid and mirror

Use lv_set_name API also for raid and mirror LV manipulation.

2 months agometadata: add lv_set_name
Zdenek Kabelac [Thu, 24 Oct 2024 14:05:28 +0000 (16:05 +0200)]
metadata: add lv_set_name

Add function to set lv->name.
Also when creating empty LV, first add this LV
to linked list in a VG and just after that allocate lv name.

2 months agocheck_pv_segments: resolve pv name once
Zdenek Kabelac [Thu, 24 Oct 2024 09:54:41 +0000 (11:54 +0200)]
check_pv_segments: resolve pv name once

2 months agolog: postpone some initialization
Zdenek Kabelac [Thu, 24 Oct 2024 09:54:05 +0000 (11:54 +0200)]
log: postpone some initialization

Clear buffers when really logging.

2 months agolv_manip: remove duplicate check for max lv
Zdenek Kabelac [Thu, 24 Oct 2024 14:11:51 +0000 (16:11 +0200)]
lv_manip: remove duplicate check for max lv

This check is always performed with call to link_lv_to_vg().

2 months agoflags: drop no longer needed header
Zdenek Kabelac [Thu, 24 Oct 2024 13:36:25 +0000 (15:36 +0200)]
flags: drop no longer needed header

After code refactoring, this header is not needed here anymore.

2 months agovg_validate: use uniq_insert
Zdenek Kabelac [Thu, 24 Oct 2024 13:27:31 +0000 (15:27 +0200)]
vg_validate: use uniq_insert

Enhance usage with uniq_insert and also try to better
utilize CPU cache and do a smaller loop for individual
hashing of lvname and separately lvid.

Also correcting usage of 'continue' within validation of
historical names as it should report as much errors
as it can within a loop.

2 months agotests: unit test for uniq insert into radix_tree
Zdenek Kabelac [Thu, 24 Oct 2024 12:08:51 +0000 (14:08 +0200)]
tests: unit test for uniq insert into radix_tree

2 months agoradix_tree: add radix_tree_uniq_insert
Zdenek Kabelac [Thu, 24 Oct 2024 12:04:07 +0000 (14:04 +0200)]
radix_tree: add radix_tree_uniq_insert

When using radix_tree to identify duplicate entries we may
avoid to call an extra 'lookup()' prior the insert() operation
add radix_tree_uniq_insert/_ptr() that is able to report -1 if
there was already set a value for the given key.

2 months agovgcfgrestore: validate complete VG 1509439103
Zdenek Kabelac [Wed, 23 Oct 2024 17:22:10 +0000 (19:22 +0200)]
vgcfgrestore: validate complete VG

Avoid finding problems in vg_validate when restoring
invalid VG metadata as that would lead to internal error.
i.e. adding unsupported METADATA_FLAG to zero segtype
can trigger such thing.

2 months agoread_lvflags: keep flag reading focused on flags
Zdenek Kabelac [Wed, 23 Oct 2024 14:35:55 +0000 (16:35 +0200)]
read_lvflags: keep flag reading focused on flags

Previous update needed to add handling segtype within flag.c
which somewhat breaks API separition and also had bug in hanlding
actual flags.

So instead keep segtype code in _read_segtype_and_lvflags() within
import_vsn1.c and handle purly flags in read_lvflags() from const
string.

2 months agoexport: typo with buffer zeroing
Zdenek Kabelac [Wed, 23 Oct 2024 17:21:05 +0000 (19:21 +0200)]
export: typo with buffer zeroing

Lost '= 0' in cut & paste.
Also get rid of no longer needed 'goto' section.

2 months agoexport: add missed buffer initialization 1508906248
Zdenek Kabelac [Wed, 23 Oct 2024 12:38:21 +0000 (14:38 +0200)]
export: add missed buffer initialization

Since we reduced emitting to single string list,
we need to make sure empty list are not producing
garbage strings.

2 months agoWHATS_NEW: update 1508859043
Zdenek Kabelac [Wed, 23 Oct 2024 12:07:57 +0000 (14:07 +0200)]
WHATS_NEW: update

2 months agoexport: change to read_segtype_and_lvflags
Zdenek Kabelac [Wed, 23 Oct 2024 11:30:55 +0000 (13:30 +0200)]
export: change to read_segtype_and_lvflags

Instead of duplicating whole segtype string with flags and
using 2 calls read_segtype_lvflags() + get_segtype_from_string(),
merge the functionality into a single read_segtype_and_lvflags().
This allows to make only a local string copy (no allocs) and eventually
to not copy segtype string at all, when there are no flags.

2 months agoexport: reduce emit_to_buffer calls
Zdenek Kabelac [Sun, 20 Oct 2024 20:14:39 +0000 (22:14 +0200)]
export: reduce emit_to_buffer calls

As the 'emit_to_buffer' uses relatively complex
vsnprintf() call inside, try to reduce number
of unnecessary calls and try replace some more
complex string build with a single call instead.

2 months agodev-cache: enhance usability of dm cache
Zdenek Kabelac [Wed, 23 Oct 2024 09:49:55 +0000 (11:49 +0200)]
dev-cache: enhance usability of dm cache

With existing code, the cache was working only to the 2nd. locking.
So i.e. when 'lvs' scans system with more then one VG, the caching
was effectively not working.

Update the code, so the label invalidate code is able to update DM
cache - so whenever we take a new lock - we will refresh the cache.

TODO: the refresh ATM does a very simple compare of old a new list
of cached DM device, and with the first spotted difference, it just
fallback to the full rebuild of DM cache - with large amount of active
devices this might not the most efficient way....

2 months agotests: skip test for too old sfdisk 1507849733
Zdenek Kabelac [Tue, 22 Oct 2024 20:30:47 +0000 (22:30 +0200)]
tests: skip test for too old sfdisk

2 months agocheck_lv_segment: correct last change
Zdenek Kabelac [Tue, 22 Oct 2024 20:25:54 +0000 (22:25 +0200)]
check_lv_segment: correct last change

Previous commit 7c5cca600c071c9991acb3fcafb9f8a3f60e03e5
was not correctly aliging block that was checking mirrors.

2 months agoWHATS_NEW: update 1507600020
Zdenek Kabelac [Wed, 9 Oct 2024 11:18:14 +0000 (13:18 +0200)]
WHATS_NEW: update

2 months agodebug: drop stack
Zdenek Kabelac [Sat, 19 Oct 2024 22:43:42 +0000 (00:43 +0200)]
debug: drop stack

2 months agodebug: use just LV name for debug message
Zdenek Kabelac [Sun, 20 Oct 2024 18:48:56 +0000 (20:48 +0200)]
debug: use just LV name for debug message

Since we detect 'debug' level after calling 'log_debug()' - all
the arguments are evaluated, so in this case display_lvname() was
preparing a string that is not used in case debugging is not enabled.

So since these string are on 'hot-path' and it's already known
which VG is being worked on, in these few cases just use lv->name.

2 months agoreporting: prepare id string only for json output
Zdenek Kabelac [Fri, 18 Oct 2024 17:38:25 +0000 (19:38 +0200)]
reporting: prepare id string only for json output

When processing LVs for a command we stored  '*object_id' & '*group_id'
as printable string that was however only used with json reporting.

Refactor code so we simply store there 'struct id*' that is just
converted into printable string when json reporting is really used.

Also check for 'sigint()' right before loop processing begins which
is primary purpose of this test.

2 months agovg_validate: use radix_tree
Zdenek Kabelac [Tue, 15 Oct 2024 13:28:10 +0000 (15:28 +0200)]
vg_validate: use radix_tree

Replace dm_hash with radix_tree which uses less memory
and gives same performance.

2 months agoconfig: use dm_config_parse_only_section
Zdenek Kabelac [Thu, 17 Oct 2024 21:11:16 +0000 (23:11 +0200)]
config: use dm_config_parse_only_section

2 months agodevice_mapper: add dm_config_parse_only_section
Zdenek Kabelac [Thu, 17 Oct 2024 21:10:01 +0000 (23:10 +0200)]
device_mapper: add dm_config_parse_only_section

This function call is able to setup config parser so it stops
parsing 'subsection' nodes after parsing named section node.
Only nodes at 'level' 0 will be still processed. And this nodes
are found by searching for last  \n}\n sequence from the end of
buffer   (instead of trying to analyze all the text in buffer).

2 months agoexport: use radix_tree for write formatter
Zdenek Kabelac [Sat, 12 Oct 2024 22:23:08 +0000 (00:23 +0200)]
export: use radix_tree for write formatter

Replace use of dm_hash with radix_tree when making PV index names.

Store just the index number itself and use pv%d for outf() string.

For lookup up a PV - use just the PV pointer itself, it's faster then
converint for it's ID to UUID format.

2 months agocheck_lv_segment: split into incomplete complete
Zdenek Kabelac [Fri, 18 Oct 2024 22:05:45 +0000 (00:05 +0200)]
check_lv_segment: split into incomplete complete

Split single check_lv_segments() into 2 separate
versions so they can be called independently.
This allow to 'skip' already checked segment
check after it's been imported to VG and also
avoid another repeated checking when validating
segment with complete vg.

**
check_lv_segments_incomplete_vg()

this check just basic LV segment properties and does not
validate those requiring full VG.

**
check_lv_segments_complete_vg()

Remaining check that expects complete VG is present.

2 months agometadata: look for LV by name with find_lv
Zdenek Kabelac [Tue, 15 Oct 2024 11:31:21 +0000 (13:31 +0200)]
metadata: look for LV by name with find_lv

Avoid getting dm_list reference when looking for logical_volume*.

2 months agothin: check only for profiled config vars
Zdenek Kabelac [Sat, 12 Oct 2024 23:11:04 +0000 (01:11 +0200)]
thin: check only for profiled config vars

ATM this rather save a lot of unncessary log entries as it grabs
the global autoextend_threshold (profile == NULL) just once instead
of revealing it every time with NULL profile.

2 months agolv: set creation uses const string
Zdenek Kabelac [Mon, 21 Oct 2024 09:20:12 +0000 (11:20 +0200)]
lv: set creation uses const string

There is no need to duplicate const string we got and keep
from uname() call.

2 months agoexport: limit generation of comment strings
Zdenek Kabelac [Sat, 19 Oct 2024 23:56:23 +0000 (01:56 +0200)]
export: limit generation of comment strings

Generate comment string only for formatter with comments.

2 months agoimport: check fixup mirror only when needed
Zdenek Kabelac [Sat, 19 Oct 2024 17:37:25 +0000 (19:37 +0200)]
import: check fixup mirror only when needed

Track whether import has even seen segment of LV with log_lv,
and call fixup mirror only in this case.

Also avoid repeated lookup of get_segtype_from_string for
SEG_TYPE_NAME_MIRROR.

2 months agodevice_mapper: increase mem pool chunk size
Zdenek Kabelac [Sat, 12 Oct 2024 18:52:27 +0000 (20:52 +0200)]
device_mapper: increase mem pool chunk size

Use bigger memory pool chunk size and reduces amount of
memory pool extensions when handling larger metadata, but do not
make it noticable bigger when handling small ones...

Use same large value also when allocating VG memory pool.

2 months agodevice_mapper: join flags checks together
Zdenek Kabelac [Sat, 19 Oct 2024 16:31:26 +0000 (18:31 +0200)]
device_mapper: join flags checks together

Just use a single bitmask flag check and OR fields together.

2 months agodevice_mapper: query for json report once
Zdenek Kabelac [Mon, 21 Oct 2024 12:17:28 +0000 (14:17 +0200)]
device_mapper: query for json report once

Remember _is_json_report() check for whole function.

2 months agodevice_mapper: use on stack allocation
Zdenek Kabelac [Mon, 21 Oct 2024 12:16:23 +0000 (14:16 +0200)]
device_mapper: use on stack allocation

Reduce number of heap allocation calls and for smaller
locally used string, use on stack allocation.

2 months agodevice_mapper: store string on stack
Zdenek Kabelac [Sat, 12 Oct 2024 19:31:11 +0000 (21:31 +0200)]
device_mapper: store string on stack

Instead of allocating string from a pool, for shorted strings
use buffer on stack since the string after the use in _find_or_make_node()
as no longer needed.
Eventually we may enhance code also for TOK_STRING_ESCAPED and TOK_STRING,
but they appear to be unused for _section().

2 months agodevice_mapper: slight improvement of tok_match
Zdenek Kabelac [Wed, 9 Oct 2024 15:16:44 +0000 (17:16 +0200)]
device_mapper: slight improvement of tok_match

Reduce amount of unnecessary instructions for some code paths.

2 months agodevice_mapper: optimize _get_token
Zdenek Kabelac [Wed, 9 Oct 2024 12:59:25 +0000 (14:59 +0200)]
device_mapper: optimize _get_token

For the most common part check for '#' when it's known it's not a space.
And also when we checked for '\n' we dont need to check again isspace().

Also help a bit more 'gcc' optimizer to grab buffer char just once and
simplify jump to next characted in the buffer when checking for token.

2 months agodevice_mapper: nodes and values with strings
Zdenek Kabelac [Wed, 9 Oct 2024 12:23:51 +0000 (14:23 +0200)]
device_mapper: nodes and values with strings

Avoid double dm_pool allocation call by copying string
for node name and config value directly after the end
of node/value structure.

It would be likely better to not copy these strings at all
and derefence it from the original string however that
needs futher changes in the code base.

2 months agocrc: add newer zlib code
Zdenek Kabelac [Fri, 4 Oct 2024 12:03:16 +0000 (14:03 +0200)]
crc: add newer zlib code

This code is faster when calculating crc32 checksum for larger
block areas. There is also SIMD variant present in the code,
however ATM the influence on performance of lvm2 is not that big..

2 months agocrc: move static table
Zdenek Kabelac [Fri, 4 Oct 2024 12:02:06 +0000 (14:02 +0200)]
crc: move static table

Move static table upward in the code so it can be shared with
another 'crc' implementation.

2 months agolvmlockd: drop return 1 from void function
Zdenek Kabelac [Thu, 17 Oct 2024 13:25:57 +0000 (15:25 +0200)]
lvmlockd: drop return 1 from void function

When compiling code without lvmlockd, the void function
lockd_free_lv_after_updatei()  should not return any value.

2 months agolv_manip: fall back to direct zeroing on any BLKZEROOUT ioctl failure 1501963837
Peter Rajnoha [Fri, 18 Oct 2024 08:43:08 +0000 (10:43 +0200)]
lv_manip: fall back to direct zeroing on any BLKZEROOUT ioctl failure

When BLKZEROOUT ioctl fails, it should not stop us from trying the direct
zeroing as a fallback action, since this is an optimization only.
We should be able to continue with new LV creation if we succeed
with that direct fallback then.

Related report: https://issues.redhat.com/browse/RHEL-58737

2 months agolvremove: fix failed remove of all LVs in shared VG 1499105123
David Teigland [Wed, 16 Oct 2024 17:29:13 +0000 (12:29 -0500)]
lvremove: fix failed remove of all LVs in shared VG

commit a125a3bb505cc "lv_remove: reduce commits for removed LVs"
changed "lvremove <vgname>" from removing one LV at a time,
to removing all LVs in one vg write/commit.  It also changed
the behavior if some of the LVs could not be removed, from
removing those LVs that could be removed, to removing nothing
if any LV could not be removed.  This caused a regression in
shared VGs using sanlock, in which the on-disk lease was
removed for any LV that could be removed, even if the command
decided to remove nothing.  This would leave LVs without a
valid ondisk lease, and "lock failed: error -221" would be
returned for any command attempting to lock the LV.

Fix this by not freeing the on-disk leases until after the
command has decided to go ahead and remove everything, and
has written the VG metadata.

Before the fix:

node1: lvchange -ay vg/lv1
node2: lvchange -ay vg/lv2

node1: lvs
  lv1  test -wi-a----- 4.00m
  lv2  test -wi------- 4.00m
node2: lvs
  lv1  test -wi------- 4.00m
  lv2  test -wi-a----- 4.00m

node1: lvremove -y vg/lv1 vg/lv2
  LV locked by other host: vg/lv2

(lvremove removed neither of the LVs, but it freed
the lock for lv1, which could have been removed
except for the proper locking failure on lv2.)

node1: lvs
  lv1  test -wi------- 4.00m
  lv2  test -wi------- 4.00m

node1: lvremove -y vg/lv1
LV vg/lv1 lock failed: error -221

(The lock for lv1 is gone, so nothing can be done with it.)

2 months agodevice_id: fix segfault if devices file has PVID=. 1496368282
Peter Rajnoha [Tue, 15 Oct 2024 08:58:16 +0000 (10:58 +0200)]
device_id: fix segfault if devices file has PVID=.

3 months agodev-type: detect mixed dos partition with gpt's PMBR 1479882293
Peter Rajnoha [Thu, 3 Oct 2024 07:38:11 +0000 (09:38 +0200)]
dev-type: detect mixed dos partition with gpt's PMBR

Detect when we have mixed dos partition with gpt's PMBR partition.

This is not a sane configuration, but detect it anyway, just in case
someone configures such partition layout manually and forcefully and
incorrectly defines one of the partition types to be the GPT's PMBR.

For example:

  ❯  fdisk -l /dev/sdc

  Device     Boot Start    End Sectors Size Id Type
  /dev/sdc1        2048  67583   65536  32M 83 Linux
  /dev/sdc2       67584 262143  194560  95M ee GPT

Before:
(The partition filter passes even though there's real existing dos
partition - the empty GPT PMBR overrides it.)

  ❯  pvcreate /dev/sdc
  WARNING: PMBR signature detected on /dev/sdc at offset 510. Wipe it? [y/n]:
  Wiping PMBR signature on /dev/sdc.
  Physical volume "/dev/sdc" successfully created.

With this patch applied:
(The GPT PMBR does not override the existence of the dos partition.)

  ❯  pvcreate /dev/sdc
    Cannot use /dev/sdc: device is partitioned

3 months agopost-release 1478671946
Marian Csontos [Wed, 2 Oct 2024 12:08:29 +0000 (14:08 +0200)]
post-release

3 months agopre-release 1478672107 v2_03_27
Marian Csontos [Wed, 2 Oct 2024 12:19:23 +0000 (14:19 +0200)]
pre-release

3 months agoWHATS_NEW and release-notes update
Marian Csontos [Wed, 2 Oct 2024 12:18:35 +0000 (14:18 +0200)]
WHATS_NEW and release-notes update

3 months agoWHATS_NEW: update 1478616095
Peter Rajnoha [Wed, 2 Oct 2024 11:49:17 +0000 (13:49 +0200)]
WHATS_NEW: update

3 months ago[WIP] Disable dlm for RHEL10 1478614252
Marian Csontos [Mon, 9 Sep 2024 14:06:59 +0000 (16:06 +0200)]
[WIP] Disable dlm for RHEL10

3 months agolvmdbusd: Fix Python script 14/head 1478598496 1478599930
Tobias Stoeckmann [Fri, 13 Sep 2024 16:35:18 +0000 (18:35 +0200)]
lvmdbusd: Fix Python script

The thread does not contain field "damon" but "daemon".

Actually found with codespell.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
3 months agofilesystem: add note about swap devices 15/head 16/head 1478596313 1478596632
Peter Rajnoha [Thu, 19 Sep 2024 11:40:09 +0000 (13:40 +0200)]
filesystem: add note about swap devices

3 months agotests: also test swap devices in lvresize-fs.sh
Peter Rajnoha [Thu, 19 Sep 2024 11:33:01 +0000 (13:33 +0200)]
tests: also test swap devices in lvresize-fs.sh

3 months agolv_manip: handle swap devices in fs-related checks for lvreduce/lvextend
Peter Rajnoha [Thu, 19 Sep 2024 10:45:25 +0000 (12:45 +0200)]
lv_manip: handle swap devices in fs-related checks for lvreduce/lvextend

This provides better hints when trying to resize the fs on top of an LV.
Also needs a3f6d2f593a4d278daf9ba3a1ba30bae38d8396a for proper operation.

❯  lvs -o name,size vg/swap
  lv_name lv_size
  swap     60.00m

Before:

❯  lvextend -L72m vg/swap
  Size of logical volume vg/swap changed from 60.00 MiB (15 extents) to 72.00 MiB (18 extents).
  Logical volume vg/swap successfully resized.

❯  lvreduce -L60m vg/swap
  File system swap found on vg/swap.
  File system device usage is not available from libblkid.

❯  lvreduce -L50m vg/swap
  Rounding size to boundary between physical extents: 52.00 MiB.
  File system swap found on vg/swap.
  File system device usage is not available from libblkid.

After:

❯  lvextend -L72m vg/swap
  Size of logical volume vg/swap changed from 60.00 MiB (15 extents) to 72.00 MiB (18 extents).
  Logical volume vg/swap successfully resized.

❯  lvreduce -L60m vg/swap
  File system swap found on vg/swap.
  File system size (60.00 MiB) is equal to the requested size (60.00 MiB).
  File system reduce is not needed, skipping.
  Size of logical volume vg/swap changed from 72.00 MiB (18 extents) to 60.00 MiB (15 extents).
  Logical volume vg/swap successfully resized.

❯  lvreduce -L50m vg/swap
  Rounding size to boundary between physical extents: 52.00 MiB.
  File system swap found on vg/swap.
  File system size (60.00 MiB) is larger than the requested size (52.00 MiB).
  File system reduce is required and not supported (swap).

3 months agodev-type: get swap device size from blkid using FSSIZE
Peter Rajnoha [Thu, 19 Sep 2024 10:39:46 +0000 (12:39 +0200)]
dev-type: get swap device size from blkid using FSSIZE

blkid does not report FSLASTBLOCK for a swap device. However, blkid
does report FSSIZE for swap devices, so use this field (and including
the header size which is of FSBLOCKSIZE for the swap) instead to
set the "filesystem last block" which is used subsequently for
further calculations and conditions.

3 months agotests: add pvcreate-partition.sh 13/head 1478481242 1478592461
Peter Rajnoha [Fri, 20 Sep 2024 08:32:35 +0000 (10:32 +0200)]
tests: add pvcreate-partition.sh

3 months agodev-type: add prefix to differentiate msdos and gpt constants
Peter Rajnoha [Wed, 18 Sep 2024 08:26:18 +0000 (10:26 +0200)]
dev-type: add prefix to differentiate msdos and gpt constants

3 months agofilter: partitioned: also detect non-empty GPT partition table
Peter Rajnoha [Wed, 4 Sep 2024 13:30:42 +0000 (15:30 +0200)]
filter: partitioned: also detect non-empty GPT partition table

We already detect msdos partition table. If it is empty, that is, there
is just the partition header and no actual partitions defined, then the
filter-partitioned passes, otherwise not.

Do the same for GPT partition table.

3 months agomake: generate 1475447077
Zdenek Kabelac [Mon, 30 Sep 2024 12:33:50 +0000 (14:33 +0200)]
make: generate

3 months agocov: annotate
Zdenek Kabelac [Mon, 30 Sep 2024 12:47:03 +0000 (14:47 +0200)]
cov: annotate

3 months agocov: potentially overflowing expression
Zdenek Kabelac [Mon, 30 Sep 2024 12:46:31 +0000 (14:46 +0200)]
cov: potentially overflowing expression

Use 64bit arithmentic.

3 months agolvmlockd: configurable sanlock lease sizes on 4K disks 1473183351
David Teigland [Fri, 27 Sep 2024 22:42:26 +0000 (17:42 -0500)]
lvmlockd: configurable sanlock lease sizes on 4K disks

New config setting sanlock_align_size can be used to configure
the sanlock lease size that lvmlockd will use on 4K disks.

By default, lvmlockd and sanlock use 8MiB align_size (lease size)
on 4K disks, which supports up to 2000 hosts (and max host_id.)

This can be reduced to 1, 2 or 4 (in MiB), to reduce lease i/o.
The reduced sizes correspond to smaller max hosts/host_id:

1 MiB = 250 hosts
2 MiB = 500 hosts
4 MiB = 1000 hosts
8 MiB = 2000 hosts (default)

(Disks with 512 byte sectors always use 1MiB leases and support
2000 hosts/host_id, and are not affected by this.)

3 months agoWHATS_NEW: update 1472365742
Zdenek Kabelac [Fri, 27 Sep 2024 11:44:59 +0000 (13:44 +0200)]
WHATS_NEW: update

3 months agocleanup: replace use of alloced with allocated
zkabelac [Mon, 2 Sep 2024 11:09:00 +0000 (11:09 +0000)]
cleanup: replace use of alloced with allocated

3 months agocleanup: typos in libdm
zkabelac [Mon, 16 Sep 2024 14:11:12 +0000 (14:11 +0000)]
cleanup: typos in libdm

3 months agocleanup: more typos in WHATS_NEW
zkabelac [Fri, 30 Aug 2024 17:47:00 +0000 (17:47 +0000)]
cleanup: more typos in WHATS_NEW

3 months agocleanup: fix typos
Tobias Stoeckmann [Fri, 13 Sep 2024 16:33:45 +0000 (18:33 +0200)]
cleanup: fix typos

Typos found with codespell.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
3 months agomemlock: use value of 0 to disable memory locking
Zdenek Kabelac [Tue, 24 Sep 2024 14:04:53 +0000 (16:04 +0200)]
memlock: use value of 0 to disable memory locking

In cases user is sure he is not using his 'rootfs' or 'swap' on LVs
managed with his command - it possible to completely bypass pinning
process to RAM which may eventually slightly speedup command execution,
(however at the risk the process can be eventually delayed by swapping).
Basicaly use this only at your risk...

TODO: add some dmeventd support for this.

3 months agovdo: depcreate unused settings
Zdenek Kabelac [Fri, 6 Sep 2024 09:39:17 +0000 (11:39 +0200)]
vdo: depcreate unused settings

3 months agolvmlockd: use lvmlock LV size 1470849140
David Teigland [Wed, 25 Sep 2024 21:18:32 +0000 (16:18 -0500)]
lvmlockd: use lvmlock LV size

Previously, lvmlockd detected the end of the lvmlock LV
by doing i/o to it until an i/o error was returned.
This triggered sanlock warning messages, so use the LV
size to avoid accessing beyond the end of the device.

Previously, every lvcreate would refresh the lvmlock LV
in case another machine had extended it.  This involves
a lot of unnecessary work in most cases, so now compare
the LV size and device size to detect when a refresh is
needed.

3 months agolvmlockd: fix previous thin locking fix 1465886237
David Teigland [Mon, 23 Sep 2024 22:12:03 +0000 (17:12 -0500)]
lvmlockd: fix previous thin locking fix

Restore the original lvremove locking for non-thin LVs
that were changed in the thin locking fix.

3 months agovg: remove unused hostnames hash table 1465773143
David Teigland [Mon, 23 Sep 2024 20:04:53 +0000 (15:04 -0500)]
vg: remove unused hostnames hash table

The hash table of lv creation hostnames was not used for anything,
so remove it.

3 months agolvmlockd: fix locking for thin 1465738792
David Teigland [Mon, 23 Sep 2024 19:46:29 +0000 (14:46 -0500)]
lvmlockd: fix locking for thin

lvremove of a thin lv while the pool is inactive would
leave the pool locked but inactive.

lvcreate of a thin snapshot while the pool is inactive
would leave the pool locked but inactive.

lvcreate of a thin lv could activate the pool to check
a threshold before the pool lock was acquired in lvmlockd.

3 months agotests: remove superfluous -a option for df used in lvresize-fs.sh 1460603502
Peter Rajnoha [Thu, 19 Sep 2024 13:12:44 +0000 (15:12 +0200)]
tests: remove superfluous -a option for df used in lvresize-fs.sh

4 months agometadata: use lv_hash in segment-specific metadata parsing 1447913946
David Teigland [Tue, 10 Sep 2024 16:51:15 +0000 (11:51 -0500)]
metadata: use lv_hash in segment-specific metadata parsing

The lv_hash wasn't being passed to the seg-specific text import
functions, so they were doing many find_lv() calls which consumes
a lot of time when there are many LVs in the metadata.

4 months agoargs: readonly description update 1443255555
David Teigland [Fri, 6 Sep 2024 13:44:06 +0000 (08:44 -0500)]
args: readonly description update

Include reference to --permission r.

4 months agoWHATS_NEW_DM: update 12/head 1441387489 1441427841
Peter Rajnoha [Thu, 5 Sep 2024 08:34:43 +0000 (10:34 +0200)]
WHATS_NEW_DM: update

4 months agolibdm: do not fail if GETVAL semctl fails for udev sync inc and dec
Peter Rajnoha [Mon, 12 Aug 2024 12:31:19 +0000 (14:31 +0200)]
libdm: do not fail if GETVAL semctl fails for udev sync inc and dec

While performing udev sync semaphore's inc/dec operation, we use the
result from GETVAL semctl just to print a debug message with current
value of that sempahore, nothing else.

If the GETVAL fails for whetever reason while the actual inc/dec
completes successfully, just log a warning message about the GETVAL
(and print the debug messages without the actual semaphore value)
and return success for the inc/dec operation as a whole.

4 months agolibdm: clean up udev sync semaphore on fail path during its creation
Peter Rajnoha [Mon, 12 Aug 2024 12:16:32 +0000 (14:16 +0200)]
libdm: clean up udev sync semaphore on fail path during its creation

Clean up udev sync semaphore on fail path during its creation, otherwise
the caller will have no handle returned to clean it up itself and the
semaphore will keep staying in the system. The only way to clean it up
would be to call `dmsetup udevcomplete_all` which would destroy all
udev sync semaphores, not just the failed one, which we don't want.

4 months agolibdm: add 'cookie create/inc/dec' log prefix if GETVAL fails for udev sync ops
Peter Rajnoha [Mon, 12 Aug 2024 12:01:25 +0000 (14:01 +0200)]
libdm: add 'cookie create/inc/dec' log prefix if GETVAL fails for udev sync ops

The same message is printed while performing create/inc/dec operation and
the GETVAL semctl fails. Add a prefix so we know exactly in which of
these functions the issue actually happened.

4 months agoscripts: Fix ConditionPathExists in unit files 1439886932
Marian Csontos [Wed, 4 Sep 2024 12:40:58 +0000 (14:40 +0200)]
scripts: Fix ConditionPathExists in unit files

4 months agoWHATS_NEW: update 1433864118
Zdenek Kabelac [Fri, 30 Aug 2024 14:44:50 +0000 (16:44 +0200)]
WHATS_NEW: update

4 months agoconfigure: autoreconf
Zdenek Kabelac [Thu, 29 Aug 2024 20:24:27 +0000 (22:24 +0200)]
configure: autoreconf

4 months agomake generate
Zdenek Kabelac [Thu, 29 Aug 2024 20:21:45 +0000 (22:21 +0200)]
make generate

4 months agocleanup: typos in configure.ac
Zdenek Kabelac [Thu, 29 Aug 2024 20:33:33 +0000 (22:33 +0200)]
cleanup: typos in configure.ac

4 months agocleanup: typos in test comments
Zdenek Kabelac [Fri, 30 Aug 2024 10:10:35 +0000 (12:10 +0200)]
cleanup: typos in test comments

4 months agocleanup: typos in test logging
Zdenek Kabelac [Fri, 30 Aug 2024 10:10:26 +0000 (12:10 +0200)]
cleanup: typos in test logging

4 months agocleanup: typos in doc
Zdenek Kabelac [Thu, 29 Aug 2024 21:30:33 +0000 (23:30 +0200)]
cleanup: typos in doc

4 months agocleanup: typos man pages
Zdenek Kabelac [Thu, 29 Aug 2024 20:05:12 +0000 (22:05 +0200)]
cleanup: typos man pages

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