On  7 Jul, Ian Dowse wrote:
> In message <[EMAIL PROTECTED]>, Don Lewis writes:
>>I was finally finally able to reproduce this by creating a large file
>>before doing the dump.  Dump(8) is *very* hosed.  The UFS2 import broke
>>it's ability to follow multiple levels of indirect blocks.
> Thanks for tracking this down! One thing is that the code was using
> the static pointers to avoid having to malloc and free blocks every
> time. Keeping an array of NIADDR pointers and using `ind_level' as
> the index is an alternative (patch below) - I doubt the performance
> difference is noticable but it avoids having to remember the free()
> before each return.

Prior to the UFS2 import, the code used an automatic array on the stack,
which was even cleaner.  If you want to dynamically size the array and
don't mind a potential portability problem you could use alloca().

The only time you'll take the performance hit is on large files, since
the small ones won't have indirect blocks.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to