dm-mpath.c (4c3f48380fedbd714fc95958f503c1b5adf3ee6b) dm-mpath.c (04867370ec40b708bd335df641182ddab0c59685)
1/*
2 * Copyright (C) 2003 Sistina Software Limited.
3 * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved.
4 *
5 * This file is released under the GPL.
6 */
7
8#include <linux/device-mapper.h>

--- 1271 unchanged lines hidden (view full) ---

1280 unsigned long flags;
1281 struct multipath *m = pgpath->pg->m;
1282
1283 spin_lock_irqsave(&m->lock, flags);
1284
1285 if (!pgpath->is_active)
1286 goto out;
1287
1/*
2 * Copyright (C) 2003 Sistina Software Limited.
3 * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved.
4 *
5 * This file is released under the GPL.
6 */
7
8#include <linux/device-mapper.h>

--- 1271 unchanged lines hidden (view full) ---

1280 unsigned long flags;
1281 struct multipath *m = pgpath->pg->m;
1282
1283 spin_lock_irqsave(&m->lock, flags);
1284
1285 if (!pgpath->is_active)
1286 goto out;
1287
1288 DMWARN("Failing path %s.", pgpath->path.dev->name);
1288 DMWARN("%s: Failing path %s.",
1289 dm_device_name(dm_table_get_md(m->ti->table)),
1290 pgpath->path.dev->name);
1289
1290 pgpath->pg->ps.type->fail_path(&pgpath->pg->ps, &pgpath->path);
1291 pgpath->is_active = false;
1292 pgpath->fail_count++;
1293
1294 atomic_dec(&m->nr_valid_paths);
1295
1296 if (pgpath == m->current_pgpath)

--- 22 unchanged lines hidden (view full) ---

1319 struct multipath *m = pgpath->pg->m;
1320 unsigned nr_valid_paths;
1321
1322 spin_lock_irqsave(&m->lock, flags);
1323
1324 if (pgpath->is_active)
1325 goto out;
1326
1291
1292 pgpath->pg->ps.type->fail_path(&pgpath->pg->ps, &pgpath->path);
1293 pgpath->is_active = false;
1294 pgpath->fail_count++;
1295
1296 atomic_dec(&m->nr_valid_paths);
1297
1298 if (pgpath == m->current_pgpath)

--- 22 unchanged lines hidden (view full) ---

1321 struct multipath *m = pgpath->pg->m;
1322 unsigned nr_valid_paths;
1323
1324 spin_lock_irqsave(&m->lock, flags);
1325
1326 if (pgpath->is_active)
1327 goto out;
1328
1327 DMWARN("Reinstating path %s.", pgpath->path.dev->name);
1329 DMWARN("%s: Reinstating path %s.",
1330 dm_device_name(dm_table_get_md(m->ti->table)),
1331 pgpath->path.dev->name);
1328
1329 r = pgpath->pg->ps.type->reinstate_path(&pgpath->pg->ps, &pgpath->path);
1330 if (r)
1331 goto out;
1332
1333 pgpath->is_active = true;
1334
1335 nr_valid_paths = atomic_inc_return(&m->nr_valid_paths);

--- 822 unchanged lines hidden ---
1332
1333 r = pgpath->pg->ps.type->reinstate_path(&pgpath->pg->ps, &pgpath->path);
1334 if (r)
1335 goto out;
1336
1337 pgpath->is_active = true;
1338
1339 nr_valid_paths = atomic_inc_return(&m->nr_valid_paths);

--- 822 unchanged lines hidden ---