Deleted Added
full compact
blkback.c (284296) blkback.c (285391)
1/*-
2 * Copyright (c) 2009-2012 Spectra Logic Corporation
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

26 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGES.
29 *
30 * Authors: Justin T. Gibbs (Spectra Logic Corporation)
31 * Ken Merry (Spectra Logic Corporation)
32 */
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2009-2012 Spectra Logic Corporation
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

26 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGES.
29 *
30 * Authors: Justin T. Gibbs (Spectra Logic Corporation)
31 * Ken Merry (Spectra Logic Corporation)
32 */
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/dev/xen/blkback/blkback.c 284296 2015-06-12 07:50:34Z royger $");
34__FBSDID("$FreeBSD: head/sys/dev/xen/blkback/blkback.c 285391 2015-07-11 16:22:48Z mjg $");
35
36/**
37 * \file blkback.c
38 *
39 * \brief Device driver supporting the vending of block storage from
40 * a FreeBSD domain to other domains.
41 */
42

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

2687 xenbus_dev_fatal(xbb->dev, ENOENT,
2688 "Root file system not mounted");
2689 return (ENOENT);
2690 }
2691
2692 if ((xbb->flags & XBBF_READ_ONLY) == 0)
2693 flags |= FWRITE;
2694
35
36/**
37 * \file blkback.c
38 *
39 * \brief Device driver supporting the vending of block storage from
40 * a FreeBSD domain to other domains.
41 */
42

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

2687 xenbus_dev_fatal(xbb->dev, ENOENT,
2688 "Root file system not mounted");
2689 return (ENOENT);
2690 }
2691
2692 if ((xbb->flags & XBBF_READ_ONLY) == 0)
2693 flags |= FWRITE;
2694
2695 if (!curthread->td_proc->p_fd->fd_cdir) {
2696 curthread->td_proc->p_fd->fd_cdir = rootvnode;
2697 VREF(rootvnode);
2698 }
2699 if (!curthread->td_proc->p_fd->fd_rdir) {
2700 curthread->td_proc->p_fd->fd_rdir = rootvnode;
2701 VREF(rootvnode);
2702 }
2703 if (!curthread->td_proc->p_fd->fd_jdir) {
2704 curthread->td_proc->p_fd->fd_jdir = rootvnode;
2705 VREF(rootvnode);
2706 }
2695 pwd_ensure_dirs();
2707
2708 again:
2709 NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, xbb->dev_name, curthread);
2710 error = vn_open(&nd, &flags, 0, NULL);
2711 if (error) {
2712 /*
2713 * This is the only reasonable guess we can make as far as
2714 * path if the user doesn't give us a fully qualified path.

--- 1190 unchanged lines hidden ---
2696
2697 again:
2698 NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, xbb->dev_name, curthread);
2699 error = vn_open(&nd, &flags, 0, NULL);
2700 if (error) {
2701 /*
2702 * This is the only reasonable guess we can make as far as
2703 * path if the user doesn't give us a fully qualified path.

--- 1190 unchanged lines hidden ---