Merge lp:~logan/ubuntu/raring/zfs-fuse/debian-merge into lp:ubuntu/raring/zfs-fuse

Proposed by Logan Rosen
Status: Merged
Merged at revision: 15
Proposed branch: lp:~logan/ubuntu/raring/zfs-fuse/debian-merge
Merge into: lp:ubuntu/raring/zfs-fuse
Diff against target: 246 lines (+161/-1)
11 files modified
.pc/.quilt_patches (+1/-0)
.pc/.quilt_series (+1/-0)
.pc/applied-patches (+3/-0)
debian/changelog (+24/-0)
debian/docs (+2/-0)
debian/patches/flush.patch (+21/-0)
debian/patches/hanoi.cron.daily.patch (+77/-0)
debian/patches/series (+3/-0)
debian/patches/zfs-fuse.automated.scrub.cron.d.patch (+19/-0)
debian/zfs-fuse.init (+6/-1)
src/lib/libzpool/flushwc.c (+4/-0)
To merge this branch: bzr merge lp:~logan/ubuntu/raring/zfs-fuse/debian-merge
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Ubuntu branches Pending
Review via email: mp+140320@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Looking good and building fine. Nice work! :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '.pc/.quilt_patches'
2--- .pc/.quilt_patches 1970-01-01 00:00:00 +0000
3+++ .pc/.quilt_patches 2012-12-17 23:05:53 +0000
4@@ -0,0 +1,1 @@
5+debian/patches
6
7=== added file '.pc/.quilt_series'
8--- .pc/.quilt_series 1970-01-01 00:00:00 +0000
9+++ .pc/.quilt_series 2012-12-17 23:05:53 +0000
10@@ -0,0 +1,1 @@
11+series
12
13=== modified file '.pc/applied-patches'
14--- .pc/applied-patches 2012-06-14 12:02:37 +0000
15+++ .pc/applied-patches 2012-12-17 23:05:53 +0000
16@@ -7,3 +7,6 @@
17 fix-segfault.patch
18 fix-ec_atomic_cas.patch
19 fix-malloc-for-newer-glibc.patch
20+zfs-fuse.automated.scrub.cron.d.patch
21+hanoi.cron.daily.patch
22+flush.patch
23
24=== modified file 'debian/changelog'
25--- debian/changelog 2012-06-14 12:02:37 +0000
26+++ debian/changelog 2012-12-17 23:05:53 +0000
27@@ -1,3 +1,27 @@
28+zfs-fuse (0.7.0-10ubuntu1) raring; urgency=low
29+
30+ * Merge from Debian unstable. Remaining changes:
31+ - debian/patches/fix-malloc-for-newer-glibc.patch: Newer GLibC changes the
32+ way __malloc_initialize_hook is initialized, so patch malloc.c
33+ accordingly. Fixes FTBFS.
34+
35+ -- Logan Rosen <logatronico@gmail.com> Mon, 17 Dec 2012 17:52:00 -0500
36+
37+zfs-fuse (0.7.0-10) unstable; urgency=low
38+
39+ * Fix "issues forbidden SG_IO ioctl on partitions" (Closes: #657166)
40+
41+ -- Asias He <asias.hejun@gmail.com> Fri, 31 Aug 2012 15:30:05 +0800
42+
43+zfs-fuse (0.7.0-9) unstable; urgency=low
44+
45+ * Fix "automated monthly scrubs" (Closes: #650955)
46+ * Fix "Automated ZFS snapshots using Hanoi algorithm" (Closes: #651873)
47+ * Fix "/proc/$pid/oom_adj is deprecated, please use
48+ /proc/$pid/oom_score_adj instead." issue
49+
50+ -- Asias He <asias.hejun@gmail.com> Fri, 17 Aug 2012 11:50:57 +0800
51+
52 zfs-fuse (0.7.0-8ubuntu1) quantal; urgency=low
53
54 * Newer GLibC changes the way __malloc_initialize_hook is initialized,
55
56=== modified file 'debian/docs'
57--- debian/docs 2011-09-18 19:16:36 +0000
58+++ debian/docs 2012-12-17 23:05:53 +0000
59@@ -5,3 +5,5 @@
60 TESTING
61 TODO
62 contrib/zfs_pool_alert
63+contrib/zfs-fuse.automated.scrub.cron.d
64+contrib/hanoi.cron.daily
65
66=== added file 'debian/patches/flush.patch'
67--- debian/patches/flush.patch 1970-01-01 00:00:00 +0000
68+++ debian/patches/flush.patch 2012-12-17 23:05:53 +0000
69@@ -0,0 +1,21 @@
70+diff --git a/src/lib/libzpool/flushwc.c b/src/lib/libzpool/flushwc.c
71+index 344a61f..d625db2 100644
72+--- a/src/lib/libzpool/flushwc.c
73++++ b/src/lib/libzpool/flushwc.c
74+@@ -130,12 +130,16 @@ static int flushATAwc(int fd) {
75+ */
76+ int flushwc(vnode_t *vn) {
77+ int major_number;
78++ int minor_number;
79+
80+ if(!S_ISBLK(vn->v_stat.st_mode))
81+ // We can only flush the write cache of a block device.
82+ return ENOTSUP;
83+
84+ major_number = major(vn->v_stat.st_rdev);
85++ minor_number = minor(vn->v_stat.st_rdev);
86++ if (minor_number % 16 != 0)
87++ return ENOTSUP;
88+
89+ switch(major_number) {
90+ case SCSI_DISK0_MAJOR:
91
92=== added file 'debian/patches/hanoi.cron.daily.patch'
93--- debian/patches/hanoi.cron.daily.patch 1970-01-01 00:00:00 +0000
94+++ debian/patches/hanoi.cron.daily.patch 2012-12-17 23:05:53 +0000
95@@ -0,0 +1,77 @@
96+diff --git a/contrib/hanoi.cron.daily b/contrib/hanoi.cron.daily
97+new file mode 100644
98+index 0000000..a92b021
99+--- /dev/null
100++++ b/contrib/hanoi.cron.daily
101+@@ -0,0 +1,68 @@
102++#!/bin/bash
103++
104++# This algorithm implements a variation of the Towers of Hanoi rotation method
105++# (see http://en.wikipedia.org/wiki/Backup_rotation_scheme#Towers_of_Hanoi).
106++#
107++# Unlike traditional ToH rotation, which uses a finite set of physical tapes,
108++# we operate on a set of snapshots whose size doesn't necessarily have to be
109++# bounded. Note that the number of snapshots only grows logarithmically with
110++# time, which makes it very hard to fill your hard disk (even when running
111++# unbounded).
112++#
113++# The result is that once we've run this for long enough, we'll find that for
114++# recent dates (e.g. last few days) almost all snapshots are available, and the
115++# older the date we're searching the more spread available snapshots will be.
116++
117++set -e
118++
119++. /etc/default/zfs
120++
121++# Does $1 belong to class $2 ?
122++isclass ()
123++{
124++ if [ "$2" == "$AUTOSNAP_MAX_SNAPSHOTS" ] ; then
125++ # Special-case. Treat all snapshots as if they belong to
126++ # this class (in addition to their real class).
127++ return 0
128++ fi
129++ local remainder=$((2 ** ($2 - 1)))
130++ local divisor=$((${remainder} * 2))
131++ [ $(($1 % ${divisor})) == ${remainder} ]
132++}
133++
134++classify ()
135++{
136++ local creation="$1"
137++ local creation_in_days="$(($(LANG=C date +%s -d "@${creation}") / 86400))"
138++ local class="1"
139++ # Find the class ${creation_in_days} belongs to.
140++ while ! isclass "${creation_in_days}" "${class}" ; do
141++ class=$((${class}+1))
142++ done
143++ echo "${class}"
144++}
145++
146++for fs in $AUTOSNAP_FILESYSTEMS ; do
147++ # Create today's snapshot.
148++ echo zfs snapshot ${fs}@autosnap-$(date +%F)
149++ zfs snapshot ${fs}@autosnap-$(date +%F)
150++
151++ # Remove any snapshots in the same class as today's addition.
152++ LANG=C zfs list -r ${fs} -t snapshot -H -o name,creation \
153++ | grep @autosnap- \
154++ | while read name creation_human ; do
155++ creation="$(LANG=C date +%s -d "${creation_human}")"
156++ echo "$(classify "${creation}") ${creation} ${name}"
157++ done \
158++ | sort -nr \
159++ | while read class creation name ; do
160++ echo ${class} ${name}
161++ if [ ${class} == "${previous_class}" ] ; then
162++ echo zfs destroy "${name}"
163++ zfs destroy "${name}"
164++ fi
165++ previous_class="${class}"
166++ done
167++done
168++
169++exit 0
170+--
171+1.7.10.4
172+
173
174=== modified file 'debian/patches/series'
175--- debian/patches/series 2012-06-14 12:02:37 +0000
176+++ debian/patches/series 2012-12-17 23:05:53 +0000
177@@ -7,3 +7,6 @@
178 fix-segfault.patch
179 fix-ec_atomic_cas.patch
180 fix-malloc-for-newer-glibc.patch
181+zfs-fuse.automated.scrub.cron.d.patch
182+hanoi.cron.daily.patch
183+flush.patch
184
185=== added file 'debian/patches/zfs-fuse.automated.scrub.cron.d.patch'
186--- debian/patches/zfs-fuse.automated.scrub.cron.d.patch 1970-01-01 00:00:00 +0000
187+++ debian/patches/zfs-fuse.automated.scrub.cron.d.patch 2012-12-17 23:05:53 +0000
188@@ -0,0 +1,19 @@
189+diff --git a/contrib/zfs-fuse.automated.scrub.cron.d b/contrib/zfs-fuse.automated.scrub.cron.d
190+new file mode 100644
191+index 0000000..29f8d36
192+--- /dev/null
193++++ b/contrib/zfs-fuse.automated.scrub.cron.d
194+@@ -0,0 +1,10 @@
195++#
196++# Copyright © martin f. krafft <madduck@madduck.net>
197++# distributed under the terms of the Artistic Licence 2.0
198++#
199++
200++# By default, run at 00:57 on every Sunday, but do nothing unless the day of
201++# the month is less than or equal to 7. Thus, only run on the first Sunday of
202++# each month. crontab(5) sucks, unfortunately, in this regard; therefore this
203++# hack (see #380425).
204++57 0 * * 0 root if [ $(date +\%d) -le 7 ]; then zpool list -H -o name | xargs zpool scrub; fi
205+--
206+1.7.10.4
207+
208
209=== modified file 'debian/zfs-fuse.init'
210--- debian/zfs-fuse.init 2012-06-05 09:34:39 +0000
211+++ debian/zfs-fuse.init 2012-12-17 23:05:53 +0000
212@@ -116,7 +116,12 @@
213 then
214 log_end_msg 0
215 log_action_begin_msg "Immunizing $NAME against OOM kills and sendsigs signals"
216- echo -17 > /proc/$(cat /var/run/$NAME.pid)/oom_adj
217+ if [ -f "/proc/$(cat /var/run/$NAME.pid)/oom_score_adj" ]
218+ then
219+ echo -1000 > "/proc/$(cat /var/run/$NAME.pid)/oom_score_adj"
220+ else
221+ echo -17 > "/proc/$(cat /var/run/$NAME.pid)/oom_adj"
222+ fi
223 ES_TO_REPORT=$?
224 if [ "$ES_TO_REPORT" = 0 ] ; then
225 log_action_end_msg 0
226
227=== modified file 'src/lib/libzpool/flushwc.c'
228--- src/lib/libzpool/flushwc.c 2011-09-18 19:16:36 +0000
229+++ src/lib/libzpool/flushwc.c 2012-12-17 23:05:53 +0000
230@@ -130,12 +130,16 @@
231 */
232 int flushwc(vnode_t *vn) {
233 int major_number;
234+ int minor_number;
235
236 if(!S_ISBLK(vn->v_stat.st_mode))
237 // We can only flush the write cache of a block device.
238 return ENOTSUP;
239
240 major_number = major(vn->v_stat.st_rdev);
241+ minor_number = minor(vn->v_stat.st_rdev);
242+ if (minor_number % 16 != 0)
243+ return ENOTSUP;
244
245 switch(major_number) {
246 case SCSI_DISK0_MAJOR:

Subscribers

People subscribed via source and target branches

to all changes: