Skip to content

Commit

Permalink
ksmbd: move fs/cifsd to fs/ksmbd
Browse files Browse the repository at this point in the history
Move fs/cifsd to fs/ksmbd and rename the remaining cifsd name to ksmbd.

Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
  • Loading branch information
namjaejeon committed Jun 30, 2021
1 parent 646e5f4 commit b9a7a8c
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 52 deletions.
56 changes: 28 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ before_script:
- sudo apt-get install linux-headers-$(uname -r)
- sudo apt-get install autoconf libtool pkg-config libnl-3-dev libnl-genl-3-dev
- sudo apt-get install xfslibs-dev uuid-dev libtool-bin xfsprogs libgdbm-dev gawk fio attr libattr1-dev libacl1-dev libaio-dev
- git clone --branch=ksmbd-tools-next https://github.com/cifsd-team/cifsd-tools
- git clone --branch=ksmbd-tools-next https://github.com/cifsd-team/ksmbd-tools
- git clone https://github.com/cifsd-team/cifsd-test-result
- export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
- export PATH=/usr/local/lib:$PATH
Expand All @@ -31,102 +31,102 @@ script:
# Copy ksmbd source to kernel
- mv linux-stable ../
- mv linux ../
- mkdir ../linux-stable/fs/cifsd
- cp -ar * ../linux-stable/fs/cifsd/
- mkdir ../linux/fs/cifsd
- cp -ar * ../linux/fs/cifsd/
- mkdir ../linux-stable/fs/ksmbd
- cp -ar * ../linux-stable/fs/ksmbd/
- mkdir ../linux/fs/ksmbd
- cp -ar * ../linux/fs/ksmbd/

# Compile with 5.4 kernel
- cd ../linux-stable
- yes "" | make oldconfig > /dev/null
- echo 'obj-$(CONFIG_SMB_SERVER) += cifsd/' >> fs/Makefile
- echo 'source "fs/cifsd/Kconfig"' >> fs/Kconfig
- echo 'obj-$(CONFIG_SMB_SERVER) += ksmbd/' >> fs/Makefile
- echo 'source "fs/ksmbd/Kconfig"' >> fs/Kconfig
- echo 'CONFIG_SMB_SERVER=m' >> .config
- echo 'CONFIG_SMB_INSECURE_SERVER=y' >> .config
- echo '# CONFIG_SMB_SERVER_SMBDIRECT is not set' >> .config
- echo '# CONFIG_SMB_SERVER_CHECK_CAP_NET_ADMIN is not set' >> .config
- echo '# CONFIG_SMB_SERVER_KERBEROS5 is not set' >> .config
- make -j$((`nproc`+1)) fs/cifsd/ksmbd.ko
- make -j$((`nproc`+1)) fs/ksmbd/ksmbd.ko

# Compile with latest Torvalds' kernel
- cd ../linux
- yes "" | make oldconfig > /dev/null
- echo 'obj-$(CONFIG_SMB_SERVER) += cifsd/' >> fs/Makefile
- echo 'source "fs/cifsd/Kconfig"' >> fs/Kconfig
- echo 'obj-$(CONFIG_SMB_SERVER) += ksmbd/' >> fs/Makefile
- echo 'source "fs/ksmbd/Kconfig"' >> fs/Kconfig
- echo 'CONFIG_SMB_SERVER=m' >> .config
- echo 'CONFIG_SMB_INSECURE_SERVER=y' >> .config
- echo 'CONFIG_SMB_SERVER_SMBDIRECT=y' >> .config
- echo '# CONFIG_SMB_SERVER_CHECK_CAP_NET_ADMIN is not set' >> .config
- echo '# CONFIG_SMB_SERVER_KERBEROS5 is not set' >> .config
# - make -j$((`nproc`+1)) fs/cifsd/ksmbd.ko
# - make -j$((`nproc`+1)) fs/ksmbd/ksmbd.ko

# Compile secure server build (no smb1.0 & smb2.0) with 5.4 kernel
- cd ../linux-stable
- yes "" | make oldconfig > /dev/null
- echo 'obj-$(CONFIG_SMB_SERVER) += cifsd/' >> fs/Makefile
- echo 'source "fs/cifsd/Kconfig"' >> fs/Kconfig
- echo 'obj-$(CONFIG_SMB_SERVER) += ksmbd/' >> fs/Makefile
- echo 'source "fs/ksmbd/Kconfig"' >> fs/Kconfig
- echo 'CONFIG_SMB_SERVER=m' >> .config
- echo '# CONFIG_SMB_INSECURE_SERVER is not set' >> .config
- echo '# CONFIG_SMB_SERVER_SMBDIRECT is not set' >> .config
- echo '# CONFIG_SMB_SERVER_CHECK_CAP_NET_ADMIN is not set' >> .config
- echo '# CONFIG_SMB_SERVER_KERBEROS5 is not set' >> .config
- make -j$((`nproc`+1)) fs/cifsd/ksmbd.ko
- make -j$((`nproc`+1)) fs/ksmbd/ksmbd.ko

# Compile secure server build (no smb1/smb2) with latest Torvalds' kernel
- cd ../linux
- yes "" | make oldconfig > /dev/null
- echo 'obj-$(CONFIG_SMB_SERVER) += cifsd/' >> fs/Makefile
- echo 'source "fs/cifsd/Kconfig"' >> fs/Kconfig
- echo 'obj-$(CONFIG_SMB_SERVER) += ksmbd/' >> fs/Makefile
- echo 'source "fs/ksmbd/Kconfig"' >> fs/Kconfig
- echo 'CONFIG_SMB_SERVER=m' >> .config
- echo '# CONFIG_SMB_INSECURE_SERVER is not set' >> .config
- echo '# CONFIG_SMB_SERVER_SMBDIRECT is not set' >> .config
- echo '# CONFIG_SMB_SERVER_CHECK_CAP_NET_ADMIN is not set' >> .config
- echo '# CONFIG_SMB_SERVER_KERBEROS5 is not set' >> .config
# - make -j$((`nproc`+1)) fs/cifsd/ksmbd.ko
# - make -j$((`nproc`+1)) fs/ksmbd/ksmbd.ko

# Compile secure server build + SMBD with latest Torvalds' kernel
- cd ../linux
- yes "" | make oldconfig > /dev/null
- echo 'obj-$(CONFIG_SMB_SERVER) += cifsd/' >> fs/Makefile
- echo 'source "fs/cifsd/Kconfig"' >> fs/Kconfig
- echo 'obj-$(CONFIG_SMB_SERVER) += ksmbd/' >> fs/Makefile
- echo 'source "fs/ksmbd/Kconfig"' >> fs/Kconfig
- echo 'CONFIG_SMB_SERVER=m' >> .config
- echo '# CONFIG_SMB_INSECURE_SERVER is not set' >> .config
- echo 'CONFIG_SMB_SERVER_SMBDIRECT=y' >> .config
- echo '# CONFIG_SMB_SERVER_CHECK_CAP_NET_ADMIN is not set' >> .config
- echo '# CONFIG_SMB_SERVER_KERBEROS5 is not set' >> .config
# - make -j$((`nproc`+1)) fs/cifsd/ksmbd.ko
# - make -j$((`nproc`+1)) fs/ksmbd/ksmbd.ko

# Compile secure server build + Kerberos with 5.4 kernel
- cd ../linux-stable
- yes "" | make oldconfig > /dev/null
- echo 'obj-$(CONFIG_SMB_SERVER) += cifsd/' >> fs/Makefile
- echo 'source "fs/cifsd/Kconfig"' >> fs/Kconfig
- echo 'obj-$(CONFIG_SMB_SERVER) += ksmbd/' >> fs/Makefile
- echo 'source "fs/ksmbd/Kconfig"' >> fs/Kconfig
- echo 'CONFIG_SMB_SERVER=m' >> .config
- echo '# CONFIG_SMB_INSECURE_SERVER is not set' >> .config
- echo '# CONFIG_SMB_SERVER_SMBDIRECT is not set' >> .config
- echo '# CONFIG_SMB_SERVER_CHECK_CAP_NET_ADMIN is not set' >> .config
- echo 'CONFIG_SMB_SERVER_KERBEROS5=y' >> .config
- make -j$((`nproc`+1)) fs/cifsd/ksmbd.ko
- make -j$((`nproc`+1)) fs/ksmbd/ksmbd.ko

# Compile secure server build + SMBD + Kerberos with latest Torvalds' kernel
- cd ../linux
- yes "" | make oldconfig > /dev/null
- echo 'obj-$(CONFIG_SMB_SERVER) += cifsd/' >> fs/Makefile
- echo 'source "fs/cifsd/Kconfig"' >> fs/Kconfig
- echo 'obj-$(CONFIG_SMB_SERVER) += ksmbd/' >> fs/Makefile
- echo 'source "fs/ksmbd/Kconfig"' >> fs/Kconfig
- echo 'CONFIG_SMB_SERVER=m' >> .config
- echo '# CONFIG_SMB_INSECURE_SERVER is not set' >> .config
- echo 'CONFIG_SMB_SERVER_SMBDIRECT=y' >> .config
- echo '# CONFIG_SMB_SERVER_CHECK_CAP_NET_ADMIN is not set' >> .config
- echo 'CONFIG_SMB_SERVER_KERBEROS5=y' >> .config
# - make -j$((`nproc`+1)) fs/cifsd/ksmbd.ko
# - make -j$((`nproc`+1)) fs/ksmbd/ksmbd.ko

# Run xfstests testsuite
- cd ../cifsd
- cd ../ksmbd
- make > /dev/null
- sudo make install > /dev/null
- sudo modprobe ksmbd
- sudo modprobe cifs
- cd cifsd-tools
- cd ksmbd-tools
- ./autogen.sh > /dev/null
- ./configure > /dev/null
- make -j$((`nproc`+1)) > /dev/null
Expand Down
14 changes: 7 additions & 7 deletions Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
config SMB_SERVER
tristate "SMB server support (EXPERIMENTAL)"
tristate "SMB3 server support (EXPERIMENTAL)"
depends on INET
depends on MULTIUSER
depends on FILE_LOCKING
Expand Down Expand Up @@ -31,13 +31,13 @@ config SMB_SERVER
case you can choose N here.

You also need to install user space programs which can be found
in cifsd-tools, available from
https://github.com/cifsd-team/cifsd-tools.
More detail about how to run the cifsd kernel server is
in ksmbd-tools, available from
https://github.com/cifsd-team/ksmbd-tools.
More detail about how to run the ksmbd kernel server is
available via README file
(https://github.com/cifsd-team/cifsd-tools/blob/master/README).
(https://github.com/cifsd-team/ksmbd-tools/blob/master/README).

cifsd kernel server includes support for auto-negotiation,
ksmbd kernel server includes support for auto-negotiation,
Secure negotiate, Pre-authentication integrity, oplock/lease,
compound requests, multi-credit, packet signing, RDMA(smbdirect),
smb3 encryption, copy-offload, secure per-user session
Expand Down Expand Up @@ -71,7 +71,7 @@ config SMB_SERVER_CHECK_CAP_NET_ADMIN
default y

help
Prevent unprivileged processes to start the cifsd kernel server.
Prevent unprivileged processes to start the ksmbd kernel server.

config SMB_SERVER_KERBEROS5
bool "Support for Kerberos 5"
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@

# Content

- [What is CIFSD?](#what-is-cifsd)
- [What is KSMBD?](#KSMBDwhat-is-ksmbd)
- [Under PFIF](#under-pfif)
- [Git](#git)
- [Maintainers](#maintainers)
- [Bug reports or contribution](#Bug-reports-or-contribution)
- [Features](#features)
- [Supported Linux Kernel Versions](#supported-linux-kernel-versions)
- [CIFSD architecture](#cifsd-architecture)
- [KSMBD architecture](#ksmbd-architecture)


## What is CIFSD?
## What is KSMBD?

CIFSD is an opensource In-kernel CIFS/SMB3 server created by Namjae Jeon for Linux Kernel. It's an implementation of SMB/CIFS protocol in kernel space for sharing files and IPC services over network. Initially the target is to provide improved file I/O performances, but the bigger goal is to have some new features which are much easier to develop and maintain inside the kernel and expose the layers fully. Directions can be attributed to sections where SAMBA is moving to few modules inside the kernel to have features like RDMA(Remote direct memory access) to work with actual performance gain.
KSMBD is an opensource In-kernel CIFS/SMB3 server created by Namjae Jeon for Linux Kernel. It's an implementation of SMB/CIFS protocol in kernel space for sharing files and IPC services over network. Initially the target is to provide improved file I/O performances, but the bigger goal is to have some new features which are much easier to develop and maintain inside the kernel and expose the layers fully. Directions can be attributed to sections where SAMBA is moving to few modules inside the kernel to have features like RDMA(Remote direct memory access) to work with actual performance gain.


## Under PFIF
Expand All @@ -29,8 +29,8 @@ for more details.
## Git

The development git tree is available at
* https://github.com/cifsd-team/cifsd
* https://github.com/cifsd-team/cifsd-tools
* https://github.com/cifsd-team/ksmbd
* https://github.com/cifsd-team/ksmbd-tools


## Maintainers
Expand All @@ -47,7 +47,7 @@ For reporting bugs and sending patches, please send the patches to the following
* [email protected]
* [email protected]

or open issues/send PRs to [CIFSD](https://github.com/cifsd-team/cifsd).
or open issues/send PRs to [KSMBD](https://github.com/cifsd-team/ksmbd).

## linux-cifsd-devel mailing list subscription

Expand Down Expand Up @@ -79,23 +79,23 @@ To load the driver manually, run this as root:
1. Let's take [linux] as the path to your kernel source dir.
```
cd [linux]
cp -ar cifsd [linux]/fs/
cp -ar ksmbd [linux]/fs/
```

2. edit [linux]/fs/Kconfig
```
source "fs/cifs/Kconfig"
+source "fs/cifsd/Kconfig"
+source "fs/ksmbd/Kconfig"
source "fs/coda/Kconfig"
```

3. edit [linux]/fs/Makefile
```
obj-$(CONFIG_CIFS) += cifs/
+obj-$(CONFIG_SMB_SERVER) += cifsd/
+obj-$(CONFIG_SMB_SERVER) += ksmbd/
obj-$(CONFIG_HPFS_FS) += hpfs/
```
4. make menuconfig and set cifsd
4. make menuconfig and set ksmbd
```
[*] Network File Systems --->
<M> SMB server support
Expand Down Expand Up @@ -135,7 +135,7 @@ build your kernel
* Linux Kernel 5.4 or later


## CIFSD architecture
## KSMBD architecture

```
|--- ...
Expand Down
10 changes: 5 additions & 5 deletions cifsd.rst → ksmbd.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
.. SPDX-License-Identifier: GPL-2.0
==========================
CIFSD - SMB3 Kernel Server
KSMBD - SMB3 Kernel Server
==========================

CIFSD is a linux kernel server which implements SMB3 protocol in kernel space
ksmbd is a linux kernel server which implements SMB3 protocol in kernel space
for sharing files over network.

CIFSD architecture
KSMBD architecture
==================

The subset of performance related operations belong in kernelspace and
Expand Down Expand Up @@ -60,7 +60,7 @@ NetServerGetInfo. Complete DCE/RPC response is prepared from the user space
and passed over to the associated kernel thread for the client.


CIFSD Feature Status
KSMBD Feature Status
====================

============================== =================================================
Expand Down Expand Up @@ -138,7 +138,7 @@ How to run

6. Access share from Windows or Linux using CIFS

Shutdown CIFSD
Shutdown KSMBD
==============

1. kill user and kernel space daemon
Expand Down

0 comments on commit b9a7a8c

Please sign in to comment.