1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

1163 Commits

Author SHA1 Message Date
Marian Csontos
6fdc8787eb post-release 2024-05-16 12:17:02 +02:00
Marian Csontos
90ec2cd92f pre-release 2024-05-16 12:12:06 +02:00
Zdenek Kabelac
95fca3d1d5 makefile: avoid creating shared lib for static only build 2024-04-26 21:37:51 +02:00
Zdenek Kabelac
d3d06f8ca0 WHATS_NEW: update 2024-04-15 13:45:11 +02:00
Zdenek Kabelac
3a433b14f2 dmeventd: rework _restart_dmeventd
Use _restart_dmeventd() with return values 0,1,2.
Also let's use already created fifos struct.

Make sure the _systemd_activation variable is properly initialized
from _systemd_handover before calling _restart_dmeventd() as
this variable is used there to decide where   1 or 2 should
be returned - aka either letting systemd to initilize
or restart dmeventd itself.
2024-04-12 00:14:01 +02:00
Zdenek Kabelac
f27273e1f0 dmeventd: restart checks for running daemon
Check whether the pid file is associated with running daemon.
If not there is not much point to wait many seconds in loop.
2024-04-10 00:03:09 +02:00
Zdenek Kabelac
092951f634 dmeventd: check for running dmeventd for status
Before initiation fifo communication, check whether there is
running dmeventd - in case there is no running instance, this
would be just blocked for 5 seconds trying to open fifo.
2024-04-08 22:24:18 +02:00
Zdenek Kabelac
2eff6e1974 raid: update dm_get_status_raid
Handle mismatch of reported 'dm raid' status, where the active
raid LV can be actually showing higher numebr of raid leg devices,
that the number of shown status characters.

This can happen if the raid leg is dropped during initial
resynchronization.
2024-03-25 11:05:05 +01:00
Peter Rajnoha
f09a992720
udev: create /dev/disk/by-label symlinks for DM devs that have crypto as next layer
We already create /dev/disk/by-uuid symlinks for DM devices which
contain crypto-type as next layer (as identified by blkid).

Also create /dev/disk/by-label symlinks as the labels can be
defined for crypto-type devices too.

Reported and fix suggested by: Patrick Plenefisch <simonpatp@gmail.com>
See also:
https://lore.kernel.org/lvm-devel/CAOCpoWfYjOVNJNt+cnOVXDHiDq2wRogTqBijcUoa7chqOLRa5Q@mail.gmail.com/
2024-03-25 10:30:25 +01:00
Peter Rajnoha
4203fdbfef
WHATS_NEW: update
Commits 48188d7181 and eb4f744820
2024-03-25 09:14:57 +01:00
Peter Rajnoha
71bac6f45b
WHATS_NEW: update
Commits 6f44e1093c .. 038f9254d9
2024-03-25 08:52:56 +01:00
Marian Csontos
22e482d965 post-release 2023-11-21 14:38:53 +01:00
Marian Csontos
d786a8f820 pre-release 2023-11-21 14:37:11 +01:00
Peter Rajnoha
c36e012926
libdm: report: fix invalid JSON if using DM_REPORT_OUTPUT_MULTIPLE_TIMES and selection
When reporting in JSON format, we need to be able to find the 'last
displayed row', not just 'last row' as we did before. This is used
to decide whether to put the JSON_SEPARATOR (the ',' character)
between the lines when reporting in JSON format.

This is mainly important in case we use a combination of JSON format
and a report marked with DM_REPORT_OUTPUT_MULTIPLE_TIMES flag.
Such report may be reused several times with different selection
criteria each time. In that case, the report always contains all lines
in memory, even though some of them do not need to pass the selection
criteria that are currently used.

Without DM_REPORT_OUTPUT_MULTIPLE_TIMES flag, the report only contains
the lines that have passed the selection criteria, so the this wasn't
an issue in this case.

Fix suggested by Lars Ellenberg and reported here: https://github.com/lvmteam/lvm2/issues/130
2023-10-23 14:18:21 +02:00
Zdenek Kabelac
43020cc474 WHATS_NEW{_DM}: update 2023-10-14 01:04:10 +02:00
Zdenek Kabelac
d06378373e WHATS_NEW_DM: update 2023-09-26 01:32:48 +02:00
Peter Rajnoha
5a1248f1d4
dmsetup: support printing full column names in report headings
Add '--headings none|abbrev|full|0|1|2' command line option to select
the heading type.

  none|0   - no headings
  abbrev|1 - column name abbreviations
  full|2   - full column names (column names are equal to exact names
             that -o|--options also accepts to set report output)
2023-08-28 15:44:57 +02:00
Peter Rajnoha
12b60e7c25
libdm: report: support reporting field IDs in headings
Add new DM_REPORT_OUTPUT_FIELD_IDS_IN_HEADINGS report output flag.
If enabled, column IDs are reported instead of column names in report
headings.

The 'column IDs' are IDs as found in 'const struct dm_report_field_type *fields'
array that is passed during report initialization (that is, a call to
dm_report_init/dm_report_init_with_selection). In this case, the 'id'
dm_report_field_type member is used instead of the 'heading' member.
2023-08-28 15:44:57 +02:00
Marian Csontos
606ecae5d7 post-release 2023-08-02 14:42:16 +02:00
Marian Csontos
016e469caf pre-release 2023-08-02 14:41:12 +02:00
Zdenek Kabelac
96123b9059 cleanup: use spelling synchronize
Use single spelling form for synchronize.
2023-07-10 17:13:32 +02:00
Marian Csontos
b030ef31de post-release 2023-04-21 10:36:06 +02:00
Marian Csontos
54efdab230 pre-release 2023-04-21 10:35:10 +02:00
Marian Csontos
238e377777 post-release 2023-03-21 13:36:36 +01:00
Marian Csontos
3e0ee8dbad pre-release 2023-03-21 13:35:48 +01:00
Marian Csontos
0f6da9926d post-release 2023-02-21 15:36:24 +01:00
Marian Csontos
f7dd2562c5 pre-release 2023-02-21 15:33:32 +01:00
Zdenek Kabelac
0fc2d418f7 WHATS_NEW_DM: update 2023-02-13 13:41:59 +01:00
Yu Watanabe
94f77a4d8d
udev: import previous results of blkid when in suspended state
Follow-up for e10f67e917.

The commit e10f67e917 tries to keep device
node symlinks even if the device is in the suspended state. However,
necessary properties that may previously obtained by the blkid command
were not imported at least in the .rules file. So, unless ID_FS_xyz
properties are imported by another earlier .rules file, the device node
symlinks are still lost when event is processed in the suspended state.

Let's explicitly import the necessary properties.

RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=2158628
GHPR: https://github.com/lvmteam/lvm2/pull/105
2023-02-07 09:37:27 +01:00
Peter Rajnoha
8498874147
udev: remove rule for explicit creation of /dev/mapper/control
We used KERNEL=="device-mapper", NAME="/dev/mapper/control" udev rule to
create the /dev/mapper/control file. The "NAME" rule should be only used
to rename network devices, otherwise udev issues a warning message. The
device-mapper driver has proper DEVNAME=/dev/mapper/control propagated
in the uevent environment when it is loaded so we don't need further
instruction on where to create the node - udev knows already.

Also, these days, it is created directly by kernel inside devtmpfs.
This makes the NAME="/dev/mapper/control" rule completely obsolete.
2023-02-02 15:41:47 +01:00
Marian Csontos
118145b072 post-release 2023-01-03 16:02:07 +01:00
Marian Csontos
2abb029f2a pre-release 2022-12-22 16:07:35 +01:00
Zdenek Kabelac
a5042375de dmsetup: fix udev event handling for create
With newer kernels (>5.13)  DM_CREATE no longer generates
uevent for DM devices without table.
There are even no sysfs block device entries in such case,
although device has asigned major:minor and it is being listed
by 'dmsetup info'.

So this patch calculates amount of 'table' lines and in case
no table line comes from cmdline or stdin - waiting on cookie
is avoided generically instead of disabling just case with
option --notable - which then also skipped handling of an
option --addnodeoncreate (which is however historical and
should be avoided)

As a result there should be no leaking udev cookies and endlessly
waiting commands like this:

dmsetup create mytestdev  </dev/null
2022-11-25 16:41:53 +01:00
Marian Csontos
c77384785d post-release 2022-11-10 14:21:57 +01:00
Marian Csontos
f8127c45c5 pre-release 2022-11-10 14:11:32 +01:00
Peter Rajnoha
12ffa753f6 WHATS_NEW: update 2022-08-11 13:03:29 +02:00
Marian Csontos
a30013ff4f post-release 2022-05-18 18:18:14 +02:00
Marian Csontos
6d1e894a86 pre-release 2022-05-18 18:17:06 +02:00
Marian Csontos
8dccc2314e post-release 2022-02-07 18:02:07 +01:00
Marian Csontos
6987f318ec pre-release 2022-02-07 18:00:54 +01:00
Zdenek Kabelac
90da953fd2 libdm: unmangling UUID for DM_DEVICE_LIST
Properly unmangle UUID if they are provided as result
of DM_DEVICE_LIST ioctl on newer linux kernels.
2021-12-20 16:13:28 +01:00
Marian Csontos
819a35cc91 post-release 2021-10-20 11:13:28 +02:00
Marian Csontos
ef4521831d pre-release 2021-10-20 11:12:39 +02:00
Alasdair G Kergon
f853a1bc7a libdm: dmsetup measure support for IMA
Add support for DM_IMA_MEASUREMENT_FLAG with
DM_TABLE_STATUS_CMD.

This feature requires DM version 4.45  (5.15+ kernels)
2021-09-23 16:49:28 +02:00
Zdenek Kabelac
566c2f1828 libdm: support DM_NAME_LIST_FLAG
Kernel patch 8b638081bd4520f63db1defc660666ec5f65bc15
introduced support to return UUID in DM_LIST_DEVICES_CMD.

Useful when asking for UUID of each device where the list
could be now returned directly with NAME && UUID for each device.

Returning UUID is done in backward-compatible way. There's one unused
32-bit word value after the event number. This patch sets the bit
DM_NAME_LIST_FLAG_HAS_UUID if UUID is present and
DM_NAME_LIST_FLAG_DOESNT_HAVE_UUID if it isn't (if none of these bits is
set, then we have an old kernel that doesn't support returning UUIDs). The
UUID is stored after this word. The 'next' value is updated to point after
the UUID, so that old version of libdevmapper will skip the UUID without
attempting to interpret it.
2021-09-23 16:49:14 +02:00
Zdenek Kabelac
a8ee82ed51 libdm: enhance tracking of activated LVs
Existing mechanism was not able to trace root volume issue.
Simplify the functionality by using simply using activated flag
and trace the dtree in reverse order.
2021-09-13 12:34:41 +02:00
Zdenek Kabelac
6c4cd7b2f2 cache: fix parentheses for migration_threshold
When generating table line for cache target line,
the estimation of added arguments was incorrectly
calculated as the evaluation order of "?" is
made after "+".

However the result was 'masked' by the

Reported-by: Jian Cai jcai19
2021-09-13 12:34:41 +02:00
Marian Csontos
59209ef049 post-release 2021-08-11 17:15:51 +02:00
Marian Csontos
67a853f337 pre-release 2021-08-11 17:14:26 +02:00
Marian Csontos
3e2f09d78b post-release 2021-05-07 23:09:15 +02:00