linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fusionio.com>
To: "Jérôme Poulin" <jeromepoulin@gmail.com>
Cc: Josef Bacik <JBacik@fusionio.com>,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: Out of memory condition
Date: Fri, 5 Oct 2012 13:43:16 -0400	[thread overview]
Message-ID: <20121005174316.GQ2370@localhost.localdomain> (raw)
In-Reply-To: <CALJXSJrbe62q6XCOf5xB6ra1kwSOnVyL6DvYqS7ncyUQndfkgw@mail.gmail.com>

On Fri, Oct 05, 2012 at 11:20:37AM -0600, Jérôme Poulin wrote:
> I was able to reproduce the problem with the patch, now it fails in
> extens_io.c instead of the compression module.
> 

Yeah so I fixed the compression side, and now it's erroring out further down.
So leave the patch I gave you applied as it is correct, and apply this patch and
see if it helps.  Thanks,

Josef

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index b82d244..8c37cb6 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2751,12 +2751,15 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
 					 end_bio_extent_readpage, mirror_num,
 					 *bio_flags,
 					 this_bio_flag);
-			BUG_ON(ret == -ENOMEM);
-			nr++;
-			*bio_flags = this_bio_flag;
+			if (!ret) {
+				nr++;
+				*bio_flags = this_bio_flag;
+			}
 		}
-		if (ret)
+		if (ret) {
 			SetPageError(page);
+			unlock_extent(tree, cur, cur + iosize - 1);
+		}
 		cur = cur + iosize;
 		pg_offset += iosize;
 	}

  reply	other threads:[~2012-10-05 17:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CALJXSJrtf7wid5xS4H5+E6ws_SjcgjB48ppoU_9+24JSkggKUw@mail.gmail.com>
2012-10-03 14:25 ` Out of memory condition Jérôme Poulin
2012-10-03 20:52   ` Josef Bacik
2012-10-05 17:20     ` Jérôme Poulin
2012-10-05 17:43       ` Josef Bacik [this message]
2012-10-05 20:23         ` Jérôme Poulin
2012-10-05 20:44           ` Josef Bacik
2012-10-09 12:34             ` Jérôme Poulin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121005174316.GQ2370@localhost.localdomain \
    --to=jbacik@fusionio.com \
    --cc=jeromepoulin@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).