blob: 9cc891eb874e04095d2c202966aa4704a50cf880 [file] [log] [blame]
Thomas Gleixner328970d2019-05-24 12:04:05 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Masahiro Yamadafa60ce22021-05-06 18:06:44 -07002/*
Mark Fashehccd979b2005-12-15 14:31:24 -08003 * namei.h
4 *
5 * Function prototypes
6 *
7 * Copyright (C) 2002, 2004 Oracle. All rights reserved.
Mark Fashehccd979b2005-12-15 14:31:24 -08008 */
9
10#ifndef OCFS2_NAMEI_H
11#define OCFS2_NAMEI_H
12
Joseph Qi30edc432015-11-05 18:44:01 -080013#define OCFS2_DIO_ORPHAN_PREFIX "dio-"
14#define OCFS2_DIO_ORPHAN_PREFIX_LEN 4
15
Arjan van de Ven92e1d5b2007-02-12 00:55:39 -080016extern const struct inode_operations ocfs2_dir_iops;
Mark Fashehccd979b2005-12-15 14:31:24 -080017
18struct dentry *ocfs2_get_parent(struct dentry *child);
19
Mark Fashehccd979b2005-12-15 14:31:24 -080020int ocfs2_orphan_del(struct ocfs2_super *osb,
Mark Fasheh1fabe142006-10-09 18:11:45 -070021 handle_t *handle,
Mark Fashehccd979b2005-12-15 14:31:24 -080022 struct inode *orphan_dir_inode,
23 struct inode *inode,
Joseph Qi06ee5c72015-02-16 15:59:54 -080024 struct buffer_head *orphan_dir_bh,
25 bool dio);
Tao Mabc13d342009-08-18 11:44:14 +080026int ocfs2_create_inode_in_orphan(struct inode *dir,
27 int mode,
28 struct inode **new_inode);
Joseph Qi06ee5c72015-02-16 15:59:54 -080029int ocfs2_add_inode_to_orphan(struct ocfs2_super *osb,
30 struct inode *inode);
31int ocfs2_del_inode_from_orphan(struct ocfs2_super *osb,
Joseph Qicf1776a2015-06-24 16:54:59 -070032 struct inode *inode, struct buffer_head *di_bh,
33 int update_isize, loff_t end);
Tao Mabc13d342009-08-18 11:44:14 +080034int ocfs2_mv_orphaned_inode_to_new(struct inode *dir,
35 struct inode *new_inode,
36 struct dentry *new_dentry);
Mark Fashehccd979b2005-12-15 14:31:24 -080037
Mark Fashehccd979b2005-12-15 14:31:24 -080038#endif /* OCFS2_NAMEI_H */