From owner-freebsd-arch Sun Mar 31 22: 8: 4 2002 Delivered-To: freebsd-arch@freebsd.org Received: from beastie.mckusick.com (beastie.mckusick.com [209.31.233.184]) by hub.freebsd.org (Postfix) with ESMTP id D414C37B400 for ; Sun, 31 Mar 2002 22:07:59 -0800 (PST) Received: from beastie.mckusick.com (localhost [127.0.0.1]) by beastie.mckusick.com (8.11.6/8.11.6) with ESMTP id g31678D07951; Sun, 31 Mar 2002 22:07:08 -0800 (PST) (envelope-from mckusick@beastie.mckusick.com) Message-Id: <200204010607.g31678D07951@beastie.mckusick.com> To: Garance A Drosihn Subject: Re: UFS snapshots in current Cc: arch@FreeBSD.ORG In-Reply-To: Your message of "Sun, 31 Mar 2002 21:12:13 EST." Date: Sun, 31 Mar 2002 22:07:08 -0800 From: Kirk McKusick Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Date: Sun, 31 Mar 2002 21:12:13 -0500 To: Kirk McKusick From: Garance A Drosihn Subject: Re: UFS snapshots in current Cc: arch@FreeBSD.ORG At 2:14 PM -0800 3/31/02, Kirk McKusick wrote: >On your final question about making a pax archive, if you make >an archive of the real filesystem, the snapshot will show up >on the archive as a file the size of the filesystem partition. >If you mount the snapshot and then make an archive of that >filesystem, then the snapshot(s) in the archive will show up >as zero length files. Hmm. Is there any way for a regular user-land process to tell if a given file is a snapshot? Something in the stat() info, or some other way to tell? I have no urgent need for it, but it seems like it would be useful. -- Garance Alistair Drosehn = gad@eclipse.acs.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu You can determine if a file is a snapshot by doing a stat and checking for the SF_SNAPSHOT bit being set in the st_flags field. Kirk McKusick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message