From owner-freebsd-bugs@FreeBSD.ORG Mon Dec 4 09:37:42 2006 Return-Path: X-Original-To: freebsd-bugs@freebsd.org Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1627316A583 for ; Mon, 4 Dec 2006 09:37:42 +0000 (UTC) (envelope-from r.c.ladan@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E26443CA3 for ; Mon, 4 Dec 2006 09:37:08 +0000 (GMT) (envelope-from r.c.ladan@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so2623129uge for ; Mon, 04 Dec 2006 01:37:39 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; b=J9OogCFrOW5YCGst38AZJxJKjMpQdEcJl2qeFOpc3V8JATKRIX4xcPEMK3GLYligohZ5rFZSgdUlOCNIWEZ21qMQ8hB3b4CalBvXtQY1GIQXmIo4CAvUOnY3jSwErTj5r3NJEYyiRLs9ee9koGL+hNWv5rZhNRQHZexDgO1324o= Received: by 10.67.117.2 with SMTP id u2mr11632776ugm.1165225059206; Mon, 04 Dec 2006 01:37:39 -0800 (PST) Received: from ?192.168.123.106? ( [195.241.221.201]) by mx.google.com with ESMTP id x26sm9903059ugc.2006.12.04.01.37.38; Mon, 04 Dec 2006 01:37:38 -0800 (PST) Message-ID: <4573EC61.2000304@gmail.com> Date: Mon, 04 Dec 2006 10:37:37 +0100 From: Rene Ladan User-Agent: Thunderbird 1.5.0.8 (X11/20061117) MIME-Version: 1.0 To: Bruce Evans References: <200612031104.kB3B4jcS098474@www.freebsd.org> <20061204110256.V24317@delplex.bde.org> In-Reply-To: <20061204110256.V24317@delplex.bde.org> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-bugs@FreeBSD.org, freebsd-gnats-submit@FreeBSD.org Subject: Re: kern/106255: [msdosfs] : correct setting of archive flag X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2006 09:37:42 -0000 Bruce Evans schreef: > On Sun, 3 Dec 2006, Rene Ladan wrote: > >>> Description: >> The MSDOS file system has an archive bit in the flags field. This bit >> roughly corresponds to the archive flag on the UFS file system. >> However, it is set the wrong way around: the flag should be set when >> the bit is present, and cleared when the bit is absent. > > The comment in msdosfs/direntry.h says that ATTR_ARCHIVE means that > the file is new or modified (in other words, not archived), while the > comment in sys/stat.h says that SF_ARCHIVED means that the file is > archived, but I think both mean that it is archived. > Indeed, the MSDOS archive bit means that the user should archive the file. >> --- msdosfs_vnops.c Mon Nov 6 14:41:57 2006 >> +++ msdosfs_vnops.c.rene Sun Dec 3 11:58:47 2006 >> @@ -352,7 +352,7 @@ >> vap->va_ctime = vap->va_mtime; >> } >> vap->va_flags = 0; >> - if ((dep->de_Attributes & ATTR_ARCHIVE) == 0) >> + if (dep->de_Attributes & ATTR_ARCHIVE) >> vap->va_flags |= SF_ARCHIVED; >> vap->va_gen = 0; >> vap->va_blocksize = pmp->pm_bpcluster; > > This only fixes the reporting of the flag. msdosfs still maintains > the flag perfectly backwards (except DETIMES() is missing setting of > it for for all changes -- I think all changes to metadata except > possibly to atimes should set it to be perfectly backwards and clear > it to be correct). > Thanks, I'll look into that. > Grep shows that this flag is negatively useful in FreeBSD. No file > systems maintain it (except for getting it backwards in msdosfs). > All archiving utilities need to maintain it for it to be useful, > but none except tar even reference it (except possibly indirectly via > strtofflags(3)), and tar seems to just print it (indirectly via a > special version of strtofflags(3)). > That's up to the utilities. > Bruce > Regards, Rene -- GPG fingerprint = E738 5471 D185 7013 0EE0 4FC8 3C1D 6F83 12E1 84F6 (subkeys.pgp.net) "It won't fit on the line." -- me, 2001