OpenCloudOS-Kernel/fs/exofs
Boaz Harrosh 6d4073e881 exofs: BUG: Avoid sbi realloc
Since the beginning we realloced the sbi structure when a bigger
then one device table was specified. (I know that was really stupid).

Then much later when "register bdi" was added (By Jens) it was
registering the pointer to sbi->bdi before the realloc.

We never saw this problem because up till now the realloc did not
do anything since the device table was small enough to fit in the
original allocation. But once we starting testing with large device
tables (Bigger then 28) we noticed the crash of writeback operating
on a deallocated pointer.

* Avoid the all mess by allocating the device-table as a second array
  and get rid of the variable-sized structure and the rest of this
  mess.
* Take the chance to clean near by structures and comments.
* Add a needed dprint on startup to indicate the loaded layout.
* Also move the bdi registration to the very end because it will
  only fail in a low memory, which will probably fail before hand.
  There are many more likely causes to not load before that. This
  way the error handling is made simpler. (Just doing this would be
  enough to fix the BUG)

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
2011-08-04 12:35:20 -07:00
..
BUGS exofs: Documentation 2009-03-31 19:44:38 +03:00
Kbuild exofs: move osd.c to ios.c 2009-12-10 09:59:21 +02:00
Kconfig exofs: Kbuild, Headers and osd utils 2009-03-31 19:44:20 +03:00
common.h Fix common misspellings 2011-03-31 11:26:23 -03:00
dir.c exofs: Trivial: fix some indentation and debug prints 2011-03-15 15:00:27 +02:00
exofs.h exofs: BUG: Avoid sbi realloc 2011-08-04 12:35:20 -07:00
file.c exofs: Write sbi->s_nextid as part of the Create command 2011-03-15 15:02:51 +02:00
inode.c Merge branch 'for-2.6.39/core' of git://git.kernel.dk/linux-2.6-block 2011-03-24 10:16:26 -07:00
ios.c fs/exofs: typo fix of faild to failed 2010-10-25 18:02:49 +02:00
namei.c exofs: i_nlink races in rename() 2011-03-03 01:28:17 -05:00
super.c exofs: BUG: Avoid sbi realloc 2011-08-04 12:35:20 -07:00
symlink.c exofs: Remove IBM copyrights 2009-06-21 17:53:47 +03:00