LVM2 ./WHATS_NEW_DM libdm/libdm-common.c libdm ...
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2012-01-09 12:26:15
Modified files:
. : WHATS_NEW_DM libdm : libdm-common.c libdm-common.h libdm/ioctl : libdm-iface.c
Log message:
Use sysfs to set/get of read-ahead
If we know major:minor number of device (which is known after resume) we will try to use sysfs to set/get read ahead parameters of device. This avoid potential problem of blocking commands like 'dmsetup info' awaiting for device being usable for open/close - i.e. overfilled thin pool may block such command.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.526&r2=1.527
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-common.c.diff?cvsroot=lvm2&r1=1.129&r2=1.130
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-common.h.diff?cvsroot=lvm2&r1=1.9&r2=1.10
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/ioctl/libdm-iface.c.diff?cvsroot=lvm2&r1=1.130&r2=1.131
WHATS_NEW_DM +1 -0
@@ -1,5 +1,6 @@ Version 1.02.68 - ================================== + Use sysfs to set/get of read-ahead setting if possible. Fix lvm2-monitor init script to use normalized output when using vgs. Add test for max length (DM_MAX_TYPE_NAME) of target type name. Include a copy of kernel DM documentation in doc/kernel.
libdm/libdm-common.c +103 -19
214 lines not on this page · raw message
libdm/libdm-common.h +5 -4
@@ -1,6 +1,6 @@/* * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. -* Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. +* Copyright (C) 2004-2012 Red Hat, Inc. All rights reserved. * * This file is part of the device-mapper userspace tools. *
@@ -27,9 +27,10 @@int rm_dev_node (const char *dev_name,int check_udev,unsigned rely_on_udev);int rename_dev_node (const char *old_name,const char *new_name,int check_udev,unsigned rely_on_udev); -int get_dev_node_read_ahead (const char *dev_name,uint32_t *read_ahead); -int set_dev_node_read_ahead (const char *dev_name,uint32_t read_ahead, -uint32_t read_ahead_flags); +int get_dev_node_read_ahead (const char *dev_name,uint32_t major,uint32_t minor, +uint32_t *read_ahead); +int set_dev_node_read_ahead (const char *dev_name,uint32_t major,uint32_t minor, +uint32_t read_ahead,uint32_t read_ahead_flags);void update_devs (void );void selinux_release (void );
libdm/ioctl/libdm-iface.c +6 -4
@@ -1,6 +1,6 @@/* * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. -* Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved. +* Copyright (C) 2004-2012 Red Hat, Inc. All rights reserved. * * This file is part of the device-mapper userspace tools. *
@@ -665,7 +665,8 @@return 0 ; } -return get_dev_node_read_ahead (dev_name, read_ahead); +return get_dev_node_read_ahead (dev_name,MAJOR (dmt->dmi.v4->dev), +MINOR (dmt->dmi.v4->dev), read_ahead); }const char *dm_task_get_name (const struct dm_task *dmt)
@@ -1818,8 +1819,9 @@MINOR (dmi->dev), dmt->uid, dmt->gid, dmt->mode, check_udev, rely_on_udev);/* FIXME Kernel needs to fill in dmi->name */ -set_dev_node_read_ahead (dmt->dev_name, dmt->read_ahead, - dmt->read_ahead_flags); +set_dev_node_read_ahead (dmt->dev_name, +MAJOR (dmi->dev),MINOR (dmi->dev), + dmt->read_ahead, dmt->read_ahead_flags);break ;case DM_DEVICE_MKNODES :