Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 2 | * Copyright (c) 2000,2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | * |
Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 5 | * 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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | * published by the Free Software Foundation. |
| 8 | * |
Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 9 | * 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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | * |
Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 14 | * 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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | */ |
| 18 | #ifndef __XFS_DFRAG_H__ |
| 19 | #define __XFS_DFRAG_H__ |
| 20 | |
| 21 | /* |
| 22 | * Structure passed to xfs_swapext |
| 23 | */ |
| 24 | |
| 25 | typedef struct xfs_swapext |
| 26 | { |
| 27 | __int64_t sx_version; /* version */ |
| 28 | __int64_t sx_fdtarget; /* fd of target file */ |
| 29 | __int64_t sx_fdtmp; /* fd of tmp file */ |
| 30 | xfs_off_t sx_offset; /* offset into file */ |
| 31 | xfs_off_t sx_length; /* leng from offset */ |
| 32 | char sx_pad[16]; /* pad space, unused */ |
| 33 | xfs_bstat_t sx_stat; /* stat of target b4 copy */ |
| 34 | } xfs_swapext_t; |
| 35 | |
| 36 | /* |
| 37 | * Version flag |
| 38 | */ |
| 39 | #define XFS_SX_VERSION 0 |
| 40 | |
| 41 | #ifdef __KERNEL__ |
| 42 | /* |
| 43 | * Prototypes for visible xfs_dfrag.c routines. |
| 44 | */ |
| 45 | |
| 46 | /* |
| 47 | * Syscall interface for xfs_swapext |
| 48 | */ |
sandeen@sandeen.net | 743bb46 | 2008-11-25 21:20:06 -0600 | [diff] [blame] | 49 | int xfs_swapext(struct xfs_swapext *sx); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | #endif /* __KERNEL__ */ |
| 52 | |
| 53 | #endif /* __XFS_DFRAG_H__ */ |