Skip to contentSkip to conversation

bcache: Add ioctl feature capability to make-bcache

PATCH New Andrea Tomassetti 1 participant 1 message Mar 9, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bcache: Add ioctl feature capability to make-bcache

This patch contains the least modifications needed to be able to use the new IOCTL interface introduced in the bcache module.

---
Hi Zhang,
yes you understood it correctly. With this patch you should have everything to test it locally. This patch is meant to be applied to the colyli/bcache-tools.git repo. I hope it's fine.

Let me know,
Andrea

 60-bcache.rules |   7 ++
 Makefile        |   4 +-
 bcache-loader   | 107 +++++++++++++++++
 bcache.conf     |   6 +
 make.c          | 313 +++++++++++++++++++++++++++++++-----------------
 5 files changed, 327 insertions(+), 110 deletions(-)
 create mode 100644 60-bcache.rules
 create mode 100644 bcache-loader
 create mode 100644 bcache.conf
60-bcache.rules new file +7 -0
new file mode 100644
index 0000000..f539c75
@@ -0,0 +1,7 @@
+# /lib/udev/rules.d/60-bcache.rules
+ACTION=="remove", GOTO="bcache_end"
+SUBSYSTEM!="block", GOTO="bcache_end"
+
+RUN+="/lib/udev/bcache-loader /dev/$name"
+
+LABEL="bcache_end"
Makefile +3 -1
index 5496c35..7829a7f 100644
@@ -10,12 +10,14 @@ all: make-bcache probe-bcache bcache-super-show bcache-register bcache
 install: make-bcache probe-bcache bcache-super-show
 	$(INSTALL) -m0755 make-bcache bcache-super-show	bcache $(DESTDIR)${PREFIX}/sbin/
 	$(INSTALL) -m0755 bcache-status $(DESTDIR)${PREFIX}/sbin/
-	$(INSTALL) -m0755 probe-bcache bcache-register bcache-export-cached $(DESTDIR)$(UDEVLIBDIR)/
+	$(INSTALL) -m0755 probe-bcache bcache-register bcache-export-cached bcache-loader $(DESTDIR)$(UDEVLIBDIR)/
 	$(INSTALL) -m0644 69-bcache.rules	$(DESTDIR)$(UDEVLIBDIR)/rules.d/
 	$(INSTALL) -m0644 -- *.8 $(DESTDIR)${PREFIX}/share/man/man8/
 	$(INSTALL) -D -m0755 initramfs/hook	$(DESTDIR)/usr/share/initramfs-tools/hooks/bcache
 	$(INSTALL) -D -m0755 initcpio/install	$(DESTDIR)/usr/lib/initcpio/install/bcache
 	$(INSTALL) -D -m0755 dracut/module-setup.sh $(DESTDIR)$(DRACUTLIBDIR)/modules.d/90bcache/module-setup.sh
+	$(INSTALL) -D -m0644 bcache.conf $(DESTDIR)/etc/bcache/
+	$(INSTALL) -D -m0644 60-bcache.rules $(DESTDIR)$(UDEVLIBDIR)/rules.d/
 #	$(INSTALL) -m0755 bcache-test $(DESTDIR)${PREFIX}/sbin/
 
 clean:
bcache-loader new file +107 -0

107 lines not on this page · raw message

bcache.conf new file +6 -0
new file mode 100644
index 0000000..438fc39
@@ -0,0 +1,6 @@
+# /etc/bcache/bcache.conf
+cache_devices:
+  - device: /dev/sdc
+    backing_devices:
+      - device: /dev/sdb
+      - device: /dev/sdd
make.c +204 -109

376 lines not on this page · raw message

Signature · 18 lines
2.25.1


-- 







The contents of this email are confidential. If the reader of this 
message is not the intended recipient, you are hereby notified that any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please notify 
us immediately by replying to this message and deleting it from your 
computer. Thank you. Devo, Inc; [email protected] <mailto:[email protected]>;  
Calle Estébanez Calderón 3-5, 5th Floor. Madrid, Spain 28020