/*1* V9FS FID Management2*3* Copyright (C) 2005 by Eric Van Hensbergen <[email protected]>4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License version 27* as published by the Free Software Foundation.8*9* This program is distributed in the hope that it will be useful,10* but WITHOUT ANY WARRANTY; without even the implied warranty of11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12* GNU General Public License for more details.13*14* You should have received a copy of the GNU General Public License15* along with this program; if not, write to:16* Free Software Foundation17* 51 Franklin Street, Fifth Floor18* Boston, MA 02111-1301 USA19*20*/21#ifndef FS_9P_FID_H22#define FS_9P_FID_H23#include <linux/list.h>2425/**26* struct v9fs_dentry - 9p private data stored in dentry d_fsdata27* @lock: protects the fidlist28* @fidlist: list of FIDs currently associated with this dentry29*30* This structure defines the 9p private data associated with31* a particular dentry. In particular, this private data is used32* to lookup which 9P FID handle should be used for a particular VFS33* operation. FID handles are associated with dentries instead of34* inodes in order to more closely map functionality to the Plan 935* expected behavior for FID reclaimation and tracking.36*37* See Also: Mapping FIDs to Linux VFS model in38* Design and Implementation of the Linux 9P File System documentation39*/40struct v9fs_dentry {41spinlock_t lock; /* protect fidlist */42struct list_head fidlist;43};4445struct p9_fid *v9fs_fid_lookup(struct dentry *dentry);46struct p9_fid *v9fs_fid_clone(struct dentry *dentry);47int v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid);48struct p9_fid *v9fs_writeback_fid(struct dentry *dentry);49#endif505152