Skip to content

Commit edd8650

Browse files
Andreas Hindborgaxboe
authored andcommitted
rnull: move driver to separate directory
The rust null block driver is about to gain some additional modules. Rather than pollute the current directory, move the driver to a subdirectory. Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org> Link: https://lore.kernel.org/r/20250902-rnull-up-v6-16-v7-12-b5212cc89b98@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 19c37c9 commit edd8650

6 files changed

Lines changed: 19 additions & 13 deletions

File tree

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4343,7 +4343,7 @@ W: https://rust-for-linux.com
43434343
B: https://github.com/Rust-for-Linux/linux/issues
43444344
C: https://rust-for-linux.zulipchat.com/#narrow/stream/Block
43454345
T: git https://github.com/Rust-for-Linux/linux.git rust-block-next
4346-
F: drivers/block/rnull.rs
4346+
F: drivers/block/rnull/
43474347
F: rust/kernel/block.rs
43484348
F: rust/kernel/block/
43494349

drivers/block/Kconfig

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ menuconfig BLK_DEV
1717
if BLK_DEV
1818

1919
source "drivers/block/null_blk/Kconfig"
20+
source "drivers/block/rnull/Kconfig"
2021

2122
config BLK_DEV_FD
2223
tristate "Normal floppy disk support"
@@ -311,15 +312,6 @@ config VIRTIO_BLK
311312
This is the virtual block driver for virtio. It can be used with
312313
QEMU based VMMs (like KVM or Xen). Say Y or M.
313314

314-
config BLK_DEV_RUST_NULL
315-
tristate "Rust null block driver (Experimental)"
316-
depends on RUST
317-
help
318-
This is the Rust implementation of the null block driver. For now it
319-
is only a minimal stub.
320-
321-
If unsure, say N.
322-
323315
config BLK_DEV_RBD
324316
tristate "Rados block device (RBD)"
325317
depends on INET && BLOCK

drivers/block/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
# needed for trace events
1010
ccflags-y += -I$(src)
1111

12-
obj-$(CONFIG_BLK_DEV_RUST_NULL) += rnull_mod.o
13-
rnull_mod-y := rnull.o
14-
1512
obj-$(CONFIG_MAC_FLOPPY) += swim3.o
1613
obj-$(CONFIG_BLK_DEV_SWIM) += swim_mod.o
1714
obj-$(CONFIG_BLK_DEV_FD) += floppy.o
@@ -38,6 +35,7 @@ obj-$(CONFIG_ZRAM) += zram/
3835
obj-$(CONFIG_BLK_DEV_RNBD) += rnbd/
3936

4037
obj-$(CONFIG_BLK_DEV_NULL_BLK) += null_blk/
38+
obj-$(CONFIG_BLK_DEV_RUST_NULL) += rnull/
4139

4240
obj-$(CONFIG_BLK_DEV_UBLK) += ublk_drv.o
4341
obj-$(CONFIG_BLK_DEV_ZONED_LOOP) += zloop.o

drivers/block/rnull/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
#
3+
# Rust null block device driver configuration
4+
5+
config BLK_DEV_RUST_NULL
6+
tristate "Rust null block driver (Experimental)"
7+
depends on RUST
8+
help
9+
This is the Rust implementation of the null block driver. Like
10+
the C version, the driver allows the user to create virutal block
11+
devices that can be configured via various configuration options.
12+
13+
If unsure, say N.

drivers/block/rnull/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
obj-$(CONFIG_BLK_DEV_RUST_NULL) += rnull_mod.o
3+
rnull_mod-y := rnull.o

0 commit comments

Comments
 (0)