diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-12-17 03:39:29 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:07:28 -0500 |
commit | 50005129ab0a5c5f2422460e6d7c19616e5e1124 (patch) | |
tree | 52136d40aec54f98539c6f684c048112566b0414 /source4/ntvfs/posix/vfs_posix.c | |
parent | cf5cb51bfc7f7c23f366fcb902946d6f4feb2d3b (diff) | |
download | samba-50005129ab0a5c5f2422460e6d7c19616e5e1124.tar.gz samba-50005129ab0a5c5f2422460e6d7c19616e5e1124.tar.bz2 samba-50005129ab0a5c5f2422460e6d7c19616e5e1124.zip |
r4242: added support for storing xattrs in a tdb. This allows all advanced NT
attributes (streams, EAs, NT ACLs, timestamps etc) to be used on
filesystems that don't support xattrs. It also allows for large
streams, although they are very inefficient.
I won't enable this by default, as I really wrote it as a way of
testing large stream support while still using ext3, but perhaps with
a bit more work this could be generally usable.
To enable this use:
posix:eadb = /home/test/myeas.tdb
(This used to be commit 0c927d912cb65754351189d3a0442004a14aa5c6)
Diffstat (limited to 'source4/ntvfs/posix/vfs_posix.c')
-rw-r--r-- | source4/ntvfs/posix/vfs_posix.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c index ff3d3448f2..6f4de1e038 100644 --- a/source4/ntvfs/posix/vfs_posix.c +++ b/source4/ntvfs/posix/vfs_posix.c @@ -35,6 +35,7 @@ static void pvfs_setup_options(struct pvfs_state *pvfs) { int snum = pvfs->tcon->service; int delay; + const char *eadb; if (lp_map_hidden(snum)) pvfs->flags |= PVFS_FLAG_MAP_HIDDEN; if (lp_map_archive(snum)) pvfs->flags |= PVFS_FLAG_MAP_ARCHIVE; @@ -66,6 +67,21 @@ static void pvfs_setup_options(struct pvfs_state *pvfs) FS_ATTR_UNICODE_ON_DISK | FS_ATTR_SPARSE_FILES; + /* allow xattrs to be stored in a external tdb */ + eadb = lp_parm_string(snum, "posix", "eadb"); + if (eadb != NULL) { + pvfs->ea_db = tdb_wrap_open(pvfs, eadb, 50000, + TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + if (pvfs->ea_db != NULL) { + pvfs->flags |= PVFS_FLAG_XATTR_ENABLE; + } else { + DEBUG(0,("Failed to open eadb '%s' - %s\n", + eadb, strerror(errno))); + pvfs->flags &= ~PVFS_FLAG_XATTR_ENABLE; + } + } + + if (pvfs->flags & PVFS_FLAG_XATTR_ENABLE) { pvfs->fs_attribs |= FS_ATTR_NAMED_STREAMS; } |