httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Clark <>
Subject [PATCH] mod_dav_fs properties using Extended Attributes
Date Wed, 06 Feb 2008 13:56:04 GMT
Hi Folks,

I've been doing some work on Extended Attributes support for APR and
thought now is the time to get feedback on a potential user of the
proposed API.

The following patch adds an option to mod_dav_fs to store properties in
file system extended attributes and removes the requirement for .DAV
metadata directories and the dbm database per file with properties.

It requires the proposed patch to APR for Extended Attributes support
(implemented for and tested on Mac OS X, Linux, FreeBSD and Solaris).

Note: This code is at the experimental/test stage (there are no litmus
regressions and works with simple tests - not put in production yet).

The patch adds a new global resource conf directive DAVPropDBType
(Allowed values are "sdbm" (default) or "xattr"). e.g.

   # Enabled mod_dav_fs extended attributes
   DAVPropDBType "xattr"

The patch does not change the default behaviour of mod_dav_fs (sdbm is
is the default - extended attribute support must be explicitly enabled).

modules/dav/fs/dbm.c is split into 2 files by the patch:
   props.c - props provider and namespace handling from dbm.c
   dbm.c - contains the db specific functions from dbm.c

No changes are made to dbm.c functions other than adding a function
dispatch structure to call either the existing dbm wrapper routines
or the new xattr routines. The dispatch is switched globally by the
config directive.

* Passes all litmus properties tests (more testing required).
* Creates attributes with the same namespace storage mapping and meta-
   data as the SDBM properties (not sure if this is the best approach).
* Extended attribute properties are prefixed with
   (this is so we do not clash with existing extended attributes).
* It may be desirable later to add directives to map certain
   namespaces+key combinations to non-prefixed extended attributes
   to allow outside applications easier access to the extended attributes
   set by mod_dav_fs.
* Example Extended Attributes set during litmus run (with apxattr util)

# apxattr -l /opt/apache2.3-davxattrs/uploads/litmus/prop2

View raw message