Deleted Added
full compact
ctl_backend_block.c (267537) ctl_backend_block.c (267641)
1/*-
2 * Copyright (c) 2003 Silicon Graphics International Corp.
3 * Copyright (c) 2009-2011 Spectra Logic Corporation
4 * Copyright (c) 2012 The FreeBSD Foundation
5 * All rights reserved.
6 *
7 * Portions of this software were developed by Edward Tomasz Napierala
8 * under sponsorship from the FreeBSD Foundation.

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

35 * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_backend_block.c#5 $
36 */
37/*
38 * CAM Target Layer driver backend for block devices.
39 *
40 * Author: Ken Merry <ken@FreeBSD.org>
41 */
42#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2003 Silicon Graphics International Corp.
3 * Copyright (c) 2009-2011 Spectra Logic Corporation
4 * Copyright (c) 2012 The FreeBSD Foundation
5 * All rights reserved.
6 *
7 * Portions of this software were developed by Edward Tomasz Napierala
8 * under sponsorship from the FreeBSD Foundation.

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

35 * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_backend_block.c#5 $
36 */
37/*
38 * CAM Target Layer driver backend for block devices.
39 *
40 * Author: Ken Merry <ken@FreeBSD.org>
41 */
42#include <sys/cdefs.h>
43__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl_backend_block.c 267537 2014-06-16 11:00:14Z mav $");
43__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl_backend_block.c 267641 2014-06-19 12:43:41Z mav $");
44
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/kernel.h>
48#include <sys/types.h>
49#include <sys/kthread.h>
50#include <sys/bio.h>
51#include <sys/fcntl.h>

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

937
938static void
939ctl_be_block_cw_done_ws(struct ctl_be_block_io *beio)
940{
941 union ctl_io *io;
942
943 io = beio->io;
944 ctl_free_beio(beio);
44
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/kernel.h>
48#include <sys/types.h>
49#include <sys/kthread.h>
50#include <sys/bio.h>
51#include <sys/fcntl.h>

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

937
938static void
939ctl_be_block_cw_done_ws(struct ctl_be_block_io *beio)
940{
941 union ctl_io *io;
942
943 io = beio->io;
944 ctl_free_beio(beio);
945 if (((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE)
946 && ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) {
945 if ((io->io_hdr.flags & CTL_FLAG_ABORT) ||
946 ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE &&
947 (io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) {
947 ctl_config_write_done(io);
948 return;
949 }
950
951 ctl_be_block_config_write(io);
952}
953
954static void

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

1179ctl_be_block_next(struct ctl_be_block_io *beio)
1180{
1181 struct ctl_be_block_lun *be_lun;
1182 union ctl_io *io;
1183
1184 io = beio->io;
1185 be_lun = beio->lun;
1186 ctl_free_beio(beio);
948 ctl_config_write_done(io);
949 return;
950 }
951
952 ctl_be_block_config_write(io);
953}
954
955static void

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

1180ctl_be_block_next(struct ctl_be_block_io *beio)
1181{
1182 struct ctl_be_block_lun *be_lun;
1183 union ctl_io *io;
1184
1185 io = beio->io;
1186 be_lun = beio->lun;
1187 ctl_free_beio(beio);
1187 if (((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE)
1188 && ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) {
1188 if ((io->io_hdr.flags & CTL_FLAG_ABORT) ||
1189 ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE &&
1190 (io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) {
1189 ctl_data_submit_done(io);
1190 return;
1191 }
1192
1193 io->io_hdr.status &= ~CTL_STATUS_MASK;
1194 io->io_hdr.status |= CTL_STATUS_NONE;
1195
1196 mtx_lock(&be_lun->lock);

--- 1356 unchanged lines hidden ---
1191 ctl_data_submit_done(io);
1192 return;
1193 }
1194
1195 io->io_hdr.status &= ~CTL_STATUS_MASK;
1196 io->io_hdr.status |= CTL_STATUS_NONE;
1197
1198 mtx_lock(&be_lun->lock);

--- 1356 unchanged lines hidden ---