blob: 324e413deadd5a2b52bcf71249546fcd1e7ad692 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Nathan Scott7b718762005-11-02 14:58:39 +11002 * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004 *
Nathan Scott7b718762005-11-02 14:58:39 +11005 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 * published by the Free Software Foundation.
8 *
Nathan Scott7b718762005-11-02 14:58:39 +11009 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
Linus Torvalds1da177e2005-04-16 15:20:36 -070013 *
Nathan Scott7b718762005-11-02 14:58:39 +110014 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Linus Torvalds1da177e2005-04-16 15:20:36 -070017 *
Linus Torvalds1da177e2005-04-16 15:20:36 -070018 * Portions Copyright (c) 1982, 1986, 1993, 1994
19 * The Regents of the University of California. All rights reserved.
20 *
21 * Redistribution and use in source and binary forms, with or without
22 * modification, are permitted provided that the following conditions
23 * are met:
24 * 1. Redistributions of source code must retain the above copyright
25 * notice, this list of conditions and the following disclaimer.
26 * 2. Redistributions in binary form must reproduce the above copyright
27 * notice, this list of conditions and the following disclaimer in the
28 * documentation and/or other materials provided with the distribution.
29 * 3. Neither the name of the University nor the names of its contributors
30 * may be used to endorse or promote products derived from this software
31 * without specific prior written permission.
32 *
33 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
34 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
36 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
37 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
38 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
39 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
41 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
42 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
43 * SUCH DAMAGE.
44 */
45#ifndef __XFS_SUPPORT_MOVE_H__
46#define __XFS_SUPPORT_MOVE_H__
47
48#include <linux/uio.h>
49#include <asm/uaccess.h>
50
51/* Segment flag values. */
52enum uio_seg {
53 UIO_USERSPACE, /* from user data space */
54 UIO_SYSSPACE, /* from system space */
55};
56
57struct uio {
Lachlan McIlroye5eb7f22007-02-10 18:35:21 +110058 struct kvec *uio_iov; /* pointer to array of iovecs */
Linus Torvalds1da177e2005-04-16 15:20:36 -070059 int uio_iovcnt; /* number of iovecs in array */
60 xfs_off_t uio_offset; /* offset in file this uio corresponds to */
61 int uio_resid; /* residual i/o count */
62 enum uio_seg uio_segflg; /* see above */
63};
64
65typedef struct uio uio_t;
Lachlan McIlroye5eb7f22007-02-10 18:35:21 +110066typedef struct kvec iovec_t;
Linus Torvalds1da177e2005-04-16 15:20:36 -070067
Vlad Apostolov70a50522006-11-11 18:04:41 +110068extern int xfs_uio_read (caddr_t, size_t, uio_t *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070069
70#endif /* __XFS_SUPPORT_MOVE_H__ */