Skip to contentSkip to conversation

delayed disk block allocation

PATCH Etienne Lorrain 3 participants 3 messages Mar 7, 2002

lore
Share & tools
lore
#0 lore raw
Quoted 3 lines

With "allocate on flush", (aka delayed allocation), file data is assigned a disk mapping when the data is being written out, rather than at write(2) time. This has the following advantages:

I do agree that this is a better solution than current one,
but (even if I did not had time to test the patch), I have a question: How about bootloaders?

IHMO all current bootloaders need to write to disk a "chain" of sector to load for their own initialisation, i.e. loading the remainning part of code stored on a file in one filesystem from the 512 bytes bootcode. This "chain" of sector can only be known once the file has been allocated to disk - and it has to be written on the same file, at its allocated space.

So can you upgrade LILO or GRUB with your patch installed? It is not a so big problem (the solution being to install the
bootloader on an unmounted filesystem with tools like e2fsprogs), but it seems incompatible with the current executables.

Comment?
Etienne.

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com

#1 lore raw
Quoted 15 lines · Etienne Lorrain
Quoted 3 lines

With "allocate on flush", (aka delayed allocation), file data is assigned a disk mapping when the data is being written out, rather than at write(2) time. This has the following advantages:

I do agree that this is a better solution than current one,
but (even if I did not had time to test the patch), I have a question: How about bootloaders?

IHMO all current bootloaders need to write to disk a "chain" of sector to load for their own initialisation, i.e. loading the remainning part of code stored on a file in one filesystem from the 512 bytes bootcode. This "chain" of sector can only be known once the file has been allocated to disk - and it has to be written on the same file, at its allocated space.

Quoted 4 lines

So can you upgrade LILO or GRUB with your patch installed? It is not a so big problem (the solution being to install the
bootloader on an unmounted filesystem with tools like e2fsprogs), but it seems incompatible with the current executables.

The interface used by lilo to read the kernel location needs to flush data out to disk before returning results. It's not too hard to do.

Steve

#2 lore raw
In reply to Etienne Lorrain
Quoted 16 lines · Steve Lord
Quoted 15 lines · Etienne Lorrain
Quoted 3 lines

With "allocate on flush", (aka delayed allocation), file data is assigned a disk mapping when the data is being written out, rather than at write(2) time. This has the following advantages:

I do agree that this is a better solution than current one,
but (even if I did not had time to test the patch), I have a question: How about bootloaders?

IHMO all current bootloaders need to write to disk a "chain" of sector to load for their own initialisation, i.e. loading the remainning part of code stored on a file in one filesystem from the 512 bytes bootcode. This "chain" of sector can only be known once the file has been allocated to disk - and it has to be written on the same file, at its allocated space.

Quoted 8 lines
Quoted 4 lines

So can you upgrade LILO or GRUB with your patch installed? It is not a so big problem (the solution being to install the
bootloader on an unmounted filesystem with tools like e2fsprogs), but it seems incompatible with the current executables.

The interface used by lilo to read the kernel location needs to flush data out to disk before returning results. It's not too hard to do.

Also, GRUB shouldn't have this problem since it reads the filesystems directly on boot.