Re: [PATCH, RFC/T] Fix handling of write failures to swap devices

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

 



On Fri, 2006-10-27 at 18:22 +1000, Nick Piggin wrote:
> Richard Purdie wrote:
> > Comments and testing from people who know this area of code better than
> > me would be appreciated!
> 
> This is the right approach to handling swap write errors. However, you need
> to cut down on the amount of code duplication. 

The code is subtly different to the swapoff code but I'll take another
look and see if I can refactor it now I have it all working.

> Also, if you hit that BUG_ON, then you probably have a bug, don't
> remove it!

I gave that a lot of thought. We are in a write handler and have to
handle the write error from there so the page will be marked as
writeback. That function appears to be safe to call with that set
through the new code path I added (which wouldn't have happened in the
past). I therefore decided it was safe and the simplest solution was to
remove the BUG_ON. If anyone can see a problem with a page being in
writeback in that function, please enlighten me though!

Cheers,

Richard

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux