blob: 403226ebb80bb39642839f43709aac4f9d320110 [file] [log] [blame]
Dave Chinner0b61f8a2018-06-05 19:42:14 -07001// SPDX-License-Identifier: GPL-2.0
David Chinner2a82b8b2007-07-11 11:09:12 +10002/*
3 * Copyright (c) 2006-2007 Silicon Graphics, Inc.
4 * All Rights Reserved.
David Chinner2a82b8b2007-07-11 11:09:12 +10005 */
6#ifndef __XFS_FILESTREAM_H__
7#define __XFS_FILESTREAM_H__
8
David Chinner2a82b8b2007-07-11 11:09:12 +10009struct xfs_mount;
10struct xfs_inode;
David Chinner2a82b8b2007-07-11 11:09:12 +100011struct xfs_bmalloca;
12
David Chinner2a82b8b2007-07-11 11:09:12 +100013int xfs_filestream_mount(struct xfs_mount *mp);
14void xfs_filestream_unmount(struct xfs_mount *mp);
David Chinner2a82b8b2007-07-11 11:09:12 +100015void xfs_filestream_deassociate(struct xfs_inode *ip);
Christoph Hellwig2cd2ef62014-04-23 07:11:51 +100016xfs_agnumber_t xfs_filestream_lookup_ag(struct xfs_inode *ip);
David Chinner2a82b8b2007-07-11 11:09:12 +100017int xfs_filestream_new_ag(struct xfs_bmalloca *ap, xfs_agnumber_t *agp);
Christoph Hellwigb94acd42014-04-23 07:11:52 +100018int xfs_filestream_peek_ag(struct xfs_mount *mp, xfs_agnumber_t agno);
David Chinner2a82b8b2007-07-11 11:09:12 +100019
Christoph Hellwigb8f82a42009-11-14 16:17:22 +000020static inline int
David Chinner2a82b8b2007-07-11 11:09:12 +100021xfs_inode_is_filestream(
22 struct xfs_inode *ip)
23{
Dave Chinner0560f312021-08-18 18:46:52 -070024 return xfs_has_filestreams(ip->i_mount) ||
Christoph Hellwigdb073492021-03-29 11:11:44 -070025 (ip->i_diflags & XFS_DIFLAG_FILESTREAM);
David Chinner2a82b8b2007-07-11 11:09:12 +100026}
27
David Chinner2a82b8b2007-07-11 11:09:12 +100028#endif /* __XFS_FILESTREAM_H__ */