A new implementation of a file server utilizing the SMB3 protocol has been proposed for inclusion in the next Linux kernel release. The server is designed as a ksmbd kernel module and complements the previously available SMB client code. It is noted that unlike the SMB server operating in user space, the kernel-level implementation is more efficient in terms of performance, memory consumption, and integration with the kernel's extended features.
Among ksmbd's capabilities is improved support for distributed file caching technology (SMB leases) on local systems, which significantly reduces traffic. Future plans include adding new features such as support for RDMA ('smbdirect') as well as protocol extensions related to enhanced encryption reliability and digital signature verification. It is noted that such extensions are much easier to implement in a compact and well-optimized server, kernel-level environment than in the Samba package.
At the same time, ksmbd does not claim to be a complete replacement for the Samba package, which is not limited to file server capabilities server and provides tools that encompass services for security, LDAP, and domain controller functionality. The file server implementation in Samba is cross-platform and designed for broader use cases, which complicates optimization for certain Linux environments, such as firmware for resource-constrained devices.
Ksmbd is viewed not as a standalone product but rather as a high-performance extension for embedded devices that is ready for use alongside Samba, which can be integrated with Samba tools and libraries if needed. For example, developers of Samba have already agreed on using configuration files compatible with smbd and extended attributes (xattrs) in ksmbd, simplifying the transition from smbd to ksmbd and vice versa.
The main authors of the ksmbd code are Namjae Jeon from Samsung and Hyunchul Lee from LG. The maintenance of ksmbd within the kernel will be managed by Steve French from Microsoft (who previously worked for many years at IBM), the maintainer of the CIFS/SMB2/SMB3 subsystem in the Linux kernel, and a long-time member of the Samba development team who has made significant contributions to the implementation of SMB/CIFS protocol support in Samba and Linux.
Source: opennet.ru
