case ACT_RELOAD:
r = (dm_addmap_reload(mpp->alias, mpp->params, mpp->size, NULL)
- && dm_simplecmd(DM_DEVICE_RESUME, mpp->alias, 1));
+ && dm_simplecmd_flush(DM_DEVICE_RESUME, mpp->alias));
break;
case ACT_RESIZE:
if (!r)
r = dm_addmap_reload(mpp->alias, mpp->params, mpp->size, NULL);
if (r)
- r = dm_simplecmd(DM_DEVICE_RESUME, mpp->alias, 0);
+ r = dm_simplecmd_noflush(DM_DEVICE_RESUME, mpp->alias);
break;
case ACT_RENAME:
return dm_drvprereq(TGT_MPATH);
}
-extern int
+static int
dm_simplecmd (int task, const char *name, int no_flush) {
int r = 0;
struct dm_task *dmt;
}
extern int
+dm_simplecmd_flush (int task, const char *name) {
+ return dm_simplecmd(task, name, 1);
+}
+
+extern int
+dm_simplecmd_noflush (int task, const char *name) {
+ return dm_simplecmd(task, name, 0);
+}
+
+extern int
dm_addmap (int task, const char *name, const char *target,
const char *params, unsigned long long size, const char *uuid,
int ro) {
return 1;
}
- r = dm_simplecmd(DM_DEVICE_REMOVE, mapname, 0);
+ r = dm_simplecmd_noflush(DM_DEVICE_REMOVE, mapname);
if (r) {
condlog(4, "multipath map %s removed", mapname);
*/
condlog(4, "partition map %s removed",
names->name);
- dm_simplecmd(DM_DEVICE_REMOVE, names->name, 0);
+ dm_simplecmd_noflush(DM_DEVICE_REMOVE, names->name);
}
next = names->next;
void dm_init(void);
int dm_prereq (void);
-int dm_simplecmd (int, const char *, int);
+int dm_simplecmd_flush (int, const char *);
+int dm_simplecmd_noflush (int, const char *);
int dm_addmap_create (const char *, const char *,
unsigned long long size, const char *uuid);
int dm_addmap_create_ro (const char *, const char *,
{
struct vectors * vecs = (struct vectors *)data;
char * param = get_keyparam(v, MAP);
- int r = dm_simplecmd(DM_DEVICE_SUSPEND, param, 1);
+ int r = dm_simplecmd_flush(DM_DEVICE_SUSPEND, param);
condlog(2, "%s: suspend (operator)", param);
{
struct vectors * vecs = (struct vectors *)data;
char * param = get_keyparam(v, MAP);
- int r = dm_simplecmd(DM_DEVICE_RESUME, param, 1);
+ int r = dm_simplecmd_flush(DM_DEVICE_RESUME, param);
condlog(2, "%s: resume (operator)", param);