1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 11_fix_alpha_s390x.dpatch by Julian Andres Klode <jak@jak-linux.org>
4
## DP: Fix FTBFS of the modules on s390x and alpha (Closes: #494447)
5
## DP: This patch has been provided by upstream.
6
## DP: See http://article.gmane.org/gmane.linux.file-systems.aufs.user/1350
9
diff -urNad aufs-0+20080719~/Kconfig.in aufs-0+20080719/Kconfig.in
10
--- aufs-0+20080719~/Kconfig.in 2008-06-30 05:47:43.000000000 +0200
11
+++ aufs-0+20080719/Kconfig.in 2008-08-16 18:53:57.000000000 +0200
13
depends on EXPORTFS = m && AUFS = y
16
+/* automatic configuration for internal use */
18
+ bool /* never appear on the menu */
19
+ /* typedef unsigned long/int __kernel_ino_t */
20
+ /* alpha and s390x are int */
21
+ depends on 64BIT && !(ALPHA || S390)
25
bool "Aufs as an readonly branch of another aufs mount"
27
diff -urNad aufs-0+20080719~/fs/aufs25/branch.h aufs-0+20080719/fs/aufs25/branch.h
28
--- aufs-0+20080719~/fs/aufs25/branch.h 2008-07-14 02:14:00.000000000 +0200
29
+++ aufs-0+20080719/fs/aufs25/branch.h 2008-08-16 18:53:57.000000000 +0200
31
unsigned long long xi_size; /* s_maxbytes */
34
- u64 xi_upper; /* watermark in bytes */
35
- u64 xi_step; /* to next watermark in bytes */
36
+ unsigned long long xi_upper; /* watermark in bytes */
37
+ unsigned long long xi_step; /* to next watermark in bytes */
40
blkcnt_t xi_upper; /* watermark in blocks */
46
+ unsigned long long br_bytes;
49
/* an entry under sysfs per mount-point */
50
diff -urNad aufs-0+20080719~/fs/aufs25/cpup.c aufs-0+20080719/fs/aufs25/cpup.c
51
--- aufs-0+20080719~/fs/aufs25/cpup.c 2008-07-14 02:14:12.000000000 +0200
52
+++ aufs-0+20080719/fs/aufs25/cpup.c 2008-08-16 18:53:57.000000000 +0200
54
struct dentry *d, *parent, *h_parent, *gparent, *real_parent;
56
LKTRTrace("%.*s, b%d, parent i%lu, locked %p\n",
57
- AuDLNPair(dentry), bdst, parent_ino(dentry), locked);
58
+ AuDLNPair(dentry), bdst, (unsigned long)parent_ino(dentry),
61
AuDebugOn(au_test_ro(sb, bdst, NULL));
63
diff -urNad aufs-0+20080719~/fs/aufs25/debug.c aufs-0+20080719/fs/aufs25/debug.c
64
--- aufs-0+20080719~/fs/aufs25/debug.c 2008-07-14 02:14:22.000000000 +0200
65
+++ aufs-0+20080719/fs/aufs25/debug.c 2008-08-16 18:53:57.000000000 +0200
67
inode->i_ino, inode->i_sb ? au_sbtype(inode->i_sb) : "??",
68
atomic_read(&inode->i_count), inode->i_nlink, inode->i_mode,
70
- i_size_read(inode), (u64)inode->i_blocks,
71
- timespec_to_ns(&inode->i_ctime) & 0x0ffff,
72
+ i_size_read(inode), (unsigned long long)inode->i_blocks,
73
+ (long long)timespec_to_ns(&inode->i_ctime) & 0x0ffff,
74
inode->i_mapping ? inode->i_mapping->nrpages : 0,
75
inode->i_state, inode->i_flags, inode->i_generation,
76
l ? ", wh " : "", l, n);
77
diff -urNad aufs-0+20080719~/fs/aufs25/export.c aufs-0+20080719/fs/aufs25/export.c
78
--- aufs-0+20080719~/fs/aufs25/export.c 2008-07-14 02:14:48.000000000 +0200
79
+++ aufs-0+20080719/fs/aufs25/export.c 2008-08-16 18:53:57.000000000 +0200
84
-#if BITS_PER_LONG == 32
87
+#ifdef CONFIG_AUFS_INO_T_64
98
-#if BITS_PER_LONG == 64
99
+#ifdef CONFIG_AUFS_INO_T_64
107
-#if BITS_PER_LONG == 64
108
+#ifdef CONFIG_AUFS_INO_T_64
116
-#if BITS_PER_LONG == 64
117
+#ifdef CONFIG_AUFS_INO_T_64
118
/* support 64bit inode number */
122
struct dentry *dentry, *parent;
125
- LKTRTrace("i%lu, diri%lu\n", ino, dir_ino);
126
+ LKTRTrace("i%lu, diri%lu\n",
127
+ (unsigned long)ino, (unsigned long)dir_ino);
130
inode = ilookup(sb, ino);
135
- LKTRTrace("i%lu, diri%lu\n", ino, dir_ino);
136
+ LKTRTrace("i%lu, diri%lu\n",
137
+ (unsigned long)ino, (unsigned long)dir_ino);
140
dir = ilookup(sb, dir_ino);
141
diff -urNad aufs-0+20080719~/fs/aufs25/hinotify.c aufs-0+20080719/fs/aufs25/hinotify.c
142
--- aufs-0+20080719~/fs/aufs25/hinotify.c 2008-07-14 02:15:33.000000000 +0200
143
+++ aufs-0+20080719/fs/aufs25/hinotify.c 2008-08-16 18:53:57.000000000 +0200
145
struct au_xino_entry xinoe;
148
- LKTRTrace("b%d, hi%lu\n", bindex, h_ino);
149
+ LKTRTrace("b%d, hi%lu\n", bindex, (unsigned long)h_ino);
150
AuDebugOn(!au_opt_test_xino(au_mntflags(sb)));
153
diff -urNad aufs-0+20080719~/fs/aufs25/inode.c aufs-0+20080719/fs/aufs25/inode.c
154
--- aufs-0+20080719~/fs/aufs25/inode.c 2008-07-14 02:16:33.000000000 +0200
155
+++ aufs-0+20080719/fs/aufs25/inode.c 2008-08-16 18:53:57.000000000 +0200
160
- LKTRTrace("i%lu\n", xinoe.ino);
161
+ LKTRTrace("i%lu\n", (unsigned long)xinoe.ino);
162
inode = au_iget_locked(sb, xinoe.ino);
163
err = PTR_ERR(inode);
166
AuWarn1("Un-notified UDBA or repeatedly renamed dir,"
167
" b%d, %s, %.*s, hi%lu, i%lu.\n",
168
bstart, au_sbtype(h_dentry->d_sb), AuDLNPair(dentry),
170
+ (unsigned long)h_ino, (unsigned long)xinoe.ino);
172
err = au_xino_write0(sb, bstart, h_ino, 0);
174
diff -urNad aufs-0+20080719~/fs/aufs25/module.c aufs-0+20080719/fs/aufs25/module.c
175
--- aufs-0+20080719~/fs/aufs25/module.c 2008-07-14 02:16:58.000000000 +0200
176
+++ aufs-0+20080719/fs/aufs25/module.c 2008-08-16 18:53:57.000000000 +0200
181
+#ifdef CONFIG_AUFS_INO_T_64
182
+ BUILD_BUG_ON(sizeof(ino_t) != sizeof(long long));
184
+ BUILD_BUG_ON(sizeof(ino_t) != sizeof(int));
188
for (i = 1; i <= ' '; i++)
189
diff -urNad aufs-0+20080719~/fs/aufs25/opts.c aufs-0+20080719/fs/aufs25/opts.c
190
--- aufs-0+20080719~/fs/aufs25/opts.c 2008-07-14 02:17:09.000000000 +0200
191
+++ aufs-0+20080719/fs/aufs25/opts.c 2008-08-16 18:53:57.000000000 +0200
193
struct au_opt_wbr_create *create)
197
+ unsigned long long ull;
200
if (!au_match_ull(arg, &ull, 0))
201
diff -urNad aufs-0+20080719~/fs/aufs25/opts.h aufs-0+20080719/fs/aufs25/opts.h
202
--- aufs-0+20080719~/fs/aufs25/opts.h 2008-06-16 02:14:28.000000000 +0200
203
+++ aufs-0+20080719/fs/aufs25/opts.h 2008-08-16 18:53:57.000000000 +0200
204
@@ -150,14 +150,14 @@
207
struct au_opt_xino_trunc_v {
210
+ unsigned long long upper;
214
struct au_opt_wbr_create {
217
- u64 mfsrr_watermark;
220
+ unsigned long long mfsrr_watermark;
224
diff -urNad aufs-0+20080719~/fs/aufs25/super.c aufs-0+20080719/fs/aufs25/super.c
225
--- aufs-0+20080719~/fs/aufs25/super.c 2008-07-14 02:14:48.000000000 +0200
226
+++ aufs-0+20080719/fs/aufs25/super.c 2008-08-16 18:53:57.000000000 +0200
231
- LKTRTrace("i%lu\n", ino);
232
+ LKTRTrace("i%lu\n", (unsigned long)ino);
234
inode = iget_locked(sb, ino);
235
if (unlikely(!inode)) {
236
diff -urNad aufs-0+20080719~/fs/aufs25/super.h aufs-0+20080719/fs/aufs25/super.h
237
--- aufs-0+20080719~/fs/aufs25/super.h 2008-07-14 02:17:23.000000000 +0200
238
+++ aufs-0+20080719/fs/aufs25/super.h 2008-08-16 18:53:57.000000000 +0200
240
unsigned long mfs_expire;
241
aufs_bindex_t mfs_bindex;
244
- u64 mfsrr_watermark;
245
+ unsigned long long mfsrr_bytes;
246
+ unsigned long long mfsrr_watermark;
249
/* sbinfo status flags */
250
diff -urNad aufs-0+20080719~/fs/aufs25/vdir.c aufs-0+20080719/fs/aufs25/vdir.c
251
--- aufs-0+20080719~/fs/aufs25/vdir.c 2008-06-30 05:50:21.000000000 +0200
252
+++ aufs-0+20080719/fs/aufs25/vdir.c 2008-08-16 18:53:57.000000000 +0200
254
union au_vdir_deblk_p p, *room, deblk_end;
255
struct au_vdir_dehstr *dehstr;
257
- LKTRTrace("%.*s %d, i%lu, dt%u\n", namelen, name, namelen, ino, d_type);
258
+ LKTRTrace("%.*s %d, i%lu, dt%u\n",
259
+ namelen, name, namelen, (unsigned long)ino, d_type);
261
p.deblk = last_deblk(vdir);
262
deblk_end.deblk = p.deblk + 1;
266
LKTRTrace("%.*s, namelen %d, i%llu, dt%u\n",
267
- namelen, name, namelen, (u64)h_ino, d_type);
268
+ namelen, name, namelen, (unsigned long long)h_ino, d_type);
270
sb = arg->file->f_dentry->d_sb;
273
&& (inode->i_version != vdir->vd_version
274
|| time_after(jiffies, vdir->vd_jiffy + expire))) {
275
LKTRTrace("iver %llu, vdver %lu, exp %lu\n",
276
- inode->i_version, vdir->vd_version,
277
- vdir->vd_jiffy + expire);
278
+ (unsigned long long)inode->i_version,
279
+ vdir->vd_version, vdir->vd_jiffy + expire);
281
err = reinit_vdir(vdir);
284
de = vdir_cache->vd_last.p.de;
285
LKTRTrace("%.*s, off%lld, i%lu, dt%d\n",
286
de->de_str.len, de->de_str.name,
287
- file->f_pos, de->de_ino, de->de_type);
288
+ file->f_pos, (unsigned long)de->de_ino,
290
err = filldir(dirent, de->de_str.name, de->de_str.len,
291
file->f_pos, de->de_ino, de->de_type);
293
diff -urNad aufs-0+20080719~/fs/aufs25/wbr_policy.c aufs-0+20080719/fs/aufs25/wbr_policy.c
294
--- aufs-0+20080719~/fs/aufs25/wbr_policy.c 2008-07-07 03:12:39.000000000 +0200
295
+++ aufs-0+20080719/fs/aufs25/wbr_policy.c 2008-08-16 18:53:57.000000000 +0200
297
aufs_bindex_t bindex, bend;
301
+ unsigned long long b, bavail;
303
struct au_branch *br;
304
struct au_wbr_mfs *mfs;
306
struct dentry *parent, *h_parent;
307
aufs_bindex_t bindex, bstart, bend;
308
struct au_branch *br;
310
+ unsigned long long b;
313
LKTRTrace("%.*s, %d\n", AuDLNPair(dentry), isdir);
314
diff -urNad aufs-0+20080719~/fs/aufs25/xino.c aufs-0+20080719/fs/aufs25/xino.c
315
--- aufs-0+20080719~/fs/aufs25/xino.c 2008-07-14 02:17:57.000000000 +0200
316
+++ aufs-0+20080719/fs/aufs25/xino.c 2008-08-16 18:53:57.000000000 +0200
320
if (unlikely(Au_LOFF_MAX / sizeof(*xinoe) - 1 < pos)) {
321
- AuIOErr1("too large hi%lu\n", h_ino);
322
+ AuIOErr1("too large hi%lu\n", (unsigned long)h_ino);
325
pos *= sizeof(*xinoe);
327
struct au_branch *br;
328
unsigned int mnt_flags;
330
- LKTRTrace("b%d, hi%lu, i%lu\n", bindex, h_ino, xinoe->ino);
331
+ LKTRTrace("b%d, hi%lu, i%lu\n",
332
+ bindex, (unsigned long)h_ino, (unsigned long)xinoe->ino);
333
BUILD_BUG_ON(sizeof(long long) != sizeof(Au_LOFF_MAX)
334
|| ((loff_t)-1) > 0);
340
- LKTRTrace("b%d, hi%lu, i%lu\n", bindex, h_ino, ino);
341
+ LKTRTrace("b%d, hi%lu, i%lu\n",
342
+ bindex, (unsigned long)h_ino, (unsigned long)ino);
344
if (unlikely(!au_opt_test_xino(au_mntflags(sb))))
347
pindex = sbinfo->si_xib_last_pindex;
348
mutex_unlock(&sbinfo->si_xib_mtx);
349
ino = xib_calc_ino(pindex, free_bit);
350
- LKTRTrace("i%lu\n", ino);
351
+ LKTRTrace("i%lu\n", (unsigned long)ino);
354
mutex_unlock(&sbinfo->si_xib_mtx);
357
struct au_sbinfo *sbinfo;
359
- LKTRTrace("b%d, hi%lu\n", bindex, h_ino);
360
+ LKTRTrace("b%d, hi%lu\n", bindex, (unsigned long)h_ino);
363
if (unlikely(!au_opt_test_xino(au_mntflags(sb))))
367
if (unlikely(Au_LOFF_MAX / sizeof(*xinoe) - 1 < pos)) {
368
- AuIOErr1("too large hi%lu\n", h_ino);
369
+ AuIOErr1("too large hi%lu\n", (unsigned long)h_ino);
372
pos *= sizeof(*xinoe);