2 * Copyright (C) 2004 Piotr Neuman (sikkh@wp.pl) and
3 * Jeff Dike (jdike@addtoit.com)
4 * Licensed under the GPL
7 #ifndef __UM_FS_METADATA
8 #define __UM_FS_METADATA
11 #include "linux/list.h"
16 struct externfs_data ext;
22 struct humfs_meta_ops *meta;
27 struct file_handle data;
28 struct externfs_inode ext;
31 struct humfs_meta_ops {
32 struct list_head list;
34 struct humfs_file *(*init_file)(void);
35 int (*open_file)(struct humfs_file *hf, const char *path,
36 struct inode *inode, struct humfs *humfs);
37 int (*create_file)(struct humfs_file *hf, const char *path, int mode,
38 int uid, int gid, struct inode *inode,
40 void (*close_file)(struct humfs_file *humfs);
41 int (*ownerships)(const char *path, int *mode_out, int *uid_out,
42 int *gid_out, char *type_out, int *maj_out,
43 int *min_out, struct humfs *humfs);
44 int (*make_node)(const char *path, int mode, int uid, int gid,
45 int type, int major, int minor, struct humfs *humfs);
46 int (*create_link)(const char *to, const char *from,
48 int (*remove_file)(const char *path, struct humfs *humfs);
49 int (*create_dir)(const char *path, int mode, int uid, int gid,
51 int (*remove_dir)(const char *path, struct humfs *humfs);
52 int (*change_ownerships)(const char *path, int mode, int uid, int gid,
54 int (*rename_file)(const char *from, const char *to,
56 void (*invisible)(struct humfs_file *hf);
57 struct humfs *(*init_mount)(char *root);
58 void (*free_mount)(struct humfs *humfs);
61 extern void register_meta(struct humfs_meta_ops *ops);
62 extern void unregister_meta(struct humfs_meta_ops *ops);
64 extern char *humfs_path(char *dir, char *file);
65 extern char *humfs_name(struct inode *inode, char *prefix);
66 extern struct humfs *inode_humfs_info(struct inode *inode);
71 * Overrides for Emacs so that we follow Linus's tabbing style.
72 * Emacs will notice this stuff at the end of the file and automatically
73 * adjust the settings for this buffer only. This must remain at the end
75 * ---------------------------------------------------------------------------
77 * c-file-style: "linux"