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

Re: [PATCH] XFS OOM hardening



On Tue, Aug 14, 2001 at 05:21:38PM -0500, Steve Lord wrote:
> 
> Thanks Andi, I know you have sent most of this before, things are a just
> a 'leetle bit' hectic around here right now, so things are taking longer
> than they otherwise would. The problem with the code which does some
> xfs memory allocation failure detection is that you can never get to
> all of them, this is why I have never checked in the stuff about
> seeing a NULL and doing an error return. There are also places in xfs
> where failure is not an option - once a transaction has dirtied
> metadata there is no turning back. So really the only option which will
> fly long term is making sure memory allocations do not return failure
> when they get back up to xfs proper. I do have some other ideas it is
> just a matter of finding the time.

In case you really want to defer this patch for some me hypothetic better
solution I would suggest at least applying the pagebuf errno fixes, as 
they are independent. Here are they extracted again.

-Andi


--- linux-xfs/fs/pagebuf/page_buf.c-XFSMEM	Tue Aug 14 01:12:43 2001
+++ linux-xfs/fs/pagebuf/page_buf.c	Tue Aug 14 20:43:57 2001
@@ -1200,7 +1202,7 @@
 	page = bh->b_page;
 	if (!test_bit(BH_Uptodate, &bh->b_state)) {
 		set_bit(PG_error, &page->flags);
-		pb->pb_error = -EIO;
+		pb->pb_error = EIO;
 	}
 
 	unlock_buffer(bh);
@@ -1221,7 +1223,7 @@
 	page = bh->b_page;
 	if (!test_bit(BH_Uptodate, &bh->b_state)) {
 		set_bit(PG_error, &page->flags);
-		pb->pb_error = -EIO;
+		pb->pb_error = EIO;
 	}
 
 	unlock_buffer(bh);
@@ -1244,7 +1246,7 @@
 	page = bh->b_page;
 	if (!test_bit(BH_Uptodate, &bh->b_state)) {
 		set_bit(PG_error, &page->flags);
-		pb->pb_error = -EIO;
+		pb->pb_error = EIO;
 	}
 
 	unlock_buffer(bh);