1ccd979bdSMark Fasheh /* -*- mode: c; c-basic-offset: 8; -*- 2ccd979bdSMark Fasheh * vim: noexpandtab sw=8 ts=8 sts=0: 3ccd979bdSMark Fasheh * 4ccd979bdSMark Fasheh * dcache.h 5ccd979bdSMark Fasheh * 6ccd979bdSMark Fasheh * Function prototypes 7ccd979bdSMark Fasheh * 8ccd979bdSMark Fasheh * Copyright (C) 2002, 2004 Oracle. All rights reserved. 9ccd979bdSMark Fasheh * 10ccd979bdSMark Fasheh * This program is free software; you can redistribute it and/or 11ccd979bdSMark Fasheh * modify it under the terms of the GNU General Public 12ccd979bdSMark Fasheh * License as published by the Free Software Foundation; either 13ccd979bdSMark Fasheh * version 2 of the License, or (at your option) any later version. 14ccd979bdSMark Fasheh * 15ccd979bdSMark Fasheh * This program is distributed in the hope that it will be useful, 16ccd979bdSMark Fasheh * but WITHOUT ANY WARRANTY; without even the implied warranty of 17ccd979bdSMark Fasheh * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18ccd979bdSMark Fasheh * General Public License for more details. 19ccd979bdSMark Fasheh * 20ccd979bdSMark Fasheh * You should have received a copy of the GNU General Public 21ccd979bdSMark Fasheh * License along with this program; if not, write to the 22ccd979bdSMark Fasheh * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 23ccd979bdSMark Fasheh * Boston, MA 021110-1307, USA. 24ccd979bdSMark Fasheh */ 25ccd979bdSMark Fasheh 26ccd979bdSMark Fasheh #ifndef OCFS2_DCACHE_H 27ccd979bdSMark Fasheh #define OCFS2_DCACHE_H 28ccd979bdSMark Fasheh 29ccd979bdSMark Fasheh extern struct dentry_operations ocfs2_dentry_ops; 30ccd979bdSMark Fasheh 31d680efe9SMark Fasheh struct ocfs2_dentry_lock { 32d680efe9SMark Fasheh unsigned int dl_count; 33d680efe9SMark Fasheh u64 dl_parent_blkno; 34d680efe9SMark Fasheh 35d680efe9SMark Fasheh /* 36d680efe9SMark Fasheh * The ocfs2_dentry_lock keeps an inode reference until 37d680efe9SMark Fasheh * dl_lockres has been destroyed. This is usually done in 38d680efe9SMark Fasheh * ->d_iput() anyway, so there should be minimal impact. 39d680efe9SMark Fasheh */ 40d680efe9SMark Fasheh struct inode *dl_inode; 41d680efe9SMark Fasheh struct ocfs2_lock_res dl_lockres; 42d680efe9SMark Fasheh }; 43d680efe9SMark Fasheh 4480c05846SMark Fasheh int ocfs2_dentry_attach_lock(struct dentry *dentry, struct inode *inode, 4580c05846SMark Fasheh u64 parent_blkno, int create); 46d680efe9SMark Fasheh 4780c05846SMark Fasheh void ocfs2_dentry_lock_put(struct ocfs2_super *osb, 4880c05846SMark Fasheh struct ocfs2_dentry_lock *dl); 4980c05846SMark Fasheh 5080c05846SMark Fasheh struct dentry *ocfs2_find_local_alias(struct inode *inode, u64 parent_blkno, 5180c05846SMark Fasheh int skip_unhashed); 5280c05846SMark Fasheh 5380c05846SMark Fasheh void ocfs2_dentry_move(struct dentry *dentry, struct dentry *target, 5480c05846SMark Fasheh struct inode *old_dir, struct inode *new_dir); 55d680efe9SMark Fasheh 56d680efe9SMark Fasheh extern spinlock_t dentry_attach_lock; 57d680efe9SMark Fasheh 58ccd979bdSMark Fasheh #endif /* OCFS2_DCACHE_H */ 59