David Teigland
450f272b31
devices: support printing the filter that rejects a device
...
Use of this new message function needs to be added
to various commands to improve the output.
2020-10-01 12:00:09 -05:00
David Teigland
6620dc9475
add device hints to reduce scanning
...
Save the list of PVs in /run/lvm/hints. These hints
are used to reduce scanning in a number of commands
to only the PVs on the system, or only the PVs in a
requested VG (rather than all devices on the system.)
2019-01-15 10:23:47 -06:00
David Teigland
8eab37593e
Add cmd arg to more functions
...
so that it can be used in the filter code
2018-06-15 11:03:55 -05:00
Joe Thornber
7f97c7ea9a
build: Don't generate symlinks in include/ dir
...
As we start refactoring the code to break dependencies (see doc/refactoring.txt),
I want us to use full paths in the includes (eg, #include "base/data-struct/list.h").
This makes it more obvious when we're breaking abstraction boundaries, eg, including a file in
metadata/ from base/
2018-05-14 10:30:20 +01:00
Zdenek Kabelac
0bf836aa14
tidy: prefer not using else after return
...
clang-tidy: avoid using 'else' after return - give more readable code,
and also saves indention level.
2017-07-20 11:18:29 +02:00
Zdenek Kabelac
e3775173b4
cleanup: log_info to log_error
...
Switch to more appropriate logging level.
2016-11-03 17:49:07 +01:00
Zdenek Kabelac
92d5a84410
cleanup: clean gcc6 minor/major types warnings
...
Put sys/sysmacros.h in front of sys/types.h header file as requested
by gcc6.
2016-08-29 20:51:16 +02:00
Zdenek Kabelac
fcbef05aae
doc: change fsf address
...
Hmm rpmlint suggest fsf is using a different address these days,
so lets keep it up-to-date
2016-01-21 12:11:37 +01:00
Zdenek Kabelac
08d6d81cc2
filters: drop extra slash from sysfs path
...
Sysfs filter was using '/sys//class/block' with double '//' inside.
Remove this extra '/'.
Also simplify code around and use loop to try those paths.
2013-11-22 20:53:31 +01:00
Alasdair G Kergon
527db4645f
gcc: replace #ifdef linux with __linux__
2013-11-13 13:56:29 +00:00
Alasdair G Kergon
80bcdb93ff
filters: check for mpath before opening devs
...
Split out the partitioned device filter that needs to open the device
and move the multipath filter in front of it.
When a device is multipathed, sending I/O to the underlying paths may
cause problems, the most obvious being I/O errors visible to lvm if a
path is down.
Revert the incorrect <backtrace> messages added when a device doesn't
pass a filter.
Log each filter initialisation to show sequence.
Avoid duplicate 'Using $device' debug messages.
2013-08-13 23:26:58 +01:00
Peter Rajnoha
657abb08e0
cleanup: use libdm's dm_sysfs_dir() for sysfs directory throughout
...
And remove superfluous cmd->sysfs_dir and
set_sysfs_dir_path/sysfs_dir_path fn from lvm-globals.[ch].
2013-06-12 11:44:58 +02:00
Alasdair G Kergon
06abb2dd4c
logging: classify log_debug messages
...
Place most log_debug() messages into a class.
2013-01-07 22:30:29 +00:00
Zdenek Kabelac
286cd2006b
cleanup: drop unneeded included header files
...
This headers were not resolving anything used for compiled .c files.
Remove unused util.c file.
2012-08-23 14:37:20 +02:00
Zdenek Kabelac
93b087da97
Check allocation result
2012-02-27 09:56:27 +00:00
Alasdair Kergon
a171bb6e85
Track recursive filter iteration to avoid refreshing while in use. (2.02.56)
2010-09-22 01:36:13 +00:00
Alasdair Kergon
08f1ddea6c
Use __attribute__ consistently throughout.
2010-07-09 15:34:40 +00:00
Alasdair Kergon
225ad19114
Store sysfs location in struct cmd_context.
2008-09-19 03:42:37 +00:00
Alasdair Kergon
67cdbd7e4d
Some whitespace tidy-ups.
2008-01-30 14:00:02 +00:00
Alasdair Kergon
6aca8e9297
Handle new sysfs subsystem/block/devices directory structure.
2007-10-10 11:31:21 +00:00
Alasdair Kergon
21bc366486
Clean up numerous compiler warnings that crept in recently.
...
Remove several unused parameters from _allocate().
2007-08-22 14:38:18 +00:00
Alasdair Kergon
be6845999b
Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.
2007-08-20 20:55:30 +00:00
Alasdair Kergon
4f2f566b06
Add devices/preferred_names config regex list for displayed device names.
...
Free a temporary dir string in fcntl_lock_file() after use.
Fix a dm_pool_destroy() in matcher_create().
Introduce goto_bad macro.
2007-04-26 16:44:59 +00:00
Alasdair Kergon
2e1b92e3ea
Add some missing close() and fclose() return code checks.
...
Fix exit statuses of reporting tools (2.02.19).
2007-01-25 14:37:48 +00:00
Alasdair Kergon
0550c1b618
Move lvm_snprintf into libdevmapper.
2006-08-21 12:54:53 +00:00
Alasdair Kergon
7d7736b7b4
Add dm_split_words() and dm_split_lvm_name() to libdevmapper.
2006-08-21 12:07:03 +00:00
Alasdair Kergon
8a2fc58645
Check for libsepol.
...
Add some cflow & scope support.
Separate out DEFS from CFLAGS.
Remove inlines and use unique function names.
2006-04-19 15:33:07 +00:00
Alasdair Kergon
2262b32057
Use hash, bitset, malloc, pool from libdevmapper.
2005-10-16 23:03:59 +00:00
Alasdair Kergon
7e0b7fd0e5
Avoid some compiler warnings.
2005-03-10 22:34:17 +00:00
Alasdair Kergon
f6ab00eb54
Ignore sysfs symlinks when DT_UNKNOWN.
2004-12-21 18:29:46 +00:00
Alasdair Kergon
7f1e8db796
Improve filter debug msgs.
2004-11-24 20:36:52 +00:00
Alasdair Kergon
bd46a496c7
pool debugging
2004-11-23 18:23:23 +00:00
Alasdair Kergon
cf076dd366
Cope with DT_UNKNOWN in sysfs.
2004-08-18 18:50:21 +00:00
Alasdair Kergon
fb53aa7bc6
Fix sysfs filter to check fs type.
2004-04-06 16:47:59 +00:00
Alasdair Kergon
6606c3ae81
Update copyright notices.
2004-03-30 19:35:44 +00:00
Alasdair Kergon
23670fbe43
Tidy sysfs includes
2004-03-26 18:54:55 +00:00
Alasdair Kergon
a8537e6f59
Sysfs block device filtering option for 2.6.
2004-02-13 14:46:04 +00:00