dm.c (531fe96364f30879753d46c1f52ab839e12d2e5d) | dm.c (2761e95fe40ca0d01864310fa4d488d7c5e34e18) |
---|---|
1/* 2 * Copyright (C) 2001, 2002 Sistina Software (UK) Limited. 3 * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved. 4 * 5 * This file is released under the GPL. 6 */ 7 8#include "dm.h" --- 522 unchanged lines hidden (view full) --- 531 io->error = error; 532 533 if (atomic_dec_and_test(&io->io_count)) { 534 if (io->error == DM_ENDIO_REQUEUE) { 535 /* 536 * Target requested pushing back the I/O. 537 */ 538 spin_lock_irqsave(&md->deferred_lock, flags); | 1/* 2 * Copyright (C) 2001, 2002 Sistina Software (UK) Limited. 3 * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved. 4 * 5 * This file is released under the GPL. 6 */ 7 8#include "dm.h" --- 522 unchanged lines hidden (view full) --- 531 io->error = error; 532 533 if (atomic_dec_and_test(&io->io_count)) { 534 if (io->error == DM_ENDIO_REQUEUE) { 535 /* 536 * Target requested pushing back the I/O. 537 */ 538 spin_lock_irqsave(&md->deferred_lock, flags); |
539 if (__noflush_suspending(md)) 540 bio_list_add_head(&md->deferred, io->bio); 541 else | 539 if (__noflush_suspending(md)) { 540 if (!bio_barrier(io->bio)) 541 bio_list_add_head(&md->deferred, 542 io->bio); 543 } else |
542 /* noflush suspend was interrupted. */ 543 io->error = -EIO; 544 spin_unlock_irqrestore(&md->deferred_lock, flags); 545 } 546 547 io_error = io->error; 548 bio = io->bio; 549 --- 903 unchanged lines hidden (view full) --- 1453 return; 1454 } 1455 1456 __split_and_process_bio(md, bio); 1457 dm_flush(md); 1458 1459 if (md->barrier_error != DM_ENDIO_REQUEUE) 1460 bio_endio(bio, md->barrier_error); | 544 /* noflush suspend was interrupted. */ 545 io->error = -EIO; 546 spin_unlock_irqrestore(&md->deferred_lock, flags); 547 } 548 549 io_error = io->error; 550 bio = io->bio; 551 --- 903 unchanged lines hidden (view full) --- 1455 return; 1456 } 1457 1458 __split_and_process_bio(md, bio); 1459 dm_flush(md); 1460 1461 if (md->barrier_error != DM_ENDIO_REQUEUE) 1462 bio_endio(bio, md->barrier_error); |
1463 else { 1464 spin_lock_irq(&md->deferred_lock); 1465 bio_list_add_head(&md->deferred, bio); 1466 spin_unlock_irq(&md->deferred_lock); 1467 } |
|
1461} 1462 1463/* 1464 * Process the deferred bios 1465 */ 1466static void dm_wq_work(struct work_struct *work) 1467{ 1468 struct mapped_device *md = container_of(work, struct mapped_device, --- 332 unchanged lines hidden --- | 1468} 1469 1470/* 1471 * Process the deferred bios 1472 */ 1473static void dm_wq_work(struct work_struct *work) 1474{ 1475 struct mapped_device *md = container_of(work, struct mapped_device, --- 332 unchanged lines hidden --- |