bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ext2fs and large stores (> 1.5G)


From: Neal H. Walfield
Subject: Re: [PATCH] ext2fs and large stores (> 1.5G)
Date: 02 May 2003 21:35:58 -0400
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2

It seems your email client is broken, it does not respect my
Mail-Copies-To header.

> > Can you describe the problem you are having?
> 
> disk_image_bptr vector maps block number to memory address.  When I
> reuse block in the cache I make the new block to map to the same
> address.  The bug was that the old block continued to map to the
> address, thus one memory page is pointed by two disk blocks in
> disk_image_bptr.
> 
> Of course, the solution is to remove the mapping between the old block
> and the memory page.  Unfortunately, some functions can think that
> this block is still in memory and expect valid pointer from boffs_ptr
> but they receive NULL.

Actually, it is worse than this, your locking is quite broken as it
only covers a few of many cases.  Consider: a function can be using a
page and have it taken out from underneath it because use_count is
only used when the block is accessed via disk_image_request (and there
are a lot of places where you use, e.g. bptr directly).  You need to
do reference counting on all blocks and it should be done via
boffs_ptr, bptr_offs et al., not disk_image_*.  Consider,
record_global_poke for just one example.  As far as I can tell,
disk_image_{request,release,clear} serve no purpose that should not be
in the bptr_*, boffs_* family of functions.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]