--- /dev/null
+TARGET_BASE_NAME := $(shell cat BASENAME)
+
+TARGET_PRESENTATION = $(TARGET_BASE_NAME)-presentation
+TARGET_HANDOUT = $(TARGET_BASE_NAME)-handout
+TARGET_HANDOUT2 = $(TARGET_BASE_NAME)-handout2
+TARGET_PAPER = $(TARGET_BASE_NAME)-paper
+TARGET_BASE = $(TARGET_BASE_NAME)-base
+
+TARGET = $(TARGET_BASE_NAME)
+
+DIAIMAGES = design-ctdb-three-nodes.dia ctdb-design-daemons.dia samba-layers.dia
+
+DIAIMAGES_PNG = design-ctdb-three-nodes.png ctdb-design-daemons.png samba-layers.png
+
+DIAIMAGES_FIG = design-ctdb-three-nodes.fig ctdb-design-daemons.fig samba-layers.fig
+
+DIAIMAGES_SVG = design-ctdb-three-nodes.svg ctdb-design-daemons.svg samba-layers.svg
+
+#IMAGES = $(DIAIMAGES_PNG) \
+# regedit.png \
+# ctdb-status.png \
+# ctdb-status-1.png \
+# ctdb-ip.png \
+# ctdb-ip-1.png \
+# smbstatus.png
+
+IMAGES = $(DIAIMAGES_PNG)
+
+COMMON_DEPS = base-wiki.tex base.tex $(IMAGE)
+
+.SUFFIXES: .tex .pdf .dia .png .fig .svg .wiki
+
+.PHONY: all
+
+all: $(TARGET_PRESENTATION) $(TARGET_HANDOUT) $(TARGET_HANDOUT2)
+
+.PHONY: presentation paper handout handout2
+
+presentation: $(TARGET_PRESENTATION)
+
+paper: $(TARGET_PAPER)
+
+handout: $(TARGET_HANDOUT)
+
+handout2: $(TARGET_HANDOUT2)
+
+.PHONY: $(TARGET_PAPER) $(TARGET_PRESENTATION) $(TARGET_HANDOUT) $(TARGET_HANDOUT2)
+
+
+$(TARGET_PRESENTATION): $(TARGET_PRESENTATION).pdf
+
+$(TARGET_PRESENTATION).pdf: $(IMAGES) presentation.pdf
+ cp presentation.pdf $@
+
+presentation.pdf: presentation.tex $(COMMON_DEPS)
+
+
+$(TARGET_PAPER): $(TARGET_PAPER).pdf
+
+$(TARGET_PAPER).pdf: paper.pdf
+ cp paper.pdf $@
+
+paper.pdf: paper.tex $(COMMON_DEPS)
+
+
+$(TARGET_HANDOUT): $(IMAGES) $(TARGET_HANDOUT).pdf
+
+$(TARGET_HANDOUT).pdf: handout.pdf
+ cp handout.pdf $@
+
+handout.pdf: handout.tex $(COMMON_DEPS)
+
+
+$(TARGET_HANDOUT2): $(TARGET_HANDOUT2).pdf
+
+$(TARGET_HANDOUT2).pdf: $(IMAGES) handout2.pdf
+ cp handout2.pdf $@
+
+handout2.pdf: handout2.tex $(COMMON_DEPS)
+
+
+base.tex: base-wiki.tex
+
+base-wiki.tex: base-wiki.wiki
+
+
+.wiki.tex:
+ wiki2beamer $< > $@
+
+.tex.pdf:
+ pdflatex $<
+ pdflatex $<
+
+.dia.png:
+ @dia -e $@ $<
+
+.dia.fig:
+ @dia -e $@ $<
+
+.dia.svg:
+ @dia -e $@ $<
+
+
+.PHONY: png fig svg images
+
+png: $(DIAIMAGES_PNG)
+
+fig: $(DIAIMAGES_FIG)
+
+svg: $(DIAIMAGES_SVG)
+
+images: $(IMAGES)
+
+
+.PHONY: archive
+
+archive: $(TARGET).tar.gz
+
+$(TARGET).tar.gz: $(TARGET).tar
+ @echo "Creating $@"
+ @rm -f $(TARGET).tar.gz
+ @gzip $(TARGET).tar
+
+
+# make $(TARGET).tar phony - it vanishes by gzipping...
+.PHONY: $(TARGET).tar
+
+$(TARGET).tar: presentation handout handout2
+ @echo "Creating $@"
+ @git archive --prefix=$(TARGET)/ HEAD > $@
+ @rm -rf $(TARGET)
+ @mkdir $(TARGET)
+ @cp $(TARGET_PRESENTATION).pdf $(TARGET)
+ #@cp $(TARGET_PAPER).pdf $(TARGET)
+ @cp $(TARGET_HANDOUT).pdf $(TARGET)
+ @cp $(TARGET_HANDOUT2).pdf $(TARGET)
+ @tar rf $@ $(TARGET)/$(TARGET_PRESENTATION).pdf
+ #@tar rf $@ $(TARGET)/$(TARGET_PAPER).pdf
+ @tar rf $@ $(TARGET)/$(TARGET_HANDOUT).pdf
+ @tar rf $@ $(TARGET)/$(TARGET_HANDOUT2).pdf
+
+
+.PHONY: clean
+
+clean:
+ @git clean -f
--- /dev/null
+%
+% colors:
+% _blue_text text_
+% _red_text text_
+%
+
+==== Samba File Serving Topics ====
+
+Core File Server:
+* SMB features (SMB3...)
+* Performance
+* Interop (Protocols, NFS, AFP, ...)
+* ...
+
+Moreover:
+* Auth/Domain Member
+* RPC server
+* ...
+
+
+==== File Server Layout/Scope ====
+
+<[center]
+<<<samba-layers.jpg,height=.8\textheight>>>
+[center]>
+
+==== SMB Features ====
+
+* SMB 2.0:
+** durable file handles [4.0]
+* SMB 2.1:
+** multi-credit / large mtu [4.0]
+** dynamic reauthentication [4.0]
+** leasing [WIP++]
+** resilient file handles [ever?]
+* SMB 3.0:
+** new crypto (sign/encrypt) [4.0]
+** secure negotiation [4.0]
+** durable handles v2 [4.0]
+** persistent file handles [planning]
+** multi-channel [WIP+]
+** SMB direct [designed/starting]
+** cluster features [designing]
+*** witness [WIP]
+** storage features [WIP]
+* SMB 3.1: [WIP]
+
+
+
+==== Clusterd Samba / CTDB (SOFS since 2007) ====
+
+
+<[center]
+<<<design-ctdb-three-nodes.png,width=.9\textwidth>>>
+[center]>
+
+
+
+%%% === SMB 3.0 ====
+%%%
+%%% \transdissolve
+%%%
+%%% +<2->{
+%%% * new crypto (signing, transport encryption)
+%%% * persistent file handles
+%%% * multi-channel
+%%% * RDMA transport (SMB direct)
+%%% * storage features
+%%% * clustering
+%%% ** witness
+%%% ** transparent failover (continuous availability)
+%%% ** all-active (scale-out)
+%%% }
+%%%
+%%% ==== SMB3 - Goals ====
+%%%
+%%% \transdissolve
+%%%
+%%% +<2->{
+%%% * fault tolerance / reliability
+%%% * performance / throughput / scaling
+%%% * focus on support for server workloads \\ %
+%%% (as opposed to workstation workloads)
+%%% * especially support for:
+%%% ** Hyper-V
+%%% ** MS-SQL
+%%% * goals:
+%%% ** replace block storage in data center
+%%% ** block (SCSI) over SMB
+%%% }
+%%%
+%%% ==== Requirements for Hyper-V ====
+%%%
+%%% \transdissolve
+%%%
+%%% +<2->{
+%%% * minimum requirements:
+%%% ** SMB 3.0
+%%% ** is that really all??? - maybe resilient file handles..
+%%% }
+%%% +<3->{
+%%% * desired features:
+%%% ** cluster ($\ge 2$ nodes)
+%%% ** CA / persistent handles
+%%% ** RDMA / SMB direct
+%%% ** multi channel
+%%% }
+
+%%% ==== SMB Protocol in Samba ====
+%%%
+%%% \transdissolve
+%%%
+%%% +<2->{
+%%% * Samba $<$ 3.5:
+%%% ** SMB 1
+%%% * Samba 3.5:
+%%% ** experimental incomplete support for SMB 2.0
+%%% * Samba 3.6:
+%%% ** official support for SMB 2.0
+%%% ** missing: durable handles
+%%% ** default server max proto: SMB 1
+%%% * Samba 4.0:
+%%% ** SMB 2.0: complete with durable handles
+%%% ** SMB 2.1: basis, multi-credit, dynamic reauthentication
+%%% ** SMB 3.0: basis, crypto, secure negotiation, durable v2
+%%% ** default server max proto: SMB 3.0
+%%% * Samba 4.1
+%%% ** SMB 3.02: basic
+%%% }
+
+==== ==== [plain]
+<[center]
+{\Large
+Technical Details...
+}
+[center]>
+
+%%% ==== ====[plain]
+%%%
+%%% \transdissolve
+%%%
+%%% <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
+%%%
+%%%
+%%%
+
+==== Multi-Channel - Windows/Protocol ====
+
++<2->{
+* find interfaces with interface discovery: \\ %
+@FSCTL\_QUERY\_NETWORK\_INTERFACE\_INFO@
+* bind additional TCP (or RDMA) connection (channel) to established SMB3 session (session bind)
+* bind (TCP) connections of same quality
+* bind only to a single node
+* replay / retry mechanisms, epoch numbers
+}
+
+==== Multi-Channel - Samba ====
+
++<2->{
+* samba/smbd: multi-process
+** process $\Leftrightarrow$ tcp connection
+** ==> transfer new connection to existing smbd
+** use fd-passing (sendmsg/recvmsg)
+}
++<3->{
+* preparation: messaging rewrite using unix dgm sockets with sendmsg [DONE,Volker]
+* add fd-passing [WIP]
+* transfer connection already in negprot (ClientGUID) [TODO]
+* implement channel epoch numbers [started]
+* implemnt interface discovery [TODO]
+}
+
+==== SMB Direct (RDMA) ====
+
++<2->{
+* windows:
+** requires multi-channel
+** start with TCP, bind an RDMA channel
+** reads and writes use RDMB write/read
+** protocol/metadata via send/receive
+}
++<3->{
+* wireshark dissector: [DONE (Metze)]
+}
++<4->{
+* samba (TODO):
+** prereq: multi-channel / fd-passing
+** buffer / transport abstractions [TODO]
+** central daemon (or kernel module) to serve as RDMA "proxy" \\ %
+(libraries: not fork safe and no fd-passing)
+}
+
+==== SMB Direct (RDMA) - Plan ====
+
++<2->{
+* smbd-d (?) listens for RDMA connection
+* main smbd listens for TCP connection
+* main smbd listens (for RDMA) via unix socket connect to smbd-d
+* client connects via TCP --> smbd forks child smbd (c1)
+* client connects via RDMA to smbd-d
+* smbd-d notifies main smbd and transfers connection info
+* smbd forks child (c2) that inherits connection to smbd-d
+* c2 smbd passes [connection to smbd-d] to c1 (via ClientGUID) and exits
+* c1 establishes mmap area with smbd-d
+* client does rdma calls to smbd-d
+** metadata and protocol calls are transferred via socket to tcp-smbd
+** rdma read/write directly to tcp-smbd via mmap area
+}
+
+%%% ==== Persistent Handles ====
+%%%
+%%% \transdissolve
+%%%
+%%% +<2->{
+%%% * like durable file handles with strong guarantees
+%%% * framework is already there in samba (by support for durable v2)
+%%% ** ==> easy to satisfy at the protocol level
+%%% }
+%%% +<3->{
+%%% * the difficulty lies in implementing the guarantees
+%%% ** need make metadata persistent
+%%% ** but don't kill performance!
+%%% ** persistent tdbs !would! kill performance
+%%% ** ideas:
+%%% *** need to be sync
+%%% *** record-level transactions (instead of db-level)
+%%% *** only replicate to some nodes, not all
+%%% }
+
+
+==== Clustering Concepts (Windows) ====
+
+\transdissolve
+
++<2->{
+* Cluster:
+** (``traditional'') failover cluster (active-passive)
+** protocol: @SMB2\_SHARE\_CAP\_CLUSTER@
+** Windows:
+*** runs off a cluster (failover) volume
+*** offers the Witness service
+}
++<3->{
+* Scale-Out (SOFS):
+** scale-out cluster (all-active!)
+** protocol: @SMB2\_SHARE\_CAP\_SCALEOUT@
+** no client caching
+** Windows: runs off a cluster shared volume (implies cluster)
+}
++<4->{
+* Continuous Availability (CA):
+** transparent failover, persistent handles
+** protocol: @SMB2\_SHARE\_CAP\_CONTINUOUS\_AVAILABILITY@
+** can independently turned on on any cluster share (failover or scale-out)
+** ==> changed client retry behaviour!
+}
+
+%%% ==== Clustering -- Controlling Flags from Windows ====
+%%%
+%%% \transdissolve
+%%%
+%%% +<2->{
+%%% * a share on a cluster carries
+%%% ** @SMB2\_SHARE\_CAP\_CLUSTER@ $\Leftrightarrow$ the shared FS is a cluster volume.
+%%% }
+%%% +<3->{
+%%% * a share on a cluster carries
+%%% ** @SMB2\_SHARE\_CAP\_SCALEOUT@ $\Leftrightarrow$ the shared FS is a CSV
+%%% *** implies @SMB2\_SHARE\_CAP\_CLUSTER@
+%%% }
+%%% +<4->{
+%%% * independently settable on a clustered share:
+%%% ** @SMB2\_SHARE\_CAP\_CONTINUOUS\_AVAILABILITY@
+%%% *** implies @SMB2\_SHARE\_CAP\_CLUSTER@
+%%% }
+%%%
+==== Clustering -- Server Behaviour ====
+
+\transdissolve
+
++<2->{
+* @SMB2\_SHARE\_CAP\_CLUSTER@:
+** run witness service (RPC)
+** client can register and get notified about resource changes
+}
++<3->{
+* @SMB2\_SHARE\_CAP\_SCALEOUT@:
+** do not grant batch oplocks, write leases, handle leases
+** ==> no durable handles unless also CA
+}
++<4->{
+* @SMB2\_SHARE\_CAP\_CONTINUOUS\_AVAILABILITY@:
+** offer persistent handles
+** timeout from durable v2 request
+}
+
+
+==== Clustering -- Client Behaviour (Win8) ====
+
+\transdissolve
+
+
++<2->{
+* @SMB2\_SHARE\_CAP\_CLUSTER@:
+** clients happily work if witness is not available
+}
++<3->{
+* @SMB2\_SHARE\_CAP\_SCALEOUT@:
+** clients happily connect if @CLUSTER@ is not set.
+** clients DO request oplocks/leases/durable handles
+** clients are not confused if they get these
+}
++<4->{
+* @SMB2\_SHARE\_CAP\_CONTINUOUS\_AVAILABILITY@:
+** clients happily connect if @CLUSTER@ is not set.
+** clients typically request persistent handle with RWH lease
+}
+
+%%%+<5->{
+%%%* Note:\\ %
+%%%Win8 sends @SMB2\_FLAGS\_REPLAY\_OPERATION@ in writes and reads (from 2nd in a row) \\ %
+%%%$\Leftrightarrow$ \\ %
+%%%The server announces @SMB2\_CAP\_PERSISTENT\_HANDLES@.
+%%%}
+
+%%% ==== Clustering -- Client Behaviour (Win8) : Retries ====
+%%%
+%%% +<2->{
+%%% * Test: Win8 against slightly pimped Samba (2 IPs)
+%%% }
+%%% +<3->{
+%%% * Server-Matrix (on/off):
+%%% ** persistent handle cap
+%%% ** durable handles
+%%% ** cluster share cap
+%%% ** scale out cap
+%%% ** ca share cap
+%%% }
+%%% +<4->{
+%%% * The test:
+%%% ** connect to share with explorer
+%%% ** start copying file (2G)
+%%% ** kill smbd
+%%% ** wait for the client to pop up an error dialog
+%%% ** click cancel
+%%% ** stop capture
+%%% }
+%%%
+%%% ==== Clustering -- Client Behaviour (Win8) : Retries ====
+%%%
+%%% +<2->{
+%%% * only two different retry characteristics: CA $\leftrightarrow$ non-CA
+%%% }
+%%% +<3->{
+%%% * non-CA-case
+%%% ** 3 consecutive attempt rounds:
+%%% *** for each of the two IPs: \\ %
+%%% arp IP \\ %
+%%% three tcp syn attempts to IP with 0.5 sec breaks
+%%% ** ==> some 2.1 seconds for 1 round
+%%% ** between attempts:
+%%% ** dns, ping, arp ... 5.8 seconds
+%%% ** ==> _red_18 seconds_
+%%% }
+%%% +<4->{
+%%% * CA-Case
+%%% ** retries attempt rounds from above for _red_14 minutes_
+%%% }
+%%%
+%%%
+%%%
+%%% ==== ====[plain]
+%%%
+%%% \transdissolve
+%%%
+%%% <[center]
+%%% <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
+%%% [center]>
+%%%
+%%%
+
+==== Clustering with Samba/CTDB ====
+
++<2->{
+* all-active SMB-cluster with Samba and CTDB... \\ %
++<3->{...since 2007! \smiley }
+}
++<4->{
+* transparent for the client
+** CTDB:
+*** metadata and messaging engine for Samba in a cluster
+*** plus cluster resource manager (IPs, services...)
+** client only sees one ``big'' SMB server
+** we could not change the client!...
+** works ``well enough''
+}
++<5->{
+* challenge:
+** how to integrate SMB3 clustering with Samba/CTDB
+** good: rather orthogonal
+** ctdb-clustering transparent mostly due to management
+}
+
+==== Witness Service ====
+
++<2->{
+* an RPC service
+** monitoring of availability of resources (shares, NICs)
+** server asks client to move to another resource
+}
++<3->{
+* remember:
+** available on a Windows SMB3 share $\Leftrightarrow$ @SMB2\_SHARE\_CAP\_CLUSTER@
+** but clients happily connect w/o witness
+}
++<4->{
+* status in Samba [WIP (Metze, Gregor Beck)]:
+** async RPC: WIP, good progress ($\Rightarrow$ Metze's talk)
+** wireshark dissector: essentially done
+** client: in @rpcclient@ - done
+** server: dummy PoC / tracer bullet implementation done
+** CTDB: changes / integration needed
+}
+
+
+%%% ==== ====[plain]
+%%%
+%%% <[center]
+%%% {\Large
+%%% !@https://wiki.samba.org/index.php/SMB3@!
+%%% }
+%%% [center]>
+%%%
+%%% ==== ====[plain]
+%%%
+%%% \transdissolve
+%%%
+%%% <[center]
+%%% <[columns]
+%%% [[[.6\textwidth]]]
+%%%
+%%% [[[.3\textwidth]]]
+%%% <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
+%%% [columns]>
+%%% [center]>
+%%%
+
+==== ====[plain]
+
+\transdissolve
+
+<[center]
+<[columns]
+[[[.6\textwidth]]]
+
+{\Large
+
+Questions?
+
+--*4em--
+
+@obnox\@samba.org@
+
+@ma\@sernet.de@
+
+}
+
+[[[.3\textwidth]]]
+<<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
+[columns]>
+[center]>
+
+%%% %%%% <[center]
+%%% %%%%
+%%% %%%% {\Large
+%%% %%%%
+%%% %%%% @obnox\@samba.org / ma\@sernet.de@
+%%% %%%%
+%%% %%%% \vspace*{1em}
+%%% %%%%
+%%% %%%% %%%<<<ernie-und-bert-1.jpg,width=.65\textwidth>>>
+%%% %%%% <<<samba-kisses-better-selection.jpg,width=.6\textwidth>>>
+%%% %%%% }
+%%% %%%% [center]>
--- /dev/null
+% Copyright 2011 by Michael Adam <obnox@samba.org>
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/licenses/LICENSE for more details.
+
+\mode<presentation>
+
+%\setbeamercolor*{author in head/foot}{parent=palette tertiary}
+\setbeamercolor*{author in head/foot}{parent=palette primary,bg=white}
+\setbeamercolor*{title in head/foot}{parent=palette secondary}
+\setbeamercolor*{date in head/foot}{parent=palette primary}
+
+\setbeamercolor*{logo in head/foot}{parent=palette tertiary}
+\setbeamercolor*{logo in head/foot}{parent=palette primary}
+
+%%%%\defbeamertemplate*{footline}{obnoxinfolines theme}
+%%\defbeamertemplate*{headline}{obnoxinfolines theme}
+%%{
+%% \leavevmode%
+%% \hbox{%
+%% \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
+%% \usebeamerfont{author in head/foot}\insertshortauthor~~(\insertshortinstitute)
+%% \end{beamercolorbox}%
+%% \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
+%% \usebeamerfont{title in head/foot}\insertshorttitle
+%% \end{beamercolorbox}%
+%% \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
+%% \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
+%% \insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
+%% \end{beamercolorbox}}%
+%% \vskip0pt%
+%%}
+
+%% %%\defbeamertemplate*{headline}{obnoxinfolines theme}
+%% \defbeamertemplate*{footline}{obnoxinfolines theme}
+%% {
+%% \leavevmode%
+%% \hbox{%
+%% \begin{beamercolorbox}[wd=.5\paperwidth,ht=5ex,dp=1ex,left]{xy}%
+%% \hspace*{2ex} \hbox{\pgfuseimage{sambanew}}
+%% \end{beamercolorbox}%
+%% \begin{beamercolorbox}[wd=.5\paperwidth,ht=5ex,dp=1ex,right]{xy}%
+%% \hbox{\pgfuseimage{sernet}}
+%% \hspace*{2ex}\end{beamercolorbox}}%
+%% \vskip0pt%
+%% }
+
+%%\defbeamertemplate*{headline}{obnoxinfolines theme}
+\defbeamertemplate*{footline}{obnoxinfolines theme}
+{
+ \leavevmode%
+ \hbox{%
+ \begin{beamercolorbox}[wd=.2\paperwidth,ht=5ex,dp=1ex,left]{xy}%
+ \hspace*{2ex} \hbox{\pgfuseimage{sambanew}}
+ \end{beamercolorbox}%
+ \begin{beamercolorbox}[wd=.3\paperwidth,ht=5ex,dp=1ex,center]{author in head/foot}%
+ \usebeamerfont{author in head/foot}\scriptsize\insertshortauthor{}\hspace*{2ex}
+ \end{beamercolorbox}%
+ \begin{beamercolorbox}[wd=.3\paperwidth,ht=5ex,dp=1ex,center]{author in head/foot}%
+ \usebeamerfont{author in head/foot}\scriptsize%
+ \insertshorttitle{} (\insertframenumber{}/\inserttotalframenumber)\hspace*{2ex}
+ \end{beamercolorbox}%
+ \begin{beamercolorbox}[wd=.2\paperwidth,ht=5ex,dp=1ex,right]{xy}%
+ \hbox{\pgfuseimage{sernet}}
+ \hspace*{2ex}\end{beamercolorbox}}%
+ \vskip0pt%
+}
+
+
+\setbeamersize{text margin left=1em,text margin right=1em}
+
+\mode
+<all>