~ubuntu-branches/ubuntu/saucy/linux-ppc/saucy

« back to all changes in this revision

Viewing changes to drivers/block/xen-blkback/blkback.c

  • Committer: Package Import Robot
  • Author(s): Ben Collins, Ubuntu: 3.8.0-17.27
  • Date: 2013-04-08 18:16:48 UTC
  • mfrom: (16.1.9 raring)
  • Revision ID: package-import@ubuntu.com-20130408181648-z7suubhgtq6k6zke
Tags: 3.8.0-8.14
[ Ubuntu: 3.8.0-17.27 ]

* SAUCE: (no-up) Bluetooth: Add support for 04ca:2007
  - LP: #1153448
* SAUCE: (no-up) Bluetooth: Add support for 105b:e065
  - LP: #1161261
* SAUCE: (no-up) tools/power turbostat: additional Haswell CPU-id
  - LP: #1083993
* Revert "SAUCE: (no-up) seccomp: forcing auditing of kill condition"
  Replaced by upstream patch.
* Release Tracking Bug
  - LP: #1165746
* rebase to v3.8.6
* Revert "brcmsmac: support 4313iPA"
  - LP: #1157190
* tools/power turbostat: support Haswell
  - LP: #1083993
* net: calxedaxgmac: fix rx ring handling when OOM
* cpufreq: check OF node /cpus presence before dereferencing it
* Input: cypress_ps2 - fix trackpadi found in Dell XPS12
  - LP: #1103594
* ARM: OMAP2+: Limit omap initcalls to omap only on multiplatform kernels
* ARM: OMAP2+: Use omap initcalls
* ARM: OMAP: Fix i2c cmdline initcall for multiplatform
* ARM: OMAP: Fix dmaengine init for multiplatform
* ARM: OMAP2+: Add multiplatform debug_ll support
* ARM: OMAP2+: Disable code that currently does not work with
  multiplaform
* ARM: OMAP2+: Enable ARCH_MULTIPLATFORM support
* ARM: OMAP2+: Add minimal support for booting vexpress
* ARM: OMAP2+: Remove now obsolete uncompress.h and debug-macro.S
* davinci: do not include mach/hardware.h
* clk: export __clk_get_name for re-use in imx-ipu-v3 and others
* [SCSI] storvsc: avoid usage of WRITE_SAME
  - LP: #1157952
* ACPICA: Fix possible memory leak in dispatcher error path.
* KVM: x86: fix for buffer overflow in handling of MSR_KVM_SYSTEM_TIME (CVE-2013-1796)
  - LP: #1158254
  - CVE-2013-1796
* SAUCE: (no-up) Bluetooth: Add a load_firmware callback to struct hci_dev
  - LP: #1065400
* SAUCE: (no-up) Bluetooth: Implement broadcom patchram firmware loader
  - LP: #1065400
* SAUCE: (no-up) Bluetooth: Add support for 13d3:3388 and 13d3:3389
  - LP: #1065400

Show diffs side-by-side

added added

removed removed

Lines of Context:
679
679
        return err;
680
680
}
681
681
 
 
682
static int dispatch_other_io(struct xen_blkif *blkif,
 
683
                             struct blkif_request *req,
 
684
                             struct pending_req *pending_req)
 
685
{
 
686
        free_req(pending_req);
 
687
        make_response(blkif, req->u.other.id, req->operation,
 
688
                      BLKIF_RSP_EOPNOTSUPP);
 
689
        return -EIO;
 
690
}
 
691
 
682
692
static void xen_blk_drain_io(struct xen_blkif *blkif)
683
693
{
684
694
        atomic_set(&blkif->drain, 1);
800
810
 
801
811
                /* Apply all sanity checks to /private copy/ of request. */
802
812
                barrier();
803
 
                if (unlikely(req.operation == BLKIF_OP_DISCARD)) {
 
813
 
 
814
                switch (req.operation) {
 
815
                case BLKIF_OP_READ:
 
816
                case BLKIF_OP_WRITE:
 
817
                case BLKIF_OP_WRITE_BARRIER:
 
818
                case BLKIF_OP_FLUSH_DISKCACHE:
 
819
                        if (dispatch_rw_block_io(blkif, &req, pending_req))
 
820
                                goto done;
 
821
                        break;
 
822
                case BLKIF_OP_DISCARD:
804
823
                        free_req(pending_req);
805
824
                        if (dispatch_discard_io(blkif, &req))
806
 
                                break;
807
 
                } else if (dispatch_rw_block_io(blkif, &req, pending_req))
808
 
                        break;
 
825
                                goto done;
 
826
                        break;
 
827
                default:
 
828
                        if (dispatch_other_io(blkif, &req, pending_req))
 
829
                                goto done;
 
830
                        break;
 
831
                }
809
832
 
810
833
                /* Yield point for this unbounded loop. */
811
834
                cond_resched();
812
835
        }
813
 
 
 
836
done:
814
837
        return more_to_do;
815
838
}
816
839
 
978
1001
                bio->bi_end_io  = end_block_io_op;
979
1002
        }
980
1003
 
981
 
        /*
982
 
         * We set it one so that the last submit_bio does not have to call
983
 
         * atomic_inc.
984
 
         */
985
1004
        atomic_set(&pending_req->pendcnt, nbio);
986
 
 
987
 
        /* Get a reference count for the disk queue and start sending I/O */
988
1005
        blk_start_plug(&plug);
989
1006
 
990
1007
        for (i = 0; i < nbio; i++)
1012
1029
 fail_put_bio:
1013
1030
        for (i = 0; i < nbio; i++)
1014
1031
                bio_put(biolist[i]);
 
1032
        atomic_set(&pending_req->pendcnt, 1);
1015
1033
        __end_block_io_op(pending_req, -EINVAL);
1016
1034
        msleep(1); /* back off a bit */
1017
1035
        return -EIO;