3 * Copyright (C) 2002 Florin Malita <mali@go.ro>
5 * This file is part of LUFS, a free userspace filesystem implementation.
6 * See http://lufs.sourceforge.net/ for updates.
8 * LUFS is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * LUFS is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef _FILESYSTEM_H_
24 #define _FILESYSTEM_H_
27 void *(*init)(struct list_head*, struct dir_cache*, struct credentials*, void**);
30 void (*umount)(void*);
31 int (*readdir)(void*, char*, struct directory*);
32 int (*stat)(void*, char*, struct lufs_fattr*);
33 int (*mkdir)(void*, char*, int);
34 int (*rmdir)(void*, char*);
35 int (*create)(void*, char*, int);
36 int (*unlink)(void*, char*);
37 int (*rename)(void*, char*, char*);
38 int (*open)(void*, char*, unsigned);
39 int (*release)(void*, char*);
40 int (*read)(void*, char*, long long, unsigned long, char*);
41 int (*write)(void*, char*, long long, unsigned long, char*);
42 int (*readlink)(void*, char*, char*, int);
43 int (*link)(void*, char*, char*);
44 int (*symlink)(void*, char*, char*);
45 int (*setattr)(void*, char*, struct lufs_fattr*);
49 struct message fs_msg;
50 struct fs_operations *fs_ops;
51 struct credentials *fs_credentials;
52 struct list_head *fs_config;
53 struct dir_cache *fs_cache;
56 char fs_buf[LU_MAXDATA];
60 void handle_fs(struct file_system*, int, pid_t);