Project

General

Profile

Feature #5917

User-mode SMB server

Added by Gordon Ross almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2015-05-11
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

Development of the SMB server kernel code can be accelerated
significantly by allowing the code to run in user space, where one
can use not only the usual dtrace and mdb tools, but also full
source-level debugging etc.

This work was developed at Nexenta in preparation for major work
in the SMB server to add SMB2 support and other modernization.
Architecturally, there are just three major parts of this work:

libfakekernel: This is an API "shim" simulating the interfaces
provided by the kernel, including mutexes, synchronization
objects, task queues, kernel sockets, etc. The implementaion
is based on code found in libzpool, but attemps to be a little
more generic. (We did not try to replace similar code in
libzpool, leaving that to a future project.)

libfksmbsrv: This is a big library containing all the SMB server
code built as a shared library. It depends on libfakekernel,
but not much else. There are some more kernel "shims" in
this library for VFS simulation that we felt were not general
enough to deserve to live in libfakekernel.

system header: We were faced with a choice between coping
many, many system headers into the new libraraies, or just
adding compatibility features to the existing ones. We chose
modifying the existing ones in hopes that would reduce the
likelihood that such copies might get out-of-sync with the
real headers. We found many places where there are
structure definitions and/or functions prototypes that we
needed to expose to one of the new libraries, but which
were hidden by an #ifdef _KERNEL section. For these
we added a new condition #ifdef _FAKE_KERNEL, and
used that to expose additional definitions for this special
compilation environment.

#1

Updated by Gordon Ross almost 6 years ago

  • Description updated (diff)
#2

Updated by Electric Monk almost 6 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit b819cea2f73f98c5662230cc9affc8cc84f77fcf

commit  b819cea2f73f98c5662230cc9affc8cc84f77fcf
Author: Gordon Ross <gwr@nexenta.com>
Date:   2015-06-04T20:46:25.000Z

    5917 User-mode SMB server
    Authored by: Thomas Keiser <thomas.keiser@nexenta.com>
    Authored by: Albert Lee <trisk@nexenta.com>
    Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
    Reviewed by: Richard Lowe <richlowe@richlowe.net>
    Reviewed by: Albert Lee <trisk@omniti.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Also available in: Atom PDF