1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-30 17:18:21 +03:00
LVM2 mirror repository https://sourceware.org/lvm2/
Go to file
Bryn M. Reeves 8b78982297 daemons: add dmfilemapd
Add a daemon that can be launched to monitor a group of regions
corresponding to the extents of a file, and to update the regions as the
file's allocation changes.

The daemon is intended to be started from a library interface, but can
also be run from the command line:

  dmfilemapd <fd> <group_id> <path> <mode> [<foreground>[<log_level>]]

Where fd is a file descriptor open on the mapped file, group_id is the
group identifier of the mapped group and mode is either "inode" or
"path". E.g.:

  # dmfilemapd 3 0 vm.img inode 1 3 3<vm.img
  ...

If foreground is non-zero, the daemon will not fork to run in the
background. If verbose is non-zero, libdm and daemon log messages will
be printed.

It is possible for the group identifier to change when regions are
re-mapped: this occurs when the group leader is deleted (regroup=1 in
dm_stats_update_regions_from_fd()), and another region is created before
the daemon has a chance to recreate the leader region.

The operation is inherently racey since there is currently no way to
atomically move or resize a dm_stats region while retaining its
region_id.

Detect this condition and update the group_id value stored in the
filemap monitor.

A function is also provided in the the stats API to launch the filemap
monitoring daemon:

  int dm_stats_start_filemapd(int fd, uint64_t group_id, const char *path,
                              dm_filemapd_mode_t mode, unsigned foreground,
                              unsigned verbose);

This carries out the first fork and execs dmfilemapd with the arguments
specified.

A dm_filemapd_mode_t value is specified by the mode argument: either
DM_FILEMAPD_FOLLOW_INODE, or DM_FILEMAPD_FOLLOW_PATH. A helper function,
dm_filemapd_mode_from_string(), is provided to parse a string containing
a valid mode name into the appropriate dm_filemapd_mode_t value.
2017-03-09 18:50:15 +00:00
autoconf autoconf: Fix py-compile permissions 2016-02-18 01:05:05 +00:00
conf config: update doc 2017-02-13 10:06:07 +01:00
coverity doc: change fsf address 2016-01-21 12:11:37 +01:00
daemons daemons: add dmfilemapd 2017-03-09 18:50:15 +00:00
doc generate man pages 2017-02-13 10:31:23 -06:00
include daemons: add dmfilemapd 2017-03-09 18:50:15 +00:00
lib lvconvert: prompt when splitting off LV of a 2-legged raid1 LV 2017-03-09 13:59:47 +01:00
libdaemon mem: add extra mem pages for pthread stack 2017-02-11 18:23:15 +01:00
libdm daemons: add dmfilemapd 2017-03-09 18:50:15 +00:00
liblvm lvmetad: two phase vg_update 2016-06-28 02:30:31 +01:00
man man lvmraid: remove fixmes, use consistent example name 2017-03-09 11:48:30 -06:00
nix lockd: Clean up spec 2015-07-04 14:36:57 +02:00
old-tests doc: change fsf address 2016-01-21 12:11:37 +01:00
po doc: change fsf address 2016-01-21 12:11:37 +01:00
python python: move lvm_init 2016-05-16 14:36:55 -05:00
report-generators doc: change fsf address 2016-01-21 12:11:37 +01:00
reports [REPORT-GENERATORS] cut down stylsheet.css to what we actually use 2010-07-21 10:00:38 +00:00
scripts blkdeactivate: also unmount mount point on top of MD device if using blkdeactivate -u 2017-01-06 11:16:07 +01:00
spec spec: move dmeventd -R from post to posttrans script for device-mapper-event package 2016-10-12 13:52:13 +02:00
test tests relative-sign-options: only skip thin part 2017-03-09 11:29:54 -06:00
tools lvresize: poolmetadatasize cannot use minus 2017-03-09 09:51:24 -06:00
udev makefiles: use configure vars 2017-02-14 10:24:56 +01:00
unit-tests doc: change fsf address 2016-01-21 12:11:37 +01:00
.gitignore lvmdbus: Add new daemon. 2016-02-17 23:53:35 +00:00
acinclude.m4 configure: just move new macro to right file 2016-12-13 22:49:59 +01:00
aclocal.m4 configure: just move new macro to right file 2016-12-13 22:49:59 +01:00
configure daemons: add dmfilemapd 2017-03-09 18:50:15 +00:00
configure.in daemons: add dmfilemapd 2017-03-09 18:50:15 +00:00
COPYING doc: change fsf address 2016-01-21 12:11:37 +01:00
COPYING.LIB Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
INSTALL quick review of docs 2008-11-04 17:49:22 +00:00
make.tmpl.in makefiles: use configure vars 2017-02-14 10:24:56 +01:00
Makefile.in Makefile: all_man also requires man-generator now 2017-02-14 13:24:31 +00:00
README git: Upstream repository moved to sourceware.org 2017-02-27 14:05:50 +00:00
VERSION post-release 2016-11-30 23:21:11 +00:00
VERSION_DM post-release 2016-11-30 23:21:11 +00:00
WHATS_NEW git: Upstream repository moved to sourceware.org 2017-02-27 14:05:50 +00:00
WHATS_NEW_DM mem: add extra mem pages for pthread stack 2017-02-11 18:23:15 +01:00

This tree contains the LVM2 and device-mapper tools and libraries.

For more information about LVM2 read the changelog in the WHATS_NEW file.
Installation instructions are in INSTALL.

There is no warranty - see COPYING and COPYING.LIB.

Tarballs are available from:
  ftp://sourceware.org/pub/lvm2/
  ftp://sources.redhat.com/pub/lvm2/

The source code is stored in git:
  https://sourceware.org/git/?p=lvm2.git
  git clone git://sourceware.org/git/lvm2.git

Mailing list for general discussion related to LVM2:
  linux-lvm@redhat.com
  Subscribe from https://www.redhat.com/mailman/listinfo/linux-lvm

Mailing lists for LVM2 development, patches and commits:
  lvm-devel@redhat.com
  Subscribe from https://www.redhat.com/mailman/listinfo/lvm-devel

  lvm2-commits@lists.fedorahosted.org (Read-only archive of commits)
  Subscribe from https://fedorahosted.org/mailman/listinfo/lvm2-commits

Mailing list for device-mapper development, including kernel patches
and multipath-tools:
  dm-devel@redhat.com
  Subscribe from https://www.redhat.com/mailman/listinfo/dm-devel

The source code repository used until 7th June 2012 is accessible here:
  http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/?cvsroot=lvm2.