svn commit: samba r3056 - in branches/SAMBA_4_0/source/ntvfs: common posix

tridge at samba.org tridge at samba.org
Tue Oct 19 06:39:52 GMT 2004


Author: tridge
Date: 2004-10-19 06:39:51 +0000 (Tue, 19 Oct 2004)
New Revision: 3056

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/ntvfs&rev=3056&nolog=1

Log:
added a id -> pointer data structure (a type of radix tree). This is
an extremely efficient way of mapping from an integer handle (such as
an open file handle) to a pointer (such as the structure containing
the open file information). The code is taken from lib/idr.c in the
2.6 Linux kernel, and is very fast and space efficient. By using
talloc it even has auto cleanup.

This commit converts the handling of open file handles and open
directory search handles to use the idtree routines. In combination
with talloc destructors, this simplifies the structure handling in the
pvfs backend a lot. For example, we no longer need to keep a linked
list of open directory searches at all, and we no longer need to do
linear scans of the list of open files on most operations.

The end result is that the pvfs code is now extremely scalable. You
can have 10s of thousands of open files and open searches and the code
still runs very fast.

I have also added a small optimisation into the file close path, to
avoid looking in the byte range locking database if we know that there
are no locks outstanding.


Added:
   branches/SAMBA_4_0/source/ntvfs/common/idtree.c
Modified:
   branches/SAMBA_4_0/source/ntvfs/posix/config.mk
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_lock.c
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_search.c
   branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c
   branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h


Changeset:
Sorry, the patch is too large (984 lines) to include; please use WebSVN to see it!
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/ntvfs&rev=3056&nolog=1


More information about the samba-cvs mailing list