Deleted Added
full compact
ctl_backend_block.c (272616) ctl_backend_block.c (272632)
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: stable/10/sys/cam/ctl/ctl_backend_block.c 272616 2014-10-06 12:35:41Z mav $");
43__FBSDID("$FreeBSD: stable/10/sys/cam/ctl/ctl_backend_block.c 272632 2014-10-06 13:21:13Z mav $");
44
45#include <opt_kdtrace.h>
46
47#include <sys/param.h>
48#include <sys/systm.h>
49#include <sys/kernel.h>
50#include <sys/types.h>
51#include <sys/kthread.h>

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

1040 uint8_t *buf, *end;
1041
1042 DPRINTF("entered\n");
1043
1044 beio = (struct ctl_be_block_io *)PRIV(io)->ptr;
1045 softc = be_lun->softc;
1046 lbalen = ARGS(beio->io);
1047
44
45#include <opt_kdtrace.h>
46
47#include <sys/param.h>
48#include <sys/systm.h>
49#include <sys/kernel.h>
50#include <sys/types.h>
51#include <sys/kthread.h>

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

1040 uint8_t *buf, *end;
1041
1042 DPRINTF("entered\n");
1043
1044 beio = (struct ctl_be_block_io *)PRIV(io)->ptr;
1045 softc = be_lun->softc;
1046 lbalen = ARGS(beio->io);
1047
1048 if (lbalen->flags & ~(SWS_LBDATA | SWS_UNMAP | SWS_ANCHOR) ||
1048 if (lbalen->flags & ~(SWS_LBDATA | SWS_UNMAP | SWS_ANCHOR | SWS_NDOB) ||
1049 (lbalen->flags & (SWS_UNMAP | SWS_ANCHOR) && be_lun->unmap == NULL)) {
1050 ctl_free_beio(beio);
1051 ctl_set_invalid_field(&io->scsiio,
1052 /*sks_valid*/ 1,
1053 /*command*/ 1,
1054 /*field*/ 1,
1055 /*bit_valid*/ 0,
1056 /*bit*/ 0);

--- 1549 unchanged lines hidden ---
1049 (lbalen->flags & (SWS_UNMAP | SWS_ANCHOR) && be_lun->unmap == NULL)) {
1050 ctl_free_beio(beio);
1051 ctl_set_invalid_field(&io->scsiio,
1052 /*sks_valid*/ 1,
1053 /*command*/ 1,
1054 /*field*/ 1,
1055 /*bit_valid*/ 0,
1056 /*bit*/ 0);

--- 1549 unchanged lines hidden ---