Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 14 Jul 2001 01:58:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 14 Jul 2001 01:58:29 -0400 Received: from leibniz.math.psu.edu ([146.186.130.2]:65014 "EHLO math.psu.edu") by vger.kernel.org with ESMTP id ; Sat, 14 Jul 2001 01:58:14 -0400 Date: Sat, 14 Jul 2001 01:58:15 -0400 (EDT) From: Alexander Viro To: Kai Henningsen cc: linux-kernel@vger.kernel.org Subject: Re: Question about ext2 In-Reply-To: <84l4sXb1w-B@khms.westfalen.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On 13 Jul 2001, Kai Henningsen wrote: > viro@math.psu.edu (Alexander Viro) wrote on 13.07.01 in : > > > The only really obscure part is dropping an extra reference if victim is > > a directory - then we know that we are cannibalizing the last external > > link to it and the only link that remains is victim's ".". We don't want > > it to prevent victim's removal, so we drive i_nlink of victim to zero. > > Does this stuff work right with those cases which do linkcount=1 either > because the fs doesn't have a link count, or because the real link count > has grown too large? It doesn't. If fs doesn't have link count you are very likely to need other ways to deal with rename() anyway (e.g. you are pretty likely to have part of metadata stored in directory entry). If you are playing with "set i_nlink to 1 if it's too large" (which works only for directories, BTW) - change according to your encoding scheme for link count. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/