From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 24 02:01:18 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2F5A216A4BF for ; Sun, 24 Aug 2003 02:01:18 -0700 (PDT) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 69A4643F85 for ; Sun, 24 Aug 2003 02:01:17 -0700 (PDT) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id 43E153ABB3F; Sun, 24 Aug 2003 11:02:23 +0200 (CEST) Date: Sun, 24 Aug 2003 11:02:23 +0200 From: Pawel Jakub Dawidek To: Tim Kientzle Message-ID: <20030824090223.GW47959@garage.freebsd.pl> References: <3F4828F5.8090207@acm.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="KRJ4yArSHF8vY7I3" Content-Disposition: inline In-Reply-To: <3F4828F5.8090207@acm.org> X-PGP-Key-URL: http://garage.freebsd.pl/jules.asc X-OS: FreeBSD 4.8-RELEASE-p3 i386 X-URL: http://garage.freebsd.pl User-Agent: Mutt/1.5.1i cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Inode Operations X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Aug 2003 09:01:18 -0000 --KRJ4yArSHF8vY7I3 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 23, 2003 at 07:54:45PM -0700, Tim Kientzle wrote: +> I'm working on some archiving programs and need to (for various +> reasons) keep track of a very large number of files so that I +> can revisit them at the end of the operation. For example, +> on extract, I need to set directory access times and permissions +> after the complete extract is finished, which requires me to +> record every created directory. (No, there is no way around +> this short of re-scanning the entire archive a second +> time, which is impractical at best.) +>=20 +> Right now, I'm storing the full pathname of each such +> file, but that is taking up a lot of memory, so I'm looking +> for a more compact approach. It occurred to me that +> the device number/inode (as returned by stat(2)) is another +> way to uniquely identify a file. As it turns out, I need to +> stat() everything anyway, so collecting such identifiers is easy. +> But, I can't find any system calls that actually use this information. +>=20 +> Question: Are there any system calls that allow you to +> access/modify a file based only on the device number/inode number? Check getfh(2)/fhopen(2) syscall if you are root. --=20 Pawel Jakub Dawidek pawel@dawidek.net UNIX Systems Programmer/Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am! http://cerber.sourceforge.net --KRJ4yArSHF8vY7I3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBP0h/Hz/PhmMH/Mf1AQG4pQQAnaruTo/0GKFzrwkpS4PiaQwl9dHPLTSM YHcoqqPxhyVJ5PydPi5neERV1z8Ldpng2vYQc4Zn/zzWye089TN86cpMreB/06xG +E7XldE6DiXwSSjIxbRVWUxEVtc391R4mWmVcfnJhfeFRCzYp5x2fp+ddfkBIuyt tgOlaFEuPGA= =JSDM -----END PGP SIGNATURE----- --KRJ4yArSHF8vY7I3--