From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sandeen.net ([63.231.237.45]:48812 "EHLO sandeen.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755113AbcDSUsS (ORCPT ); Tue, 19 Apr 2016 16:48:18 -0400 Subject: Re: Can getdents return zero inode numbers? To: Andreas Dilger , Florian Weimer References: <56E301BC.9090405@redhat.com> <14BE767D-13C2-4946-B8C7-042654875E05@dilger.ca> Cc: Linux FS Devel From: Eric Sandeen Message-ID: <57169980.50803@sandeen.net> Date: Tue, 19 Apr 2016 16:48:00 -0400 MIME-Version: 1.0 In-Reply-To: <14BE767D-13C2-4946-B8C7-042654875E05@dilger.ca> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Ss2qJAeGNqFkoQgXBm96Q5paBXrtXhtQk" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Ss2qJAeGNqFkoQgXBm96Q5paBXrtXhtQk Content-Type: multipart/mixed; boundary="H4hL3Pq9oW2csiSdeg8WCnINhKCwQPMv3" From: Eric Sandeen To: Andreas Dilger , Florian Weimer Cc: Linux FS Devel Message-ID: <57169980.50803@sandeen.net> Subject: Re: Can getdents return zero inode numbers? References: <56E301BC.9090405@redhat.com> <14BE767D-13C2-4946-B8C7-042654875E05@dilger.ca> In-Reply-To: <14BE767D-13C2-4946-B8C7-042654875E05@dilger.ca> --H4hL3Pq9oW2csiSdeg8WCnINhKCwQPMv3 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 3/11/16 4:20 PM, Andreas Dilger wrote: > On Mar 11, 2016, at 10:34 AM, Florian Weimer wrote= : >> >> Is it possible that getdents returns a zero inode number for a name >> which actually has a file (or directory, device node etc.) behind it? >=20 > The d_ino =3D=3D 0 value is valid to return and means that the filename= was > unlinked from the directory but the entry was not actually removed. Until recently, didn't the filesystems which use get_next_ino() accept inode 0 as a legit inode number? commit 2adc376c551943a07170cbe70f43e6d6065f8906 Author: Carlos Maiolino Date: Thu Jun 25 12:25:58 2015 -0300 vfs: avoid creation of inode number 0 in get_next_ino -Eric --H4hL3Pq9oW2csiSdeg8WCnINhKCwQPMv3-- --Ss2qJAeGNqFkoQgXBm96Q5paBXrtXhtQk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org iQIcBAEBAgAGBQJXFpmPAAoJECCuFpLhPd7gIfIQAL7wUBB3+SZUi/jNMJ1oUAiO rqpGADiiXZgLhp/k9Rhm5GBIPFHB6A+3Se0iuvGjauG3I2aq9dC5PDYa/PSXotiC QFha37OBp/Gb2q9sQme/C/Oyz/YApho/zZDNNqfOwOWNBth0Qxdf/+qp0UcTE6jR bqUH5S/CzOLLPjjS5XbqcLB8g9nT5MxqM0CpFpU4R9S9e3x4FCqr5+1JO/Xi3Pid eAEC5sVsPks7ihwAKLhoYZ+ytOoj/nslvPOi7tiG/FcI5jz5NQilkg+pV6iZ4Lj3 5WZLio2qhaa8i5/kymdHBti6ep4V6Dzx/XQ0BL4eHus1Wi66ZMqjw1BVac8fAfsL BYX8TjtQjMrzWp8c2XYBL5LnB3AMxmiO0YFp2wHD7Mtt8WPDNvtBJjN069lAC7ho 08V/DDbOaZ8y7OlQKHiN8ovMN1A1SyOmueHX3Ds5lMz5nKttK6fc2LQ033v4i4lI dhpyo4PjhAc4ruVadfxSG5fldl9YEzL6MQ2k6Sx/1uZ2K9whbwuCQvrIucq8vied GAXWG8VRNkf3SiW3cnXdmVUDsbHxcu85gSeszPtfUmuhjtXlHq5YIvY+VgCTLqx+ fmuPhdIo6uu4cMtWHQAKzABsyglAaGMh0I8BXgsa7QLcBKobZoaKttiTwUCXz6zX /SmDdAm6oFBQelyErSl/ =Dm/P -----END PGP SIGNATURE----- --Ss2qJAeGNqFkoQgXBm96Q5paBXrtXhtQk--