From owner-freebsd-arch Sun Mar 31 20:47:23 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by hub.freebsd.org (Postfix) with ESMTP id 9C23237B487; Sun, 31 Mar 2002 20:47:03 -0800 (PST) Received: from [128.113.24.47] (gilead.acs.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.12.1/8.12.1) with ESMTP id g314kcCL471458; Sun, 31 Mar 2002 23:46:39 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: References: Date: Sun, 31 Mar 2002 23:46:44 -0500 To: Robert Watson From: Garance A Drosihn Subject: Re: UFS snapshots in current Cc: Kirk McKusick , arch@FreeBSD.ORG Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.3 (www dot roaringpenguin dot com slash mimedefang) 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 At 9:48 PM -0500 3/31/02, Robert Watson wrote: >On Sun, 31 Mar 2002, Garance A Drosihn wrote: > > > 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? > >Look for the SF_SNAPSHOT flag. I don't recall if this is >exported via the flags field via stat(), but it may well be. It looks like it is. In fact, it looks like we could just change fflagstostr() to check for it, and 'ls -lo' would show 'snap' in the field of interesting flags. This might be a good idea, since a snapshot file is (I assume) truly read-only. (I assume it's like schg, except that you can't even use chflags to make it writable). -- Garance Alistair Drosehn = gad@eclipse.acs.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message