blob: bab6a5a924077fff1a4631bb905602a7be4a8c33 [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
13
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -060014extern int
15xfs_ioc_space(
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -060016 struct file *filp,
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -060017 xfs_flock64_t *bf);
18
Dave Chinnera133d952013-08-12 20:49:48 +100019int
20xfs_ioc_swapext(
21 xfs_swapext_t *sxp);
22
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -060023extern int
24xfs_find_handle(
25 unsigned int cmd,
26 xfs_fsop_handlereq_t *hreq);
27
28extern int
29xfs_open_by_handle(
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -060030 struct file *parfilp,
Christoph Hellwigab596ad2009-01-19 02:02:57 +010031 xfs_fsop_handlereq_t *hreq);
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -060032
33extern int
34xfs_readlink_by_handle(
Christoph Hellwigab596ad2009-01-19 02:02:57 +010035 struct file *parfilp,
36 xfs_fsop_handlereq_t *hreq);
sandeen@sandeen.net28750972008-11-25 21:20:15 -060037
Christoph Hellwigd0ce64392020-02-26 17:30:31 -080038int xfs_ioc_attrmulti_one(struct file *parfilp, struct inode *inode,
39 uint32_t opcode, void __user *uname, void __user *value,
40 uint32_t *len, uint32_t flags);
Christoph Hellwigeb241c72020-02-26 17:30:40 -080041int xfs_ioc_attr_list(struct xfs_inode *dp, void __user *ubuf, int bufsize,
Christoph Hellwig53ac39f2020-02-26 17:30:41 -080042 int flags, struct xfs_attrlist_cursor __user *ucursor);
sandeen@sandeen.net28750972008-11-25 21:20:15 -060043
Christoph Hellwigab596ad2009-01-19 02:02:57 +010044extern struct dentry *
45xfs_handle_to_dentry(
46 struct file *parfilp,
47 void __user *uhandle,
48 u32 hlen);
49
Christoph Hellwigddcd8562008-12-03 07:55:34 -050050extern long
Christoph Hellwig4d4be482008-12-09 04:47:33 -050051xfs_file_ioctl(
52 struct file *filp,
Christoph Hellwigddcd8562008-12-03 07:55:34 -050053 unsigned int cmd,
Christoph Hellwig4d4be482008-12-09 04:47:33 -050054 unsigned long p);
Christoph Hellwigddcd8562008-12-03 07:55:34 -050055
56extern long
Christoph Hellwig4d4be482008-12-09 04:47:33 -050057xfs_file_compat_ioctl(
Christoph Hellwigddcd8562008-12-03 07:55:34 -050058 struct file *file,
59 unsigned int cmd,
60 unsigned long arg);
61
Darrick J. Wong8bfe9d12019-07-03 20:36:26 -070062int xfs_fsbulkstat_one_fmt(struct xfs_ibulk *breq,
Darrick J. Wong7035f972019-07-03 20:36:26 -070063 const struct xfs_bulkstat *bstat);
Darrick J. Wong5f19c7f2019-07-03 20:36:27 -070064int xfs_fsinumbers_fmt(struct xfs_ibulk *breq, const struct xfs_inumbers *igrp);
Darrick J. Wong2810bd62019-07-02 09:39:40 -070065
sandeen@sandeen.netd5547f92008-11-25 21:20:08 -060066#endif