diff mbox

[1/2] dm: Add feature flags to dm-mpath

Message ID 1272945691-31649-2-git-send-email-andmike@linux.vnet.ibm.com (mailing list archive)
State Superseded, archived
Delegated to: Mike Snitzer
Headers show

Commit Message

Mike Anderson May 4, 2010, 4:01 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 826bce7..4200d03 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -82,6 +82,7 @@  struct multipath {
 	unsigned saved_queue_if_no_path;/* Saved state during suspension */
 	unsigned pg_init_retries;	/* Number of times to retry pg_init */
 	unsigned pg_init_count;		/* Number of times pg_init called */
+	unsigned long features;
 
 	struct work_struct process_queued_ios;
 	struct list_head queued_ios;
@@ -118,6 +119,15 @@  static void trigger_event(struct work_struct *work);
 static void activate_path(struct work_struct *work);
 static void deactivate_path(struct work_struct *work);
 
+static int multipath_test_feature(struct multipath *m, unsigned feature)
+{
+	return test_bit(feature, &m->features);
+}
+
+static void multipath_set_feature(struct multipath *m, unsigned feature)
+{
+	set_bit(feature, &m->features);
+}
 
 /*-----------------------------------------------
  * Allocation routines