From: Rolf Fokkens <rolf-6w2rdlBuEQTpMFipWq+H6g@public.gmane.org>
To: linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Updated package for Fedora
Date: Tue, 10 Sep 2013 20:22:21 +0200 [thread overview]
Message-ID: <522F635D.4030905@rolffokkens.nl> (raw)
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
next reply other threads:[~2013-09-10 18:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-10 18:22 Rolf Fokkens [this message]
[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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=522F635D.4030905@rolffokkens.nl \
--to=rolf-6w2rdlbueqtpmfipwq+h6g@public.gmane.org \
--cc=linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).