aboutsummaryrefslogtreecommitdiffstats
path: root/README
blob: 3bd0ba00e474a8d7f4ef20778e0b7bfb5009635e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/************************************************************************
 * This file is updated by the version number, so if you looked at my 
 * last email, then you don't need to check the README version 0.1 part.
 ************************************************************************/



README version 0.2
==================

well, thanks for hpa's pointing, I got the fast symlink check work now. And 
according the last email from hpa, I changed the cache based on block size 
but not sector size. But for some unknow reason, there would be some wrong 
when I do what suggested by hpa about the cache buffer allocation:
     
     "I would suggest allocating the data buffers for the cache 
      at cache_init() time instead of doing malloc() later. "

I debugged it, but nothing found. So I will keep it stay what it orignal was.
When I resolved it, I'll do it.

well, about that, here's my opoinion: I don't think we should do allocate data
at the cache_init(), 'cause, say we have 0x64 buf slots, then we need allocate
0x64K (assume the block size be 1024B) memory; while during the debugging, I
found that there are only three slots used for opening two file under 
boot/extlinux where Syslinux installed. So, we wasted about 0x61K memory.


And for another thing, I am considering create a inode cache. although it's 
not belong that kind of MUST, but even with a small inode cache, It'll be 
more effective. ( well, I'm not sure about this, becasue I find that with
a path, diffrent component has different inode_number, so when opening a little
number of files, it would not be effective. )
So, if i'm wrong, please correct me.


And last, the following comes from the comment of function getfssec():

    "Alought we have made the buffer data based on block size, 
     we use sector for implemention; because reading multiple 
     sectors (then can be multiple blocks) is what the function 
     do. So, let's be based on sectors."
So, I don't changed all the things based on block size, just made cache
based on block size.

and here's the main change of this version:
 1) Make fast symlink can be detected.
 2) Cache buffer data based on block size. (So introduces some others change)
 3) I have totally changed the linsector function.


and here's the thing need to do:
 1) Make the code more C style, means more structured.
 2) Not sure about the buffer data allocation.
 3) Make this code more stable, more solid.
 4) Add EXT4 support.


Well, this is really the last: Sorry to bother and best wishes with you.





README version 0.1
==================

This is the ext2fs driver, it's a user program. And great thanks to stefanb
for the wonderful idea.

I have patched the bin program a.out and the sample ext2 fs image ext2.img,
which is just a floppy image. So you can test it.
here is the dir tree(output from ls * -R):
________________________________________________________________________________
boot:
extlinux

boot/extlinux:
bochsout.txt check.txt  extlinux  extlinux.conf  extlinux.sys  git.book  hdt.c32

boot/extlinux/extlinux:
extlinux.conf  hdt.c32

link:
bochsout.txt  hdt

lost+found:
--------------------------------------------------------------------------------

so you can test it as example:
[xxxx yy]$ ./a.out ext2.img extlinux.conf
it will output the content of file /boot/extlinux/extlinux.conf.
the following command will do the same
[xxxx yy]$ ./a.out ext2.img /boot/extlinux/extlinux.conf


well, it can't handle fast symlink file(because the orignal driver can not 
handle it either, it can detect the fast symlink right). that;s to say the 
following code

        flag = ThisInode.i_file_acl ? 1 : 0;

        if ( ThisInode.i_blocks == flag ) { 
                /* fast symlink */
        } else {
                /* slow symlink */
        }

will do not do the right work. And as I don't know how to detect it either, so
left it where it orignal was.

Any advice or others would be appreciated very much.