super.c (63508b756443cb38e432dea01fec36248cb25cd7) | super.c (2b41226d7f4b3b836a2a3e4ce08ab18ba03f0cd0) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * bcachefs setup/teardown code, and some metadata io - read a superblock and 4 * figure out what to do with it. 5 * 6 * Copyright 2010, 2011 Kent Overstreet <kent.overstreet@gmail.com> 7 * Copyright 2012 Google, Inc. 8 */ --- 72 unchanged lines hidden (view full) --- 81 82const char * const bch2_fs_flag_strs[] = { 83#define x(n) #n, 84 BCH_FS_FLAGS() 85#undef x 86 NULL 87}; 88 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * bcachefs setup/teardown code, and some metadata io - read a superblock and 4 * figure out what to do with it. 5 * 6 * Copyright 2010, 2011 Kent Overstreet <kent.overstreet@gmail.com> 7 * Copyright 2012 Google, Inc. 8 */ --- 72 unchanged lines hidden (view full) --- 81 82const char * const bch2_fs_flag_strs[] = { 83#define x(n) #n, 84 BCH_FS_FLAGS() 85#undef x 86 NULL 87}; 88 |
89void __bch2_print(struct bch_fs *c, const char *fmt, ...) 90{ 91 struct log_output *output = c->output; 92 va_list args; 93 94 if (c->output_filter && c->output_filter != current) 95 output = NULL; 96 97 va_start(args, fmt); 98 if (likely(!output)) { 99 vprintk(fmt, args); 100 } else { 101 unsigned long flags; 102 103 if (fmt[0] == KERN_SOH[0]) 104 fmt += 2; 105 106 spin_lock_irqsave(&output->lock, flags); 107 prt_vprintf(&output->buf, fmt, args); 108 spin_unlock_irqrestore(&output->lock, flags); 109 110 wake_up(&output->wait); 111 } 112 va_end(args); 113} 114 |
|
89#define KTYPE(type) \ 90static const struct attribute_group type ## _group = { \ 91 .attrs = type ## _files \ 92}; \ 93 \ 94static const struct attribute_group *type ## _groups[] = { \ 95 &type ## _group, \ 96 NULL \ --- 610 unchanged lines hidden (view full) --- 707 int ret = 0; 708 709 c = kvpmalloc(sizeof(struct bch_fs), GFP_KERNEL|__GFP_ZERO); 710 if (!c) { 711 c = ERR_PTR(-BCH_ERR_ENOMEM_fs_alloc); 712 goto out; 713 } 714 | 115#define KTYPE(type) \ 116static const struct attribute_group type ## _group = { \ 117 .attrs = type ## _files \ 118}; \ 119 \ 120static const struct attribute_group *type ## _groups[] = { \ 121 &type ## _group, \ 122 NULL \ --- 610 unchanged lines hidden (view full) --- 733 int ret = 0; 734 735 c = kvpmalloc(sizeof(struct bch_fs), GFP_KERNEL|__GFP_ZERO); 736 if (!c) { 737 c = ERR_PTR(-BCH_ERR_ENOMEM_fs_alloc); 738 goto out; 739 } 740 |
741 c->output = (void *)(unsigned long) opts.log_output; 742 |
|
715 __module_get(THIS_MODULE); 716 717 closure_init(&c->cl, NULL); 718 719 c->kobj.kset = bcachefs_kset; 720 kobject_init(&c->kobj, &bch2_fs_ktype); 721 kobject_init(&c->internal, &bch2_fs_internal_ktype); 722 kobject_init(&c->opts_dir, &bch2_fs_opts_dir_ktype); --- 1332 unchanged lines hidden --- | 743 __module_get(THIS_MODULE); 744 745 closure_init(&c->cl, NULL); 746 747 c->kobj.kset = bcachefs_kset; 748 kobject_init(&c->kobj, &bch2_fs_ktype); 749 kobject_init(&c->internal, &bch2_fs_internal_ktype); 750 kobject_init(&c->opts_dir, &bch2_fs_opts_dir_ktype); --- 1332 unchanged lines hidden --- |