2 * Copyright (C) 2004 Jeff Dike (jdike@addtoit.com)
3 * Licensed under the GPL
6 #ifndef __FILEHANDLE_H__
7 #define __FILEHANDLE_H__
9 #include "linux/list.h"
14 struct list_head list;
16 char *(*get_name)(struct inode *);
18 struct openflags flags;
21 extern struct file_handle bad_filehandle;
23 extern int open_file(char *name, struct openflags flags, int mode);
24 extern void *open_dir(char *file);
25 extern int open_filehandle(char *name, struct openflags flags, int mode,
26 struct file_handle *fh);
27 extern int read_file(struct file_handle *fh, unsigned long long offset,
29 extern int write_file(struct file_handle *fh, unsigned long long offset,
30 const char *buf, int len);
31 extern int truncate_file(struct file_handle *fh, unsigned long long size);
32 extern int close_file(struct file_handle *fh);
33 extern void not_reclaimable(struct file_handle *fh);
34 extern void is_reclaimable(struct file_handle *fh,
35 char *(name_proc)(struct inode *),
37 extern int filehandle_fd(struct file_handle *fh);
38 extern int make_pipe(struct file_handle *fhs);
43 * Overrides for Emacs so that we follow Linus's tabbing style.
44 * Emacs will notice this stuff at the end of the file and automatically
45 * adjust the settings for this buffer only. This must remain at the end
47 * ---------------------------------------------------------------------------
49 * c-file-style: "linux"