Messages in this thread | | | Date | Sat, 26 Jun 1999 15:11:37 +0200 (CEST) | From | Andrea Arcangeli <> | Subject | Re: [patch] pagecache-2.3.9-E8, fixes against pre3-2.3.9 |
| |
On Fri, 25 Jun 1999, Ingo Molnar wrote:
>On Fri, 25 Jun 1999, Andrea Arcangeli wrote: > >> o fix for an fs corrution bug in all 2.3.[89]: even if we write to a >> partial buffer, this doesn't mean that we have all buffers >> in the page uptodate. The below check was bogus: >> >> if (!partial) >> SetPageUptodate(page); > >no, i cant see any bug here. I think you have misunderstood what this >particular logic in block_write_partial_page() does, it's a little bit >reverse logic, maybe thats confusing.
Indeed you are right the stock partial_write code seems fine too.
The whole story is this: When pre-2.3.9-2 gone out the Uptodate thing was buggy if I remeber well (and lilo wasn't working). So at that time I rewrote the partial_write function to also do only one copy_from_user even if we was writing to many buffers and I was doing the bzero (in the case of a new created buffer) only on the part not touched from the copy_from_user() (not on the whole b_data). (I didn't posted the patch because before getting something of working I had to fix also all my pagemap-lru code that now seems finally stable again btw).
Everything worked fine until I merged pre-2.3.9-3. At that point I rejected my partial_write code and I merged the stock partial_write (that looked cleaner, since to do the whole copy_from_user I had to do some ugly trick). But the real problem is been that after merging the plain pre-2.3.9-3 partial_write code, I rebooted and lilo started corrupting the mbr again (or the map file, I don't know) exactly as it was happening to me in pre-2.3.7-2 (before I rewrote partial_write). Then I thought such uptodate-bug wasn't been fixed yet. So I rewrote the "partial/uptodate" logic in the stright way, then I rebooted and lilo returned to work fine (that's why I was so sure the old was buggy). In my previous code I was using one variable with the same name "partial" in a completly different manner (that's probably the reason for which I misunderstood the code and I instant-thought "ah but here the code is plain wrong"). But you are right, thinking twice my changes in partial_write should make no one difference (they aren't wrong but they are doing the same thing). I infact reject them here and everything continue to work properly...
Anyway the other part of the patch is still good and I would like to see it included :).
Andrea Arcangeli
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |