blob: 07bdabcc4158f12ead3ee4ab655a7862c18fca4e [file] [log] [blame]
Dave Chinner19de7352013-04-03 16:11:18 +11001/*
2 * Copyright (c) 2012 Red Hat, Inc. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it would be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write the Free Software Foundation,
15 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17#ifndef __XFS_SYMLINK_H
18#define __XFS_SYMLINK_H 1
19
20/*
21 * The maximum pathlen is 1024 bytes. Since the minimum file system
22 * blocksize is 512 bytes, we can get a max of 2 extents back from
23 * bmapi.
24 */
25#define XFS_SYMLINK_MAPS 2
26
27void xfs_symlink_local_to_remote(struct xfs_trans *tp, struct xfs_buf *bp,
28 struct xfs_inode *ip, struct xfs_ifork *ifp);
29
30#ifdef __KERNEL__
31
32int xfs_symlink(struct xfs_inode *dp, struct xfs_name *link_name,
33 const char *target_path, umode_t mode, struct xfs_inode **ipp);
34int xfs_readlink(struct xfs_inode *ip, char *link);
35int xfs_inactive_symlink_rmt(struct xfs_inode *ip, struct xfs_trans **tpp);
36
37#endif /* __KERNEL__ */
38#endif /* __XFS_SYMLINK_H */