FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 12-05-2007, 03:24 PM
 
Default device-mapper/lib/ioctl libdm-iface.c

CVSROOT: /cvs/dm
Module name: device-mapper
Changes by: agk@sourceware.org 2007-12-05 16:24:41

Modified files:
lib/ioctl : libdm-iface.c

Log message:
work out device name to use for read ahead request

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/device-mapper/lib/ioctl/libdm-iface.c.diff?cvsroot=dm&r1=1.49&r2=1.50

--- device-mapper/lib/ioctl/libdm-iface.c 2007/12/03 22:48:36 1.49
+++ device-mapper/lib/ioctl/libdm-iface.c 2007/12/05 16:24:41 1.50
@@ -922,7 +922,29 @@

uint32_t dm_task_get_read_ahead(const struct dm_task *dmt, uint32_t *read_ahead)
{
- return get_dev_node_read_ahead(dmt->dev_name, read_ahead);
+ const char *dev_name;
+
+ *read_ahead = 0;
+
+#ifdef DM_COMPAT
+ /* Not supporting this */
+ if (_dm_version == 1)
+ return 1;
+#endif
+
+ if (!dmt->dmi.v4 || !(dmt->dmi.v4->flags & DM_EXISTS_FLAG))
+ return 0;
+
+ if (*dmt->dmi.v4->name)
+ dev_name = dmt->dmi.v4->name;
+ else if (dmt->dev_name)
+ dev_name = dmt->dev_name;
+ else {
+ log_error("Get read ahead request failed: device name unrecorded.");
+ return 0;
+ }
+
+ return get_dev_node_read_ahead(dev_name, read_ahead);
}

const char *dm_task_get_name(const struct dm_task *dmt)

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 08:16 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org