lkml.org 
[lkml]   [1997]   [Jul]   [13]   [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:
>
> 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..
>
> Agreed. It would also mean that we don't needly byte swap block numbers
> when the inode is only being read-in to satisfy a stat call. It's
> probably also worthwhile to not byte swap the other internal
> ext2-specific inode fields (especially since a number of them aren't
> currently being used anyway).

Looking at the code, I found another amusing cause to _not_ do the byte
swap when reading in the inode: short symbolic links. Right now they are a
very strange special case indeed ;)

Somebody? I agree with Ted that the person should probably have access to
both a big-endian and a little-endian machine to make sure it all works
correctly, but it actually looks fairly trivial (you can just grep for
i_data to see where the block numbers are being used).

Linus


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