Dave Chinner | 0b61f8a | 2018-06-05 19:42:14 -0700 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
David Chinner | 2a82b8b | 2007-07-11 11:09:12 +1000 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2006-2007 Silicon Graphics, Inc. |
| 4 | * All Rights Reserved. |
David Chinner | 2a82b8b | 2007-07-11 11:09:12 +1000 | [diff] [blame] | 5 | */ |
| 6 | #ifndef __XFS_FILESTREAM_H__ |
| 7 | #define __XFS_FILESTREAM_H__ |
| 8 | |
David Chinner | 2a82b8b | 2007-07-11 11:09:12 +1000 | [diff] [blame] | 9 | struct xfs_mount; |
| 10 | struct xfs_inode; |
David Chinner | 2a82b8b | 2007-07-11 11:09:12 +1000 | [diff] [blame] | 11 | struct xfs_bmalloca; |
| 12 | |
David Chinner | 2a82b8b | 2007-07-11 11:09:12 +1000 | [diff] [blame] | 13 | int xfs_filestream_mount(struct xfs_mount *mp); |
| 14 | void xfs_filestream_unmount(struct xfs_mount *mp); |
David Chinner | 2a82b8b | 2007-07-11 11:09:12 +1000 | [diff] [blame] | 15 | void xfs_filestream_deassociate(struct xfs_inode *ip); |
Christoph Hellwig | 2cd2ef6 | 2014-04-23 07:11:51 +1000 | [diff] [blame] | 16 | xfs_agnumber_t xfs_filestream_lookup_ag(struct xfs_inode *ip); |
David Chinner | 2a82b8b | 2007-07-11 11:09:12 +1000 | [diff] [blame] | 17 | int xfs_filestream_new_ag(struct xfs_bmalloca *ap, xfs_agnumber_t *agp); |
Christoph Hellwig | b94acd4 | 2014-04-23 07:11:52 +1000 | [diff] [blame] | 18 | int xfs_filestream_peek_ag(struct xfs_mount *mp, xfs_agnumber_t agno); |
David Chinner | 2a82b8b | 2007-07-11 11:09:12 +1000 | [diff] [blame] | 19 | |
Christoph Hellwig | b8f82a4 | 2009-11-14 16:17:22 +0000 | [diff] [blame] | 20 | static inline int |
David Chinner | 2a82b8b | 2007-07-11 11:09:12 +1000 | [diff] [blame] | 21 | xfs_inode_is_filestream( |
| 22 | struct xfs_inode *ip) |
| 23 | { |
Dave Chinner | 0560f31 | 2021-08-18 18:46:52 -0700 | [diff] [blame] | 24 | return xfs_has_filestreams(ip->i_mount) || |
Christoph Hellwig | db07349 | 2021-03-29 11:11:44 -0700 | [diff] [blame] | 25 | (ip->i_diflags & XFS_DIFLAG_FILESTREAM); |
David Chinner | 2a82b8b | 2007-07-11 11:09:12 +1000 | [diff] [blame] | 26 | } |
| 27 | |
David Chinner | 2a82b8b | 2007-07-11 11:09:12 +1000 | [diff] [blame] | 28 | #endif /* __XFS_FILESTREAM_H__ */ |