From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752951Ab2IFGaz (ORCPT ); Thu, 6 Sep 2012 02:30:55 -0400 Received: from mail-vb0-f46.google.com ([209.85.212.46]:63258 "EHLO mail-vb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751301Ab2IFGax (ORCPT ); Thu, 6 Sep 2012 02:30:53 -0400 MIME-Version: 1.0 In-Reply-To: <87r4qg374w.fsf@devron.myhome.or.jp> References: <1346774312-8142-1-git-send-email-linkinjeon@gmail.com> <87mx15910k.fsf@devron.myhome.or.jp> <87fw6x90o3.fsf@devron.myhome.or.jp> <87r4qg374w.fsf@devron.myhome.or.jp> Date: Thu, 6 Sep 2012 15:30:52 +0900 Message-ID: Subject: Re: [PATCH v2 4/5] fat: eliminate orphaned inode number allocation From: Namjae Jeon To: OGAWA Hirofumi Cc: akpm@linux-foundation.org, bfields@fieldses.org, viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org, Namjae Jeon , Ravishankar N , Amit Sahrawat Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2012/9/5 OGAWA Hirofumi : > Namjae Jeon writes: > >> 2012/9/5, OGAWA Hirofumi : >>> OGAWA Hirofumi writes: >>> >>>> Namjae Jeon writes: >>>> >>>>> From: Namjae Jeon >>>>> >>>>> Maintain a list of inode(i_pos) numbers of orphaned inodes (i.e the >>>>> inodes that have been unlinked but still having open file >>>>> descriptors).At file/directory creation time, skip using such i_pos >>>>> values.Removal of the i_pos from the list is done during inode eviction. >>>> >>>> What happens if the directory (has busy entries) was completely removed? >> Hi OGAWA. >> There are 2 cases: >> 1. The cluster can be used as a data cluster of a file - In which case >> we can write >> normally into it. >> 2. The cluster can be allocated to a new directory. In this case, the busy i_pos >> locations can not be used to create new entries until the correspnding >> inodes are >> evicted. > > In the (2) case, it has problem. Directory must not have de->name[0] == 0 > in middle of entires. "0" means the end of directory. Good point! I will fix it on next version of patches. Thanks. > -- > OGAWA Hirofumi