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

Andreas Dilger (adilger@turbolabs.com)
Wed, 14 Nov 2001 23:01:34 -0700


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/

- 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/