From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Blunck" Subject: Re: Possible bug in ext3 filesystem Date: Thu, 4 Jan 2007 22:39:13 +0100 Message-ID: <4de7f8a60701041339g24bc2cf9ub55b0d5e64eda22b@mail.gmail.com> References: <6B225A8E1148A14688736567B978603001A6CB9B@lin0017.roseninspection.net> <1167939495.15090.30.camel@kleikamp.austin.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Jens Nie" , linux-fsdevel@vger.kernel.org Return-path: Received: from an-out-0708.google.com ([209.85.132.248]:27584 "EHLO an-out-0708.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965098AbXADVjP (ORCPT ); Thu, 4 Jan 2007 16:39:15 -0500 Received: by an-out-0708.google.com with SMTP id b33so281635ana for ; Thu, 04 Jan 2007 13:39:14 -0800 (PST) To: "Dave Kleikamp" In-Reply-To: <1167939495.15090.30.camel@kleikamp.austin.ibm.com> Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On 1/4/07, Dave Kleikamp wrote: > On Thu, 2007-01-04 at 12:34 +0100, Jens Nie wrote: > > I think i found a bug in the ext3 filesystem. It deals with > > dereferencing symlinks. I have installed a fresh openSUSE 10.2 on an > > ext3 filesystem. No, it seems to be a bug in the coreutils. > I did a little playing around with strace and I suspect that it may have > something to do with ext3 returning DT_LNK to the filldir routine (which > gets returned through getdents64). A lot of file systems always return > DT_UNKNOWN. Maybe ls is handling the DT_UNKNOWN case alright, but not > the DT_LNK case. (When DT_UNKNOWN is returned, ls calls stat64() which > would identify the symlink as a directory rather than a symlink.) I guess your analysis is right. The problem is that ls only calls stat() on DT_UNKNOWN entries but it should call it on DT_LNK too. > > I reported this on the opensuse mailing list first. Someone there was > > kind enough to point me directly to this list. They forgot to tell you that not every bug is a kernel bug ;) I opened a bug in bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=231916