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

« back to all changes in this revision

Viewing changes to fs/aufs25/debug.c

  • 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:
19
19
/*
20
20
 * debug print functions
21
21
 *
22
 
 * $Id: debug.c,v 1.4 2008/06/02 02:37:28 sfjro Exp $
 
22
 * $Id: debug.c,v 1.8 2008/07/14 00:14:22 sfjro Exp $
23
23
 */
24
24
 
25
25
#include "aufs.h"
245
245
             "%s, flags 0x%lx, cnt(BIAS) %d, active %d, xino %d\n",
246
246
             bindex, br->br_perm, au_br_count(br),
247
247
             au_sbtype(sb), sb->s_flags, sb->s_count - S_BIAS,
248
 
             atomic_read(&sb->s_active), !!br->br_xino);
 
248
             atomic_read(&sb->s_active), !!br->br_xino.xi_file);
249
249
        return 0;
250
250
}
251
251
 
254
254
        struct au_sbinfo *sbinfo;
255
255
        aufs_bindex_t bindex;
256
256
        int err;
257
 
        struct vfsmount mnt = { .mnt_sb = sb };
258
 
        struct au_branch fake = {
259
 
                .br_perm = 0,
260
 
                .br_mnt = &mnt,
261
 
                .br_count = ATOMIC_INIT(0),
262
 
                .br_xino = NULL
263
 
        };
264
 
 
265
 
        atomic_set(&fake.br_count, 0);
 
257
        /* to reuduce stack size */
 
258
        struct {
 
259
                struct vfsmount mnt;
 
260
                struct au_branch fake;
 
261
        } *a;
 
262
 
 
263
        /* this function can be called from magic sysrq */
 
264
        a = kzalloc(sizeof(*a), GFP_ATOMIC);
 
265
        if (unlikely(!a)) {
 
266
                dpri("no memory\n");
 
267
                return;
 
268
        }
 
269
 
 
270
        a->mnt.mnt_sb = sb;
 
271
        a->fake.br_perm = 0;
 
272
        a->fake.br_mnt = &a->mnt;
 
273
        a->fake.br_xino.xi_file = NULL;
 
274
        atomic_set(&a->fake.br_count, 0);
266
275
        smp_mb(); /* atomic_set */
267
 
        err = do_pri_br(-1, &fake);
 
276
        err = do_pri_br(-1, &a->fake);
 
277
        kfree(a);
268
278
        dpri("dev 0x%x\n", sb->s_dev);
269
279
        if (err || !au_test_aufs(sb))
270
280
                return;
303
313
#ifdef ForceNoRefrof
304
314
        au_opt_clr(sbinfo->si_mntflags, REFROF);
305
315
#endif
 
316
#ifdef ForceShwh
 
317
        au_opt_set(sbinfo->si_mntflags, SHWH);
 
318
#endif
306
319
}
307
320
 
308
321
int __init au_debug_init(void)
320
333
        AuWarn("CONFIG_4KSTACKS is defined.\n");
321
334
#endif
322
335
 
 
336
#ifdef ForceBrs
 
337
        sysaufs_brs = 1;
 
338
#endif
 
339
 
323
340
#if 0 /* verbose debug */
324
341
        {
325
342
                union {