--- linux-last/drivers/md/dm-ioctl.c	Tue Nov  6 14:44:22 2001
+++ linux/drivers/md/dm-ioctl.c	Tue Nov  6 14:50:58 2001
@@ -179,7 +179,30 @@
 
 static int reload(struct dm_ioctl *param)
 {
-	return -EINVAL;
+	int r;
+	struct mapped_device *md = dm_get(param->name);
+	struct dm_table *t, *old;
+
+	if (!md)
+		return -ENXIO;
+
+	if ((r = dm_table_create(&t)))
+		return r;
+
+	if ((r = populate_table(t, param))) {
+		dm_table_destroy(t);
+		return r;
+	}
+
+	old = md->map;
+
+	if ((r = dm_swap_table(md, t))) {
+		dm_table_destroy(t);
+		return r;
+	}
+
+	dm_table_destroy(old);
+	return 0;
 }
 
 static int info(struct dm_ioctl *param)
