~ubuntu-branches/ubuntu/vivid/aufs/vivid

« back to all changes in this revision

Viewing changes to debian/patches/11_fix_alpha_s390x.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Julian Andres Klode
  • Date: 2008-08-21 14:58:54 UTC
  • mfrom: (1.1.8 upstream) (4.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080821145854-4b49x09r4zmvlk5o
Tags: 0+20080719-4
01_vserver_apparmor.dpatch: [UPDATE] Disable vserver patches on kernel 
2.6.26, because they are not needed anymore. (Closes: #495921)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 11_fix_alpha_s390x.dpatch by Julian Andres Klode <jak@jak-linux.org>
 
3
##
 
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
 
7
 
 
8
@DPATCH@
 
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
 
12
@@ -120,6 +120,14 @@
 
13
        depends on EXPORTFS = m && AUFS = y
 
14
 #endif
 
15
 
 
16
+/* automatic configuration for internal use */
 
17
+config AUFS_INO_T_64
 
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)
 
22
+       default y
 
23
+
 
24
 config AUFS_ROBR
 
25
        bool "Aufs as an readonly branch of another aufs mount"
 
26
        help
 
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
 
30
@@ -59,8 +59,8 @@
 
31
        unsigned long long      xi_size;         /* s_maxbytes */
 
32
 
 
33
        /* truncation */
 
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 */
 
38
 
 
39
        /* truncation */
 
40
        blkcnt_t                xi_upper;       /* watermark in blocks */
 
41
@@ -93,7 +93,7 @@
 
42
 #endif
 
43
 
 
44
        /* mfs mode */
 
45
-       u64                     br_bytes;
 
46
+       unsigned long long      br_bytes;
 
47
 
 
48
 #ifdef CONFIG_SYSFS
 
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
 
53
@@ -954,7 +954,8 @@
 
54
        struct dentry *d, *parent, *h_parent, *gparent, *real_parent;
 
55
 
 
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),
 
59
+                 locked);
 
60
        sb = dentry->d_sb;
 
61
        AuDebugOn(au_test_ro(sb, bdst, NULL));
 
62
        err = 0;
 
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
 
66
@@ -98,8 +98,8 @@
 
67
             inode->i_ino, inode->i_sb ? au_sbtype(inode->i_sb) : "??",
 
68
             atomic_read(&inode->i_count), inode->i_nlink, inode->i_mode,
 
69
             ntfy,
 
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
 
80
@@ -27,10 +27,10 @@
 
81
 #include "aufs.h"
 
82
 
 
83
 union conv {
 
84
-#if BITS_PER_LONG == 32
 
85
-       __u32 a[1];
 
86
-#else
 
87
+#ifdef CONFIG_AUFS_INO_T_64
 
88
        __u32 a[2];
 
89
+#else
 
90
+       __u32 a[1];
 
91
 #endif
 
92
        ino_t ino;
 
93
 };
 
94
@@ -40,7 +40,7 @@
 
95
        union conv u;
 
96
 
 
97
        u.a[0] = a[0];
 
98
-#if BITS_PER_LONG == 64
 
99
+#ifdef CONFIG_AUFS_INO_T_64
 
100
        u.a[1] = a[1];
 
101
 #endif
 
102
        return u.ino;
 
103
@@ -52,7 +52,7 @@
 
104
 
 
105
        u.ino = ino;
 
106
        a[0] = u.a[0];
 
107
-#if BITS_PER_LONG == 64
 
108
+#ifdef CONFIG_AUFS_INO_T_64
 
109
        a[1] = u.a[1];
 
110
 #endif
 
111
 }
 
112
@@ -61,7 +61,7 @@
 
113
 enum {
 
114
        Fh_br_id,
 
115
        Fh_sigen,
 
116
-#if BITS_PER_LONG == 64
 
117
+#ifdef CONFIG_AUFS_INO_T_64
 
118
        /* support 64bit inode number */
 
119
        Fh_ino1,
 
120
        Fh_ino2,
 
121
@@ -96,7 +96,8 @@
 
122
        struct dentry *dentry, *parent;
 
123
        struct inode *inode;
 
124
 
 
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);
 
128
 
 
129
        dentry = NULL;
 
130
        inode = ilookup(sb, ino);
 
131
@@ -229,7 +230,8 @@
 
132
        struct file *file;
 
133
        int err;
 
134
 
 
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);
 
138
 
 
139
        dentry = NULL;
 
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
 
144
@@ -453,7 +453,7 @@
 
145
        struct au_xino_entry xinoe;
 
146
        int err;
 
147
 
 
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)));
 
151
 
 
152
        inode = NULL;
 
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
 
156
@@ -318,7 +318,7 @@
 
157
                }
 
158
        }
 
159
 
 
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);
 
164
        if (IS_ERR(inode))
 
165
@@ -347,7 +347,7 @@
 
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),
 
169
-                       h_ino, xinoe.ino);
 
170
+                       (unsigned long)h_ino, (unsigned long)xinoe.ino);
 
171
        xinoe.ino = 0;
 
172
        err = au_xino_write0(sb, bstart, h_ino, 0);
 
173
        if (!err) {
 
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
 
177
@@ -90,6 +90,11 @@
 
178
        char *p;
 
179
 
 
180
        au_debug_init();
 
181
+#ifdef CONFIG_AUFS_INO_T_64
 
182
+       BUILD_BUG_ON(sizeof(ino_t) != sizeof(long long));
 
183
+#else
 
184
+       BUILD_BUG_ON(sizeof(ino_t) != sizeof(int));
 
185
+#endif
 
186
 
 
187
        p = au_esc_chars;
 
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
 
192
@@ -310,7 +310,7 @@
 
193
                            struct au_opt_wbr_create *create)
 
194
 {
 
195
        int err;
 
196
-       u64 ull;
 
197
+       unsigned long long ull;
 
198
 
 
199
        err = 0;
 
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 @@
 
205
 };
 
206
 
 
207
 struct au_opt_xino_trunc_v {
 
208
-       u64             upper;
 
209
-       int             step;
 
210
+       unsigned long long      upper;
 
211
+       int                     step;
 
212
 };
 
213
 
 
214
 struct au_opt_wbr_create {
 
215
-       int wbr_create;
 
216
-       int mfs_second;
 
217
-       u64 mfsrr_watermark;
 
218
+       int                     wbr_create;
 
219
+       int                     mfs_second;
 
220
+       unsigned long long      mfsrr_watermark;
 
221
 };
 
222
 
 
223
 struct au_opt {
 
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
 
227
@@ -62,7 +62,7 @@
 
228
        struct inode *inode;
 
229
        int err;
 
230
 
 
231
-       LKTRTrace("i%lu\n", ino);
 
232
+       LKTRTrace("i%lu\n", (unsigned long)ino);
 
233
 
 
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
 
239
@@ -55,8 +55,8 @@
 
240
        unsigned long   mfs_expire;
 
241
        aufs_bindex_t   mfs_bindex;
 
242
 
 
243
-       u64             mfsrr_bytes;
 
244
-       u64             mfsrr_watermark;
 
245
+       unsigned long long      mfsrr_bytes;
 
246
+       unsigned long long      mfsrr_watermark;
 
247
 };
 
248
 
 
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
 
253
@@ -354,7 +354,8 @@
 
254
        union au_vdir_deblk_p p, *room, deblk_end;
 
255
        struct au_vdir_dehstr *dehstr;
 
256
 
 
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);
 
260
 
 
261
        p.deblk = last_deblk(vdir);
 
262
        deblk_end.deblk = p.deblk + 1;
 
263
@@ -489,7 +490,7 @@
 
264
        ino_t ino;
 
265
 
 
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);
 
269
 
 
270
        sb = arg->file->f_dentry->d_sb;
 
271
        bend = arg->bindex;
 
272
@@ -697,8 +698,8 @@
 
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);
 
280
                do_read = 1;
 
281
                err = reinit_vdir(vdir);
 
282
                if (unlikely(err))
 
283
@@ -907,7 +908,8 @@
 
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,
 
289
+                                 de->de_type);
 
290
                        err = filldir(dirent, de->de_str.name, de->de_str.len,
 
291
                                      file->f_pos, de->de_ino, de->de_type);
 
292
                        if (unlikely(err)) {
 
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
 
296
@@ -368,7 +368,7 @@
 
297
        aufs_bindex_t bindex, bend;
 
298
        int dlgt, err;
 
299
        struct kstatfs st;
 
300
-       u64 b, bavail;
 
301
+       unsigned long long b, bavail;
 
302
        void *arg;
 
303
        struct au_branch *br;
 
304
        struct au_wbr_mfs *mfs;
 
305
@@ -504,7 +504,7 @@
 
306
        struct dentry *parent, *h_parent;
 
307
        aufs_bindex_t bindex, bstart, bend;
 
308
        struct au_branch *br;
 
309
-       u64 b;
 
310
+       unsigned long long b;
 
311
        struct inode *h_dir;
 
312
 
 
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
 
317
@@ -231,7 +231,7 @@
 
318
 
 
319
        pos = h_ino;
 
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);
 
323
                return -EFBIG;
 
324
        }
 
325
        pos *= sizeof(*xinoe);
 
326
@@ -256,7 +256,8 @@
 
327
        struct au_branch *br;
 
328
        unsigned int mnt_flags;
 
329
 
 
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);
 
335
 
 
336
@@ -359,7 +360,8 @@
 
337
                .ino    = 0
 
338
        };
 
339
 
 
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);
 
343
 
 
344
        if (unlikely(!au_opt_test_xino(au_mntflags(sb))))
 
345
                return 0;
 
346
@@ -435,7 +437,7 @@
 
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);
 
352
        return ino;
 
353
  out_err:
 
354
        mutex_unlock(&sbinfo->si_xib_mtx);
 
355
@@ -457,7 +459,7 @@
 
356
        ssize_t sz;
 
357
        struct au_sbinfo *sbinfo;
 
358
 
 
359
-       LKTRTrace("b%d, hi%lu\n", bindex, h_ino);
 
360
+       LKTRTrace("b%d, hi%lu\n", bindex, (unsigned long)h_ino);
 
361
 
 
362
        xinoe->ino = 0;
 
363
        if (unlikely(!au_opt_test_xino(au_mntflags(sb))))
 
364
@@ -467,7 +469,7 @@
 
365
        sbinfo = au_sbi(sb);
 
366
        pos = h_ino;
 
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);
 
370
                return -EFBIG;
 
371
        }
 
372
        pos *= sizeof(*xinoe);