Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 43793 invoked from network); 6 Feb 2008 13:56:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Feb 2008 13:56:54 -0000 Received: (qmail 96638 invoked by uid 500); 6 Feb 2008 13:56:39 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 96567 invoked by uid 500); 6 Feb 2008 13:56:39 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 96556 invoked by uid 99); 6 Feb 2008 13:56:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Feb 2008 05:56:39 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of michael@metaparadigm.com designates 203.117.131.43 as permitted sender) Received: from [203.117.131.43] (HELO metamail-vm.metaparadigm.com) (203.117.131.43) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Feb 2008 13:56:06 +0000 Received: from [192.168.133.111] (cm15.gamma103.maxonline.com.sg [202.156.103.15]) (authenticated bits=0) by metamail-vm.metaparadigm.com (8.13.8/8.13.8/Debian-3) with ESMTP id m16Du8Xq004405 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 6 Feb 2008 21:56:10 +0800 Message-ID: <47A9BC74.1090802@metaparadigm.com> Date: Wed, 06 Feb 2008 21:56:04 +0800 From: Michael Clark Organization: Metaparadigm Pte Ltd User-Agent: Mozilla-Thunderbird 2.0.0.9 (X11/20080110) MIME-Version: 1.0 To: dev@httpd.apache.org Subject: [PATCH] mod_dav_fs properties using Extended Attributes Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.92/5711/Wed Feb 6 19:22:58 2008 on metamail-vm X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org 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. http://privsep.org/patches/2.3.0-dev/xattr-patches/httpd-dav-fs-xattrs.patch It requires the proposed patch to APR for Extended Attributes support (implemented for and tested on Mac OS X, Linux, FreeBSD and Solaris). See: http://issues.apache.org/bugzilla/show_bug.cgi?id=44127 http://privsep.org/patches/2.3.0-dev/xattr-patches/apr-xattr-all.patch 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 apache.org:mod_dav_fs: (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) http://privsep.org/patches/2.3.0-dev/xattr-patches/apxattr.c # apxattr -l /opt/apache2.3-davxattrs/uploads/litmus/prop2 apache.org:mod_dav_fs:1:prop5 apache.org:mod_dav_fs:1:prop6 apache.org:mod_dav_fs:1:prop7 apache.org:mod_dav_fs:1:prop8 apache.org:mod_dav_fs:1:prop9 apache.org:mod_dav_fs:METADATA apache.org:mod_dav_fs:1:valnspace apache.org:mod_dav_fs::nonamespace apache.org:mod_dav_fs:1:high-unicode