| 1 |
Little README for the mini_fo overlay filesystem. |
|---|
| 2 |
|
|---|
| 3 |
Compiling: |
|---|
| 4 |
|
|---|
| 5 |
The new mini_fo overlay filesystem currently works only for 2.6 |
|---|
| 6 |
kernels, 2.4 is no more supported. |
|---|
| 7 |
|
|---|
| 8 |
Edit the Makefile and adjust the location of the kernel |
|---|
| 9 |
headers. If cross compiling set $CROSS_COMPILE. |
|---|
| 10 |
|
|---|
| 11 |
"make" compiles the module. |
|---|
| 12 |
|
|---|
| 13 |
Using: |
|---|
| 14 |
There are three scripts to do the work (only tqm860l) |
|---|
| 15 |
|
|---|
| 16 |
lmod will do an "insmod -m <module>" what creates the mapfile, |
|---|
| 17 |
which is needed for debugging later. |
|---|
| 18 |
|
|---|
| 19 |
mount_hda will mount two hard disk partitions hda2 and |
|---|
| 20 |
hda3 onto /mnt/base respectively /mnt/storage . |
|---|
| 21 |
|
|---|
| 22 |
load will actually mount the overlay filesystem, using |
|---|
| 23 |
the two hard disk partitions as base and storage |
|---|
| 24 |
filesystems. |
|---|
| 25 |
|
|---|
| 26 |
The do_all script will perform the three steps from |
|---|
| 27 |
above. |
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
The module should work plattform independently with different |
|---|
| 31 |
filesystem types for base and storage. |
|---|
| 32 |
WARNING: Do not export a mounted overlay filesystem via NFS. This |
|---|
| 33 |
will cause unpredictable results. |
|---|
| 34 |
|
|---|
| 35 |
The general mount syntax is: |
|---|
| 36 |
|
|---|
| 37 |
mount -t mini_fo -o dir=<base directory>\ |
|---|
| 38 |
dir2=<storage directory>\ |
|---|
| 39 |
<base directory> <mount directory> |
|---|
| 40 |
|
|---|
| 41 |
You can turn on the debugging messages by passing the option |
|---|
| 42 |
",debug=N" after the dir2 option, where N is the debug level |
|---|
| 43 |
ranging from 1 (little information) to 18 (a lot of |
|---|
| 44 |
information). Check print.c for details. |
|---|
| 45 |
|
|---|
| 46 |
Alternatively the debug level can be set using fist_ioctl: |
|---|
| 47 |
|
|---|
| 48 |
turn off all debugging: fist_ioctl -d <mount dir> 0 |
|---|
| 49 |
turn on all debugging: fist_ioctl -d <mount dir> 18 |
|---|
| 50 |
|
|---|
| 51 |
Its worth mentioning that the debug messages are not always |
|---|
| 52 |
usefull and normally its better to keep them turned off |
|---|
| 53 |
(which is default). |
|---|
| 54 |
|
|---|
| 55 |
|
|---|
| 56 |
Files: |
|---|
| 57 |
|
|---|
| 58 |
The most interesting files concerning the overlay behaviour |
|---|
| 59 |
are: |
|---|
| 60 |
|
|---|
| 61 |
main.c: |
|---|
| 62 |
contains the mini_fo_read_super funtions for reading |
|---|
| 63 |
the superblock, mini_fo_[tri]_interpose for interposing inodes |
|---|
| 64 |
and the parse_options that parses the mount options. |
|---|
| 65 |
|
|---|
| 66 |
file.c: |
|---|
| 67 |
contains the file operations like mini_fo_read, |
|---|
| 68 |
mini_fo_open and mini_fo_readdir. |
|---|
| 69 |
|
|---|
| 70 |
inode.c: |
|---|
| 71 |
contains the inodes operations like the important |
|---|
| 72 |
mini_fo_lookup function called by "ls". |
|---|
| 73 |
|
|---|
| 74 |
dentry.c: |
|---|
| 75 |
The dentry operations. |
|---|
| 76 |
|
|---|
| 77 |
super.c: |
|---|
| 78 |
The super operations. |
|---|
| 79 |
|
|---|
| 80 |
mini_fo: |
|---|
| 81 |
important definitions of structures like the private |
|---|
| 82 |
data structures for mini_fo objects Macros to access them. |
|---|
| 83 |
|
|---|
| 84 |
aux.c: |
|---|
| 85 |
Contains a lot of helper functions used by the overlay fs, like |
|---|
| 86 |
the build_sto_structure function, the wol and ndl - list |
|---|
| 87 |
functions and more. |
|---|
| 88 |
|
|---|
| 89 |
|
|---|
| 90 |
Other information: |
|---|
| 91 |
|
|---|
| 92 |
General Overview of the VFS in |
|---|
| 93 |
Documentation/filesystems/vfs.txt |
|---|
| 94 |
|
|---|
| 95 |
VFS Kernel API: |
|---|
| 96 |
http://kernelnewbies.org/documents/kdoc/kernel-api/vfs.html |
|---|
| 97 |
|
|---|
| 98 |
|
|---|
| 99 |
Copyright (C) 2004 Markus Klotzbuecher <mk@creamnet.de> |
|---|
| 100 |
new implementation by Olivier Evalet <evaleto at programmers.ch> |
|---|
| 101 |
|
|---|
| 102 |
This program is free software; you can redistribute it and/or |
|---|
| 103 |
modify it under the terms of the GNU General Public License |
|---|
| 104 |
as published by the Free Software Foundation; either version |
|---|
| 105 |
2 of the License, or (at your option) any later version. |
|---|