From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jamie Lokier Subject: Re: [PATCH] ext3 [linux-2.6.2.]: accessing already freed inodes when under memory pressure Date: Fri, 2 Apr 2004 20:17:52 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20040402191752.GB653@mail.shareable.org> References: <1080653969.24117.192.camel@hades.cambridge.redhat.com> <20040402161223.GZ31500@parcelfarce.linux.theplanet.co.uk> <20040402180111.GB31500@parcelfarce.linux.theplanet.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: viro@parcelfarce.linux.theplanet.co.uk, David Woodhouse , Martin Schwidefsky , Andrew Morton , Carsten Otte , Carsten Otte , linux-fsdevel@vger.kernel.org, sct@redhat.com, Dave Kleikamp Return-path: Received: from mail.shareable.org ([81.29.64.88]:5526 "EHLO mail.shareable.org") by vger.kernel.org with ESMTP id S264152AbUDBTSG (ORCPT ); Fri, 2 Apr 2004 14:18:06 -0500 To: Linus Torvalds Content-Disposition: inline In-Reply-To: List-Id: linux-fsdevel.vger.kernel.org Linus Torvalds wrote: > I think that -EXDEV is not only OK, it's _required_. It may be the same > physical filesystem, but it's a different mount and thus a different > filesystem. That reminds me. How is userspace supposed to determine when two names are equivalent on different bind-mounted filesystems? stat() returns the same value in st_dev for both names. The usual strategy for detecting equivalent files is to check st_nlink, and if that's not 1 compare (st_dev, st_ino). It doesn't work for bind mounts, which is a very non-POSIX property. I think the useful thing to do is return a different st_dev value for each bind mount. -- Jamie