linux-bcache.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Updated package for Fedora
@ 2013-09-10 18:22 Rolf Fokkens
       [not found] ` <522F635D.4030905-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Rolf Fokkens @ 2013-09-10 18:22 UTC (permalink / raw)
  To: linux-bcache-u79uwXL29TY76Z2rM5mHXA

Hi!

I updated the Fedora 20 & rawhide package for bcache-tools:

https://admin.fedoraproject.org/updates/bcache-tools-0-0.11.20130909git.fc20

It's an update to the latest git / gist sources for bcache-tools an 
bcache-status. Some of the patches it includes to make it run on Fedora 
are explained below.

Rolf

bcache-tools-20130827-udevfix.patch
=======================
On Fedora only 'early' udev rules files run /usr/sbin/blkid and the rest 
of the rules files use the results. This patch removes the call to 
/usr/sbin/blkid and (more important) makes sure that probe-bcache does 
not print overlapping variable names. This is needed until util-linux 
itself supports bcache, after that there's no need to call  
probe-bcaches at all.

--- bcache-tools-20130827/61-bcache.rules.orig    2013-09-06 
08:54:07.656978850 +0200
+++ bcache-tools-20130827/61-bcache.rules    2013-09-06 
08:57:09.769768802 +0200
@@ -5,13 +5,12 @@
  ACTION=="remove", GOTO="bcache_end"

  # Backing devices: scan, symlink, register
-IMPORT{program}="/sbin/blkid -o udev $tempnode"
  # blkid and probe-bcache can disagree, in which case don't register
  ENV{ID_FS_TYPE}=="?*", ENV{ID_FS_TYPE}!="bcache", 
GOTO="bcache_backing_end"

  IMPORT{program}="/sbin/probe-bcache -o udev $tempnode"
-ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
-SUBSYSTEM=="block", ACTION=="add|change", ENV{ID_FS_TYPE}=="bcache", \
+ENV{BCACHE_ID_FS_UUID_ENC}=="?*", 
SYMLINK+="disk/by-uuid/$env{BCACHE_ID_FS_UUID_ENC}"
+SUBSYSTEM=="block", ACTION=="add|change", 
ENV{BCACHE_ID_FS_TYPE}=="bcache", \
          RUN+="bcache-register $tempnode"
  LABEL="bcache_backing_end"

--- bcache-tools-20130827/probe-bcache.c.orig    2013-09-06 
08:52:28.743089432 +0200
+++ bcache-tools-20130827/probe-bcache.c    2013-09-06 
08:53:44.046005241 +0200
@@ -61,9 +61,9 @@
          uuid_unparse(sb.uuid, uuid);

          if (udev)
-            printf("ID_FS_UUID=%s\n"
-                   "ID_FS_UUID_ENC=%s\n"
-                   "ID_FS_TYPE=bcache\n",
+            printf("BCACHE_ID_FS_UUID=%s\n"
+                   "BCACHE_ID_FS_UUID_ENC=%s\n"
+                   "BCACHE_ID_FS_TYPE=bcache\n",
                     uuid, uuid);
          else
              printf("%s: UUID=\"\" TYPE=\"bcache\"\n", uuid);



bcache-tools-20130827-register.patch
=======================
Fedora needs full path names to call /sbin/ binaries from udev, this is 
fixed in this patch. Also errors are suppressed when a device is 
registered twice.

--- bcache-tools-20130827.orig/bcache-register    2013-08-26 
23:46:19.000000000 +0200
+++ bcache-tools-20130827/bcache-register    2013-08-27 
08:49:59.924940825 +0200
@@ -1,4 +1,9 @@
  #!/bin/sh
-modprobe -qba bcache
-test -f /sys/fs/bcache/register_quiet && echo "$1" > 
/sys/fs/bcache/register_quiet
+#
+# 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.
+#
+/sbin/modprobe -qba bcache
+test -f /sys/fs/bcache/register_quiet && echo "$1" > 
/sys/fs/bcache/register_quiet 2>/dev/null

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

end of thread, other threads:[~2013-10-26 15:06 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-10 18:22 Updated package for Fedora Rolf Fokkens
     [not found] ` <522F635D.4030905-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
2013-09-14 11:42   ` bcache support in other linux packages Rolf Fokkens
     [not found]     ` <52344BAA.7070005-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
2013-09-26  9:56       ` bcache-tools and " Rolf Fokkens
     [not found]         ` <524404C9.3030103-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
2013-09-30 15:04           ` Rolf Fokkens
2013-09-30 15:39             ` Chris Murphy
2013-10-18  9:22           ` Piergiorgio Sartor
     [not found]             ` <20131018092234.GA18159-W+Wf6LxwHt0@public.gmane.org>
2013-10-18  9:56               ` Rolf Fokkens
2013-10-18 12:15                 ` Hans de Goede
     [not found]                 ` <CE86CB5C.BB96%rolf-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
2013-10-18 13:30                   ` Gabriel de Perthuis
     [not found]                     ` <5261380B.2020007-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-10-20 18:59                       ` Piergiorgio Sartor
     [not found]                         ` <20131020185937.GA18759-W+Wf6LxwHt0@public.gmane.org>
2013-10-21 12:34                           ` Rolf Fokkens
     [not found]                             ` <CE8AE869.BD62%rolf-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
2013-10-21 16:47                               ` Piergiorgio Sartor
2013-10-22 17:53                                 ` Rolf Fokkens
     [not found]                                   ` <5266BBA7.4070106-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
2013-10-23  2:01                                     ` Paul B. Henson
2013-10-26 15:04                                       ` Rolf Fokkens
2013-10-26 15:06                                     ` Rolf Fokkens
2013-10-18 15:57                 ` Reartes Guillermo
2013-10-19  7:59                   ` Rolf Fokkens
     [not found]                     ` <52623BE9.5070507-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
2013-10-23  1:36                       ` Paul B. Henson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).