Deleted Added
full compact
ctl_backend_ramdisk.c (275474) ctl_backend_ramdisk.c (275920)
1/*-
2 * Copyright (c) 2003, 2008 Silicon Graphics International Corp.
3 * Copyright (c) 2012 The FreeBSD Foundation
4 * All rights reserved.
5 *
6 * Portions of this software were developed by Edward Tomasz Napierala
7 * under sponsorship from the FreeBSD Foundation.
8 *

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

35 */
36/*
37 * CAM Target Layer backend for a "fake" ramdisk.
38 *
39 * Author: Ken Merry <ken@FreeBSD.org>
40 */
41
42#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2003, 2008 Silicon Graphics International Corp.
3 * Copyright (c) 2012 The FreeBSD Foundation
4 * All rights reserved.
5 *
6 * Portions of this software were developed by Edward Tomasz Napierala
7 * under sponsorship from the FreeBSD Foundation.
8 *

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

35 */
36/*
37 * CAM Target Layer backend for a "fake" ramdisk.
38 *
39 * Author: Ken Merry <ken@FreeBSD.org>
40 */
41
42#include <sys/cdefs.h>
43__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl_backend_ramdisk.c 275474 2014-12-04 11:34:19Z mav $");
43__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl_backend_ramdisk.c 275920 2014-12-18 22:32:22Z mav $");
44
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/kernel.h>
48#include <sys/condvar.h>
49#include <sys/types.h>
50#include <sys/lock.h>
51#include <sys/mutex.h>

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

592 if (value != NULL && strcmp(value, "on") == 0)
593 unmap = 1;
594
595 be_lun->flags = CTL_BE_RAMDISK_LUN_UNCONFIGURED;
596 be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_PRIMARY;
597 if (unmap)
598 be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_UNMAP;
599 be_lun->ctl_be_lun.atomicblock = UINT32_MAX;
44
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/kernel.h>
48#include <sys/condvar.h>
49#include <sys/types.h>
50#include <sys/lock.h>
51#include <sys/mutex.h>

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

592 if (value != NULL && strcmp(value, "on") == 0)
593 unmap = 1;
594
595 be_lun->flags = CTL_BE_RAMDISK_LUN_UNCONFIGURED;
596 be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_PRIMARY;
597 if (unmap)
598 be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_UNMAP;
599 be_lun->ctl_be_lun.atomicblock = UINT32_MAX;
600 be_lun->ctl_be_lun.opttxferlen = softc->rd_size / blocksize;
600 be_lun->ctl_be_lun.be_lun = be_lun;
601
602 if (params->flags & CTL_LUN_FLAG_ID_REQ) {
603 be_lun->ctl_be_lun.req_lun_id = params->req_lun_id;
604 be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_ID_REQ;
605 } else
606 be_lun->ctl_be_lun.req_lun_id = 0;
607

--- 390 unchanged lines hidden ---
601 be_lun->ctl_be_lun.be_lun = be_lun;
602
603 if (params->flags & CTL_LUN_FLAG_ID_REQ) {
604 be_lun->ctl_be_lun.req_lun_id = params->req_lun_id;
605 be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_ID_REQ;
606 } else
607 be_lun->ctl_be_lun.req_lun_id = 0;
608

--- 390 unchanged lines hidden ---