Re: [RFC] Ext3 online defrag

2006-10-27 Thread Eric Sandeen

Alex Tomas wrote:

3) scalable reservation
   required for delayed allocation to avoid -ENOSPC at flush time.
   current version uses per-sb spinlock.


Can you elaborate on this issue?  Shouldn't delayed allocation decrement free 
space immediately, and only the actual block location choice is delayed?  Or is 
this due to potential extra metadata space required as blocks are allocated?


Thanks,

-Eric
-
To unsubscribe from this list: send the line unsubscribe linux-ext4 in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC] Ext3 online defrag

2006-10-27 Thread Alex Tomas
 Eric Sandeen (ES) writes:

 ES Alex Tomas wrote:
  3) scalable reservation
  required for delayed allocation to avoid -ENOSPC at flush time.
  current version uses per-sb spinlock.

 ES Can you elaborate on this issue?  Shouldn't delayed allocation
 ES decrement free space immediately, and only the actual block location
 ES choice is delayed?  Or is this due to potential extra metadata space
 ES required as blocks are allocated?

exactly. in this case, reservation has nothing to do with allocation
or preallocation of real blocks. this is just a *per-sb counter* of
blocks reserved for allocation at flush time. it includes all
non-allocated-yet blocks and metadata needed to allocate them (bitmaps,
group descriptors, blocks extent tree, etc). the previous version
of mballoc has reservation, but it doesn't scale very well being
a single global counter protected by the spinlock. at least, in many
regular loads I observed the reservation function in top30 of oprofile.



thanks, Alex
-
To unsubscribe from this list: send the line unsubscribe linux-ext4 in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


EXT3 fuzzing

2006-10-27 Thread Eric Sesterhenn / Snakebyte
hi,

after fsfuzz
(http://www.securityfocus.com/archive/1/449568/30/0/threaded) was
released i decided to give it a spin. So far I got two problematic
images:

http://www.cobra-basket.de/ext3_ls_prozzy_hog.img.bz2
which makes the kernel use as much cpu as it can get

http://www.cobra-basket.de/ext3_memhog.img.bz2
eats all memory it can get

I enabled jbd debugging for a while, and the traces looked
similar, but made not much sense to me. kmemleak
locked my box, so I was not able to get some debugging
info from there.
To test the images, just mount them, and do an ls
on the image.

Greetings, Eric

-- 
 www.cobra-basket.de -- just my stuff
-
To unsubscribe from this list: send the line unsubscribe linux-ext4 in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: EXT3 fuzzing

2006-10-27 Thread Eric Sandeen
Eric Sandeen wrote:
 Eric Sesterhenn / Snakebyte wrote:
 hi,

 after fsfuzz
 (http://www.securityfocus.com/archive/1/449568/30/0/threaded) was
 released i decided to give it a spin. So far I got two problematic
 images:

 http://www.cobra-basket.de/ext3_ls_prozzy_hog.img.bz2
  which makes the kernel use as much cpu as it can get

 http://www.cobra-basket.de/ext3_memhog.img.bz2
  eats all memory it can get

Works for me w/ that patch:

[EMAIL PROTECTED] ~]# mount -o loop ext3_ls_prozzy_hog.img mnt/
[EMAIL PROTECTED] ~]# ls mnt/
[EMAIL PROTECTED] ~]# dmesg | tail -n 6
EXT3-fs: mounted filesystem with ordered data mode.
EXT3-fs error (device loop0): htree_dirblock_to_tree: bad entry in
directory #2: rec_len % 4 != 0 - offset=24, inode=11, rec_len=989,
name_len=10
Aborting journal on device loop0.
ext3_abort called.
EXT3-fs error (device loop0): ext3_journal_start_sb: Detected aborted
journal
Remounting filesystem read-only


[EMAIL PROTECTED] ~]# mount -o loop ext3_memhog.img mnt/
[EMAIL PROTECTED] ~]# ls mnt
[EMAIL PROTECTED] ~]# dmesg | tail -n 6
EXT3-fs: mounted filesystem with ordered data mode.
EXT3-fs error (device loop0): htree_dirblock_to_tree: bad entry in
directory #2: rec_len is smaller than minimal - offset=0, inode=75,
rec_len=0, name_len=0
Aborting journal on device loop0.
ext3_abort called.
EXT3-fs error (device loop0): ext3_journal_start_sb: Detected aborted
journal
Remounting filesystem read-only

-Eric
-
To unsubscribe from this list: send the line unsubscribe linux-ext4 in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html