All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Andrey Vagin <avagin@openvz.org>
Cc: linux-ext4@vger.kernel.org,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	linux-next@vger.kernel.org, Glauber Costa <glommer@openvz.org>
Subject: Re: ext4: the list debug reports about corruptions
Date: Sun, 11 Aug 2013 02:03:38 -0400	[thread overview]
Message-ID: <20130811060338.GA19297@thunk.org> (raw)
In-Reply-To: <CANaxB-yikOkwFLtMDJjUyOm6MQPyCr6P+awhp9eZdFL_9vw4ag@mail.gmail.com>

On Thu, Aug 08, 2013 at 01:45:52PM +0400, Andrey Vagin wrote:
> Hello,
> 
> I use akpm branch of linux-next
> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/?h=akpm&id=05abc43724793827835728f4f25ba827e1c54902
> .
> This bug is reproduced, when I do the following sequence of commands:
> 
> mkdir /sys/fs/cgroup/memory/xxx
> echo 1024000000 >  /sys/fs/cgroup/memory/xxx/memory.kmem.limit_in_bytes
> echo $$ > /sys/fs/cgroup/memory/xxx/tasks
> find /proc -name abra-kadabra
> echo $$ > /sys/fs/cgroup/memory/tasks
> rmdir /sys/fs/cgroup/memory/xxx/
> echo 3 > /proc/sys/vm/drop_caches

Thanks for reporting this.  I believe I have this fixed in the updated
dev branch for the ext4 tree.  The relevant fix is additition of the
INIT_LIST_HEAD(&skipped) below.  The rest is just a spelling fix up I
made along the way.

    	       	   	       	   	    	- Ted

diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index 00e6589..0e88a36 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -946,7 +946,7 @@ static int __ext4_es_shrink(struct ext4_sb_info *sbi, int nr_to_scan,
 {
 	struct ext4_inode_info *ei;
 	struct list_head *cur, *tmp;
-	LIST_HEAD(skiped);
+	LIST_HEAD(skipped);
 	int ret, nr_shrunk = 0;
 	int retried = 0, skip_precached = 1, nr_skipped = 0;
 
@@ -972,7 +972,7 @@ retry:
 		    (skip_precached && ext4_test_inode_state(&ei->vfs_inode,
 						EXT4_STATE_EXT_PRECACHED))) {
 			nr_skipped++;
-			list_move_tail(cur, &skiped);
+			list_move_tail(cur, &skipped);
 			continue;
 		}
 
@@ -992,7 +992,8 @@ retry:
 	}
 
 	/* Move the newer inodes into the tail of the LRU list. */
-	list_splice_tail(&skiped, &sbi->s_es_lru);
+	list_splice_tail(&skipped, &sbi->s_es_lru);
+	INIT_LIST_HEAD(&skipped);
 
 	/*
 	 * If we skipped any inodes, and we weren't able to make any

      reply	other threads:[~2013-08-11  6:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-08  9:45 ext4: the list debug reports about corruptions Andrey Vagin
2013-08-11  6:03 ` Theodore Ts'o [this message]

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=20130811060338.GA19297@thunk.org \
    --to=tytso@mit.edu \
    --cc=adilger.kernel@dilger.ca \
    --cc=avagin@openvz.org \
    --cc=glommer@openvz.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-next@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.