40 lines
1.6 KiB
HTML
40 lines
1.6 KiB
HTML
<!-- X-URL: http://step.polymtl.ca/~ldd/ext2fs/ext2fs_9.html -->
|
|
|
|
<!-- This HTML file has been created by texi2html 1.29
|
|
from ext2fs.texi on 3 August 1994 -->
|
|
|
|
<TITLE>Analysis of the Ext2fs structure - Allocation algorithms</TITLE>
|
|
<P>Go to the <A HREF="ext2fs_8.html">previous</A>, <A HREF="ext2fs_10.html">next</A> section.<P>
|
|
<H1><A NAME="SEC9" HREF="ext2fs_toc.html#SEC9">Allocation algorithms</A></H1>
|
|
<P>
|
|
Here are the allocation algorithms that ext2 file system managers
|
|
<STRONG>must</STRONG> use. We are adamant on this point. Nowadays, many users
|
|
use more than one operating system on the same computer. If more than
|
|
one operating system use the same ext2 partition, they have to use the
|
|
same allocation algorithms. If they do otherwise, what will happen is
|
|
that one file system manager will undo the work of the other file system
|
|
manager. It is useless to have a manager that uses highly efficient
|
|
allocation algorithms if the other one does not bother with allocation
|
|
and uses quick and dirty algorithms.
|
|
<P>
|
|
Here are the rules used to allocate new inodes:
|
|
<P>
|
|
<UL>
|
|
<LI>the inode for a new file is allocated in the same group of the
|
|
inode of its parent directory.
|
|
<P>
|
|
<LI>inodes are allocated equally between groups.
|
|
</UL>
|
|
<P>
|
|
Here are the rules used to allocate new blocks:
|
|
<P>
|
|
<UL>
|
|
<LI>a new block is allocated in the same group as its inode.
|
|
<P>
|
|
<LI>allocate consecutive sequences of blocks.
|
|
</UL>
|
|
<P>
|
|
Of course, it may be sometimes impossible to abide by those rules. In
|
|
this case, the manager may allocate the block or inode anywhere.
|
|
<P>Go to the <A HREF="ext2fs_8.html">previous</A>, <A HREF="ext2fs_10.html">next</A> section.<P>
|