Namjae Jeon, a participant in the Samba project, who supports the EXFAT driver and KSMBD server in the Linux kernel, proposed a new implementation of the NTFS file system — ntfsplus. It is expected that a higher quality and maintained NTFS driver will improve the compatibility of Linux systems with Windows devices and simplify user experience.
Currently, NTFS support in Linux is limited to the old NTFS driver, which was removed from the Linux kernel and only supported reading, as well as the current NTFS3 driver, which has many unresolved issues due to poor maintenance. Because of these problems, many users and distributions continue to apply the old ntfs-3g driver, which operates in user space.
The ntfsplus driver is based on the codebase of the classic ntfs driver that was removed from the kernel, which has been reworked, expanded with data writing capabilities, and significantly enhanced to support modern features, such as using memory page folios instead of the buffer_head structure. The new driver implements delayed block allocation, allowing for increased high performance write operations and reduced fragmentation. For buffered read/write operations, direct I/O, extent mapping, and page read/write operations, the iomap library is utilized.
Unlike the existing ntfs3 driver developed by Paragon Software, the ntfsplus driver demonstrates higher performance and supports features such as iomap, delayed block allocation, and user ID mapping upon mounting (idmap). Once accepted into the main kernel, ntfsplus plans to implement full journaling (the ntfs3 only creates a replay journal that has been known to malfunction in tests). The new driver successfully passes 287 tests from the xfstests suite and also implements the capabilities needed to run performance tests with Bonnie++ (the ntfs3 driver passed 218 xfstests but caused issues when running Bonnie++).
In tests, the iozone driver ntfsplus proved to be 3-5% faster than ntfs3 in single-threaded writing, and 35-110% faster when using 4 threads. The reading speeds of ntfsplus and ntfs3 are roughly the same. In the file listing test (ls -lR) in directories containing 100/200/400 thousand files, ntfsplus is faster by about 12-14%. In terms of mounting speed, ntfsplus is 5-6 times faster. This high performance in ntfsplus is achieved through asynchronous iomap operations, delayed block allocation, optimization of new cluster allocation, fragment merging optimization, background loading of the cluster bitmap, and preloading of inode blocks and directory information.
A separate set of utilities, ntfsprogs-plus, has been prepared for ntfsplus, which operate in user space and are based on the ntfsprogs utilities from the ntfs-3g project. Utilities ntfsclone, ntfscluster, and ntfsinfo have been ported from ntfsprogs. The project has also developed a new utility, ntfsck, for checking and repairing damaged NTFS partitions.
Source: opennet.ru
