blob: cc091ed02b4a9f08f571fbaaa70a32ff118a4239 [file] [log] [blame]
Thomas Gleixner328970d2019-05-24 12:04:05 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Mark Fashehccd979b2005-12-15 14:31:24 -08002/* -*- mode: c; c-basic-offset: 8; -*-
3 * vim: noexpandtab sw=8 ts=8 sts=0:
4 *
5 * namei.h
6 *
7 * Function prototypes
8 *
9 * Copyright (C) 2002, 2004 Oracle. All rights reserved.
Mark Fashehccd979b2005-12-15 14:31:24 -080010 */
11
12#ifndef OCFS2_NAMEI_H
13#define OCFS2_NAMEI_H
14
Joseph Qi30edc432015-11-05 18:44:01 -080015#define OCFS2_DIO_ORPHAN_PREFIX "dio-"
16#define OCFS2_DIO_ORPHAN_PREFIX_LEN 4
17
Arjan van de Ven92e1d5b2007-02-12 00:55:39 -080018extern const struct inode_operations ocfs2_dir_iops;
Mark Fashehccd979b2005-12-15 14:31:24 -080019
20struct dentry *ocfs2_get_parent(struct dentry *child);
21
Mark Fashehccd979b2005-12-15 14:31:24 -080022int ocfs2_orphan_del(struct ocfs2_super *osb,
Mark Fasheh1fabe142006-10-09 18:11:45 -070023 handle_t *handle,
Mark Fashehccd979b2005-12-15 14:31:24 -080024 struct inode *orphan_dir_inode,
25 struct inode *inode,
Joseph Qi06ee5c72015-02-16 15:59:54 -080026 struct buffer_head *orphan_dir_bh,
27 bool dio);
Tao Mabc13d342009-08-18 11:44:14 +080028int ocfs2_create_inode_in_orphan(struct inode *dir,
29 int mode,
30 struct inode **new_inode);
Joseph Qi06ee5c72015-02-16 15:59:54 -080031int ocfs2_add_inode_to_orphan(struct ocfs2_super *osb,
32 struct inode *inode);
33int ocfs2_del_inode_from_orphan(struct ocfs2_super *osb,
Joseph Qicf1776a2015-06-24 16:54:59 -070034 struct inode *inode, struct buffer_head *di_bh,
35 int update_isize, loff_t end);
Tao Mabc13d342009-08-18 11:44:14 +080036int ocfs2_mv_orphaned_inode_to_new(struct inode *dir,
37 struct inode *new_inode,
38 struct dentry *new_dentry);
Mark Fashehccd979b2005-12-15 14:31:24 -080039
Mark Fashehccd979b2005-12-15 14:31:24 -080040#endif /* OCFS2_NAMEI_H */