public inbox for linux-bcache@vger.kernel.org
 help / color / mirror / Atom feed
* bcache-tools: minor change for bcache-register
@ 2013-08-26  9:14 Rolf Fokkens
       [not found] ` <521B1C5E.2090007-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Rolf Fokkens @ 2013-08-26  9:14 UTC (permalink / raw)
  To: linux-bcache-u79uwXL29TY76Z2rM5mHXA

Hi!

bcache-register is called from the provided udev rules in bcache-tools. 
During boot it seams like some devices are registered multiple times, 
which results in messages during boot. To suppress these messages I 
redirect them to /dev/null in the following patch:

--- bcache-tools-20130820/bcache-register.register      2013-08-20 
22:03:46.000000000 +0200
+++ bcache-tools-20130820/bcache-register       2013-08-25 
21:31:11.707823194 +0200
@@ -1,4 +1,9 @@
  #!/bin/sh
-modprobe -qba bcache
-test -f /sys/fs/bcache/register && echo "$1" > /sys/fs/bcache/register
+#
+# Utility script to be called from udev, so it's not monkey proof at 
all. It's
+# sole purpose is to load the bcache kernel module whenever a bcache 
device is
+# detected.
+#
+/usr/sbin/modprobe -qba bcache
+test -f /sys/fs/bcache/register && echo "$1" > /sys/fs/bcache/register 
2>/dev/null

I can imagine there's a more elegant solution, suggestions are welcome.

Rolf

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-08-27 12:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-26  9:14 bcache-tools: minor change for bcache-register Rolf Fokkens
     [not found] ` <521B1C5E.2090007-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
2013-08-26 16:17   ` Darrick J. Wong
2013-08-26 16:31     ` Gabriel de Perthuis
2013-08-26 16:54       ` [PATCH] bcache: Downgrade "device already registered" to pr_debug Gabriel de Perthuis
2013-08-26 21:48       ` bcache-tools: minor change for bcache-register Kent Overstreet
2013-08-26 22:16         ` Gabriel de Perthuis
     [not found]           ` <521BD3C0.9070209-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-08-26 22:31             ` [PATCH] bcache: register_quiet should still report errors Gabriel de Perthuis
     [not found]               ` <1377556306-29938-1-git-send-email-g2p.code-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-08-26 22:37                 ` Gabriel de Perthuis
2013-08-26 21:41   ` bcache-tools: minor change for bcache-register Kent Overstreet
2013-08-27  6:58     ` Rolf Fokkens
     [not found]       ` <521C4E2B.8090008-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
2013-08-27 10:00         ` Alex Pyrgiotis
2013-08-27 11:45           ` Gabriel de Perthuis
2013-08-27 12:02             ` Rolf Fokkens
     [not found]               ` <521C9560.2020603-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
2013-08-27 12:11                 ` Gabriel de Perthuis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox