All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Schmidt <list.btrfs@jan-o-sch.net>
To: unlisted-recipients:; (no To-header on input)
Cc: chris.mason@oracle.com, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: fix extent state leak on failed nodatasum reads
Date: Thu, 09 Jun 2011 18:16:06 +0200	[thread overview]
Message-ID: <4DF0F1C6.7040800@jan-o-sch.net> (raw)
In-Reply-To: <1304518730-13909-1-git-send-email-list.btrfs@jan-o-sch.net>

Hi Chris,

On 04.05.2011 16:18, Jan Schmidt wrote:
> When encountering an EIO while reading from a nodatasum extent, we
> insert an error record into the inode's failure tree.
> btrfs_readpage_end_io_hook returns early for nodatasum inodes. We'd
> better clear the failure tree in that case, otherwise the kernel
> complains about
> 
> 	BUG extent_state: Objects remaining on kmem_cache_close()
> 
> on rmmod.
> 
> Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
> ---
>  fs/btrfs/inode.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
> index 870869a..9444551 100644
> --- a/fs/btrfs/inode.c
> +++ b/fs/btrfs/inode.c
> @@ -1970,7 +1970,7 @@ static int btrfs_readpage_end_io_hook(struct page *page, u64 start, u64 end,
>  	}
>  
>  	if (BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM)
> -		return 0;
> +		goto good;
>  
>  	if (root->root_key.objectid == BTRFS_DATA_RELOC_TREE_OBJECTID &&
>  	    test_range_bit(io_tree, start, end, EXTENT_NODATASUM, 1, NULL)) {

was there a specific reason for not pulling this one in? I find it neat,
straight forward and quite to the point ;-)

Just ran into that bug again and had to trace it down once more after I
rebased my upcoming patches to the for-linus branch... (Hey, it's been a
month!)

-Jan

  reply	other threads:[~2011-06-09 16:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-04 14:18 [PATCH] Btrfs: fix extent state leak on failed nodatasum reads Jan Schmidt
2011-06-09 16:16 ` Jan Schmidt [this message]
2011-06-09 16:27   ` Chris Mason

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=4DF0F1C6.7040800@jan-o-sch.net \
    --to=list.btrfs@jan-o-sch.net \
    --cc=chris.mason@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.