Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dm mpath: remove is_active from struct dm_path

This patch moves 'is_active' from struct dm_path to struct pgpath
as it does not need exporting.

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>

authored by

Kiyoshi Ueda and committed by
Alasdair G Kergon
6680073d 01460f35

+7 -8
+7 -6
drivers/md/dm-mpath.c
··· 30 30 struct list_head list; 31 31 32 32 struct priority_group *pg; /* Owning PG */ 33 + unsigned is_active; /* Path status */ 33 34 unsigned fail_count; /* Cumulative failure count */ 34 35 35 36 struct dm_path path; ··· 124 123 struct pgpath *pgpath = kzalloc(sizeof(*pgpath), GFP_KERNEL); 125 124 126 125 if (pgpath) 127 - pgpath->path.is_active = 1; 126 + pgpath->is_active = 1; 128 127 129 128 return pgpath; 130 129 } ··· 855 854 856 855 spin_lock_irqsave(&m->lock, flags); 857 856 858 - if (!pgpath->path.is_active) 857 + if (!pgpath->is_active) 859 858 goto out; 860 859 861 860 DMWARN("Failing path %s.", pgpath->path.dev->name); 862 861 863 862 pgpath->pg->ps.type->fail_path(&pgpath->pg->ps, &pgpath->path); 864 - pgpath->path.is_active = 0; 863 + pgpath->is_active = 0; 865 864 pgpath->fail_count++; 866 865 867 866 m->nr_valid_paths--; ··· 891 890 892 891 spin_lock_irqsave(&m->lock, flags); 893 892 894 - if (pgpath->path.is_active) 893 + if (pgpath->is_active) 895 894 goto out; 896 895 897 896 if (!pgpath->pg->ps.type->reinstate_path) { ··· 905 904 if (r) 906 905 goto out; 907 906 908 - pgpath->path.is_active = 1; 907 + pgpath->is_active = 1; 909 908 910 909 m->current_pgpath = NULL; 911 910 if (!m->nr_valid_paths++ && m->queue_size) ··· 1293 1292 1294 1293 list_for_each_entry(p, &pg->pgpaths, list) { 1295 1294 DMEMIT("%s %s %u ", p->path.dev->name, 1296 - p->path.is_active ? "A" : "F", 1295 + p->is_active ? "A" : "F", 1297 1296 p->fail_count); 1298 1297 if (pg->ps.type->status) 1299 1298 sz += pg->ps.type->status(&pg->ps,
-2
drivers/md/dm-mpath.h
··· 13 13 14 14 struct dm_path { 15 15 struct dm_dev *dev; /* Read-only */ 16 - unsigned is_active; /* Read-only */ 17 - 18 16 void *pscontext; /* For path-selector use */ 19 17 }; 20 18