blob: d4abba2c13c1ae166c2052806287a90fda9b7599 [file] [log] [blame]
Dave Chinner0b61f8a2018-06-05 19:42:14 -07001// SPDX-License-Identifier: GPL-2.0
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -06002/*
3 * Copyright (c) 2008 Silicon Graphics, Inc.
4 * All Rights Reserved.
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -06005 */
6#ifndef __XFS_IOCTL_H__
7#define __XFS_IOCTL_H__
8
Christoph Hellwig3e7a7792020-02-26 17:30:38 -08009struct xfs_bstat;
10struct xfs_ibulk;
11struct xfs_inogrp;
12
Dave Chinnera133d952013-08-12 20:49:48 +100013int
14xfs_ioc_swapext(
15 xfs_swapext_t *sxp);
16
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -060017extern int
18xfs_find_handle(
19 unsigned int cmd,
20 xfs_fsop_handlereq_t *hreq);
21
22extern int
23xfs_open_by_handle(
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -060024 struct file *parfilp,
Christoph Hellwigab596ad2009-01-19 02:02:57 +010025 xfs_fsop_handlereq_t *hreq);
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -060026
27extern int
28xfs_readlink_by_handle(
Christoph Hellwigab596ad2009-01-19 02:02:57 +010029 struct file *parfilp,
30 xfs_fsop_handlereq_t *hreq);
sandeen@sandeen.net28750972008-11-25 21:20:15 -060031
Christoph Hellwigd0ce64392020-02-26 17:30:31 -080032int xfs_ioc_attrmulti_one(struct file *parfilp, struct inode *inode,
33 uint32_t opcode, void __user *uname, void __user *value,
34 uint32_t *len, uint32_t flags);
Dan Carpenter6ed63562021-12-21 09:38:19 -080035int xfs_ioc_attr_list(struct xfs_inode *dp, void __user *ubuf,
36 size_t bufsize, int flags,
37 struct xfs_attrlist_cursor __user *ucursor);
sandeen@sandeen.net28750972008-11-25 21:20:15 -060038
Christoph Hellwigab596ad2009-01-19 02:02:57 +010039extern struct dentry *
40xfs_handle_to_dentry(
41 struct file *parfilp,
42 void __user *uhandle,
43 u32 hlen);
44
Miklos Szeredi9fefd5d2021-04-07 14:36:43 +020045extern int
46xfs_fileattr_get(
47 struct dentry *dentry,
48 struct fileattr *fa);
49
50extern int
51xfs_fileattr_set(
52 struct user_namespace *mnt_userns,
53 struct dentry *dentry,
54 struct fileattr *fa);
55
Christoph Hellwigddcd8562008-12-03 07:55:34 -050056extern long
Christoph Hellwig4d4be482008-12-09 04:47:33 -050057xfs_file_ioctl(
58 struct file *filp,
Christoph Hellwigddcd8562008-12-03 07:55:34 -050059 unsigned int cmd,
Christoph Hellwig4d4be482008-12-09 04:47:33 -050060 unsigned long p);
Christoph Hellwigddcd8562008-12-03 07:55:34 -050061
62extern long
Christoph Hellwig4d4be482008-12-09 04:47:33 -050063xfs_file_compat_ioctl(
Christoph Hellwigddcd8562008-12-03 07:55:34 -050064 struct file *file,
65 unsigned int cmd,
66 unsigned long arg);
67
Darrick J. Wong8bfe9d12019-07-03 20:36:26 -070068int xfs_fsbulkstat_one_fmt(struct xfs_ibulk *breq,
Darrick J. Wong7035f972019-07-03 20:36:26 -070069 const struct xfs_bulkstat *bstat);
Darrick J. Wong5f19c7f2019-07-03 20:36:27 -070070int xfs_fsinumbers_fmt(struct xfs_ibulk *breq, const struct xfs_inumbers *igrp);
Darrick J. Wong2810bd62019-07-02 09:39:40 -070071
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -060072#endif