lkml.org 
[lkml]   [1997]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Patch to improve fs/ext2/truncate.c


On Sat, 12 Jul 1997, Theodore Y. Ts'o wrote:
>
> Enclosed please find a patch which improves how files are deleted in
> ext2. This patch causes ext2 to *not* zero the data blocks in indirect
> block, doubly indirect blocks, etc. As discussed before, this makes it
> easier to recover from accidentally deleted files, and it also speeds up
> deletions since we don't needlessly write out metadata blocks that we
> don't need to write out.
>
> Also, I've collapsed the swab32 variants back into a the main functions,
> which reduces the kernel size by over 1k, for free.

The "ininode" boolean could probably be removed by just _not_ ever
changing the block numbers in the inode to the CPU byte order: that way
all block numbers (whether they are in the inode or in a indirect block)
would always be in little-endian order. Then it wouldn't need any extra
code at all..

There really isn't any reason to change to a CPU byteorder in the inode,
it doesn't actually win us anything "bmap()" will become infinitesimally
slower on big-endian machines, but that has never been a cycle-critical
function.

I'll apply this patch, but if somebody would try out the above suggestion
and send me patches (relative to this patch), I'd be very interested..

Thanks,

Linus


\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.026 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site