00001 #include "local.h"
00002
00003 #include <linux/fs.h>
00004 #include <linux/backing-dev.h>
00005 #include <linux/mount.h>
00006
00007
00008
00009
00010
00011
00012
00013 static LIST_HEAD(dde_vfs_mounts);
00014
00015 #define MAX_RA_PAGES 1
00016
00017 void default_unplug_io_fn(struct backing_dev_info *bdi, struct page* p)
00018 {
00019 }
00020
00021 struct backing_dev_info default_backing_dev_info = {
00022 .ra_pages = MAX_RA_PAGES,
00023 .state = 0,
00024 .capabilities = BDI_CAP_MAP_COPY,
00025 .unplug_io_fn = default_unplug_io_fn,
00026 };
00027
00028 int seq_printf(struct seq_file *m, const char *f, ...)
00029 {
00030 WARN_UNIMPL;
00031 return 0;
00032 }
00033
00034 int generic_writepages(struct address_space *mapping,
00035 struct writeback_control *wbc)
00036 {
00037 WARN_UNIMPL;
00038 return 0;
00039 }
00040
00041
00042
00043
00044
00045 struct page * find_get_page(struct address_space *mapping, unsigned long offset)
00046 {
00047 WARN_UNIMPL;
00048 return NULL;
00049 }
00050
00051 void unlock_page(struct page *page)
00052 {
00053 WARN_UNIMPL;
00054 }
00055
00056 int test_set_page_writeback(struct page *page)
00057 {
00058 WARN_UNIMPL;
00059 return 0;
00060 }
00061
00062 void end_page_writeback(struct page *page)
00063 {
00064 WARN_UNIMPL;
00065 }
00066
00067 void do_invalidatepage(struct page *page, unsigned long offset)
00068 {
00069 WARN_UNIMPL;
00070 }
00071
00072 int redirty_page_for_writepage(struct writeback_control *wbc, struct page *page)
00073 {
00074 WARN_UNIMPL;
00075 return 0;
00076 }
00077
00078 static struct vfsmount *dde_kern_mount(struct file_system_type *type,
00079 int flags, const char *name,
00080 void *data)
00081 {
00082 struct list_head *pos, *head;
00083 int error;
00084
00085 head = &dde_vfs_mounts;
00086 __list_for_each(pos, head) {
00087 struct vfsmount *mnt = list_entry(pos, struct vfsmount, next);
00088 if (strcmp(name, mnt->name) == 0) {
00089 printk("FS type %s already mounted!?\n", name);
00090 BUG();
00091 return NULL;
00092 }
00093 }
00094
00095 struct vfsmount *m = kzalloc(sizeof(*m), GFP_KERNEL);
00096 m->fs_type = type;
00097 m->name = kmalloc(strlen(name) + 1, GFP_KERNEL);
00098 memcpy(m->name, name, strlen(name) + 1);
00099
00100 error = type->get_sb(type, flags, name, data, m);
00101 BUG_ON(error);
00102
00103 list_add_tail(&m->next, &dde_vfs_mounts);
00104
00105 return m;
00106 }
00107
00108 struct vfsmount *kern_mount_data(struct file_system_type *type, void *data)
00109 {
00110 return dde_kern_mount(type, 0, type->name, NULL);
00111 }