From mboxrd@z Thu Jan 1 00:00:00 1970 From: OGAWA Hirofumi Subject: Re: The bug of iput() removal from flusher thread? Date: Mon, 19 Nov 2012 17:56:22 +0900 Message-ID: <873906vumh.fsf@devron.myhome.or.jp> References: <8762541uyx.fsf@devron.myhome.or.jp> Mime-Version: 1.0 Content-Type: text/plain Cc: Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Al Viro Return-path: Received: from mail.parknet.co.jp ([210.171.160.6]:33193 "EHLO mail.parknet.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753065Ab2KSI4c (ORCPT ); Mon, 19 Nov 2012 03:56:32 -0500 In-Reply-To: <8762541uyx.fsf@devron.myhome.or.jp> (OGAWA Hirofumi's message of "Sat, 17 Nov 2012 17:42:30 +0900") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: OGAWA Hirofumi writes: > Hi, > > In 169ebd90131b2ffca74bb2dbe7eeacd39fb83714 commit, writeback doesn't > __iget()/iput() anymore. > > This means nobody moves the inode to lru list. I.e. > > new_inode() > dirty_inode() > iput_final() > /* keep inode without adding lru */ > flush indoes > /* clean inode is not on lru */ > > I noticed this situation in my FS though, I think the same bug is on all > FSes of linus tree too, after this commit. > > Am I missing the something? This seems to be reproducible by the following, #!/bin/sh for i in $(seq -w 1000); do for j in $(seq -w 1000); do for k in $(seq -w 1000); do mkdir -p $i/$j echo $i/$j/$k > $i/$j/$k echo 2 > /proc/sys/vm/drop_caches done done done Some inodes never be reclaimed, and ls -l frees those inodes (stat(2) does iget/iput). -- OGAWA Hirofumi