1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * Copyright (C) 2001 Cluster File Systems, Inc. <braam@clusterfs.com>
6 * This file is part of Lustre, http://www.lustre.org.
8 * Lustre is free software; you can redistribute it and/or
9 * modify it under the terms of version 2 of the GNU General Public
10 * License as published by the Free Software Foundation.
12 * Lustre is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Lustre; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * lustre VFS/process permission interface
27 #define LL_FID_NAMELEN (16 + 1 + 8 + 1)
29 #include <libcfs/kp30.h>
30 #if defined(__linux__)
31 #include <linux/lvfs.h>
32 #elif defined(__APPLE__)
33 #include <darwin/lvfs.h>
34 #elif defined(__WINNT__)
35 #include <winnt/lvfs.h>
37 #error Unsupported operating system.
40 #include <lustre_ucache.h>
44 #include <lvfs_user_fs.h>
48 struct dentry *lvfs_fid2dentry(struct lvfs_run_ctxt *, __u64, __u32, __u64 ,void *data);
50 void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx,
51 struct lvfs_ucred *cred);
52 void pop_ctxt(struct lvfs_run_ctxt *saved, struct lvfs_run_ctxt *new_ctx,
53 struct lvfs_ucred *cred);
56 static inline int ll_fid2str(char *str, __u64 id, __u32 generation)
58 return sprintf(str, "%llx:%08x", (unsigned long long)id, generation);