Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 3 Dec 2001 03:51:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 3 Dec 2001 03:49:59 -0500 Received: from rj.SGI.COM ([204.94.215.100]:21984 "EHLO rj.sgi.com") by vger.kernel.org with ESMTP id ; Sun, 2 Dec 2001 19:55:30 -0500 Date: Mon, 3 Dec 2001 11:54:01 +1100 From: Nathan Scott To: Daniel Phillips Cc: Alexander Viro , Andi Kleen , Andreas Gruenbacher , Linus Torvalds , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-xfs@oss.sgi.com Subject: Re: [RFC][PATCH] VFS interface for extended attributes Message-ID: <20011203115400.F39338@wobbly.melbourne.sgi.com> In-Reply-To: <20011114230134.A5739@lynx.no> <20011116101800.A632931@wobbly.melbourne.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from phillips@bonn-fries.net on Mon, Dec 03, 2001 at 01:07:13AM +0100 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org hi Daniel, On Mon, Dec 03, 2001 at 01:07:13AM +0100, Daniel Phillips wrote: > Hi, sorry for jumping into this a little late, but... > No problem. BTW, we have reworked the interfaces once more and will send out the latest revision in the next couple of days - it does away with commands and flags completely, except for this one instance of flags in the set operation... > On November 16, 2001 12:18 am, Nathan Scott wrote: > > > What is the distinction between "set" and "replace" or "set" and "create"? > > > > +#define EA_CREATE 0x0001 /* Set the value: fail if attr already exists */ > > +#define EA_REPLACE 0x0002 /* Set the value: fail if attr does not exist */ > > > > Whereas "set" is simply set the named attribute value, creating the > > attribute if need be, replacing the value if the attribute exists, > > and then return success. > > What is the purpose of these distinctions? Does anyone rely on them? Do such > distinctions exist in an existing implementation? > The purpose is to provide user tools with more control over the creation or updating of an attribute and its value. I don't think the replace flag is very widely used, but I have seen the create flag used in places - eg. the XFS fsr tool uses that flag. The IRIX extended attribute interfaces provide these flags - Andreas has also examined the implementations, man pages, etc, of several other operating systems, so he'll be able to tell us if any others provide this sort of thing too. cheers. -- Nathan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/