xfs
[Top] [All Lists]

Re: [RFC][PATCH] VFS interface for extended attributes

To: Nathan Scott <nathans@xxxxxxx>
Subject: Re: [RFC][PATCH] VFS interface for extended attributes
From: Andreas Dilger <adilger@xxxxxxxxxxxxx>
Date: Wed, 14 Nov 2001 23:01:34 -0700
Cc: Alexander Viro <viro@xxxxxxxxxxxx>, Andi Kleen <ak@xxxxxxx>, Andreas Gruenbacher <ag@xxxxxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-xfs@xxxxxxxxxxx
In-reply-to: <20011115160853.N588010@wobbly.melbourne.sgi.com>; from nathans@sgi.com on Thu, Nov 15, 2001 at 04:08:53PM +1100
Mail-followup-to: Nathan Scott <nathans@xxxxxxx>, Alexander Viro <viro@xxxxxxxxxxxx>, Andi Kleen <ak@xxxxxxx>, Andreas Gruenbacher <ag@xxxxxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-xfs@xxxxxxxxxxx
References: <Pine.LNX.4.21.0111121152410.14344-100000@moses.parsec.at> <Pine.GSO.4.21.0111121207530.21825-100000@weyl.math.psu.edu> <20011113062711.A1912@wotan.suse.de> <20011115160853.N588010@wobbly.melbourne.sgi.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mutt/1.2.4i
On Nov 15, 2001  16:08 +1100, Nathan Scott wrote:
> +     if (ops) {
> +             if (flags & EA_CREATE) {
> +                     if (ops->create)
> +                             error = ops->create(i, name, value, size);
> +             }
> +             else if (flags & EA_REPLACE) {
> +                     if (ops->replace)
> +                             error = ops->replace(i, name, value, size);
> +             }
> +             else if (flags & EA_REMOVE) {
> +                     if (ops->remove)
> +                             error = ops->remove(i, name);
> +             }
> +             else if (ops->set)
> +                     error = ops->set(i, name, value, size);
> +     }

> +     int (*create) (struct inode *, char *, void *, size_t);
> +     int (*replace) (struct inode *, char *, void *, size_t);
> +     int (*set) (struct inode *, char *, void *, size_t);

What is the distinction between "set" and "replace" or "set" and "create"?
Is it analogous to open(,O_CREAT|O_EXCL)?  If so, why are there not just
flags to distinguish the two, but also separate VFS operations?

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/


<Prev in Thread] Current Thread [Next in Thread>