Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'upstream-4.6-rc1' of git://git.infradead.org/linux-ubifs

Pull UBI/UBIFS updates from Richard Weinberger:
"This contains cleanups and a maintainer update for UBI and UBIFS"

* tag 'upstream-4.6-rc1' of git://git.infradead.org/linux-ubifs:
ubifs: Remove unused header
MAINTAINERS: Update UBIFS entry
mtd: ubi: Add logging functions ubi_msg, ubi_warn and ubi_err
ubifs: Add logging functions for ubifs_msg, ubifs_err and ubifs_warn

+136 -32
+2 -1
MAINTAINERS
··· 11326 11326 F: drivers/scsi/u14-34f.c 11327 11327 11328 11328 UBI FILE SYSTEM (UBIFS) 11329 + M: Richard Weinberger <richard@nod.at> 11329 11330 M: Artem Bityutskiy <dedekind1@gmail.com> 11330 11331 M: Adrian Hunter <adrian.hunter@intel.com> 11331 11332 L: linux-mtd@lists.infradead.org 11332 11333 T: git git://git.infradead.org/ubifs-2.6.git 11333 11334 W: http://www.linux-mtd.infradead.org/doc/ubifs.html 11334 - S: Maintained 11335 + S: Supported 11335 11336 F: Documentation/filesystems/ubifs.txt 11336 11337 F: fs/ubifs/ 11337 11338
+49
drivers/mtd/ubi/misc.c
··· 153 153 return 0; 154 154 return 1; 155 155 } 156 + 157 + /* Normal UBI messages */ 158 + void ubi_msg(const struct ubi_device *ubi, const char *fmt, ...) 159 + { 160 + struct va_format vaf; 161 + va_list args; 162 + 163 + va_start(args, fmt); 164 + 165 + vaf.fmt = fmt; 166 + vaf.va = &args; 167 + 168 + pr_notice(UBI_NAME_STR "%d: %pV\n", ubi->ubi_num, &vaf); 169 + 170 + va_end(args); 171 + } 172 + 173 + /* UBI warning messages */ 174 + void ubi_warn(const struct ubi_device *ubi, const char *fmt, ...) 175 + { 176 + struct va_format vaf; 177 + va_list args; 178 + 179 + va_start(args, fmt); 180 + 181 + vaf.fmt = fmt; 182 + vaf.va = &args; 183 + 184 + pr_warn(UBI_NAME_STR "%d warning: %ps: %pV\n", 185 + ubi->ubi_num, __builtin_return_address(0), &vaf); 186 + 187 + va_end(args); 188 + } 189 + 190 + /* UBI error messages */ 191 + void ubi_err(const struct ubi_device *ubi, const char *fmt, ...) 192 + { 193 + struct va_format vaf; 194 + va_list args; 195 + 196 + va_start(args, fmt); 197 + 198 + vaf.fmt = fmt; 199 + vaf.va = &args; 200 + 201 + pr_err(UBI_NAME_STR "%d error: %ps: %pV\n", 202 + ubi->ubi_num, __builtin_return_address(0), &vaf); 203 + va_end(args); 204 + }
+10 -6
drivers/mtd/ubi/ubi.h
··· 49 49 /* UBI name used for character devices, sysfs, etc */ 50 50 #define UBI_NAME_STR "ubi" 51 51 52 + struct ubi_device; 53 + 52 54 /* Normal UBI messages */ 53 - #define ubi_msg(ubi, fmt, ...) pr_notice(UBI_NAME_STR "%d: " fmt "\n", \ 54 - ubi->ubi_num, ##__VA_ARGS__) 55 + __printf(2, 3) 56 + void ubi_msg(const struct ubi_device *ubi, const char *fmt, ...); 57 + 55 58 /* UBI warning messages */ 56 - #define ubi_warn(ubi, fmt, ...) pr_warn(UBI_NAME_STR "%d warning: %s: " fmt "\n", \ 57 - ubi->ubi_num, __func__, ##__VA_ARGS__) 59 + __printf(2, 3) 60 + void ubi_warn(const struct ubi_device *ubi, const char *fmt, ...); 61 + 58 62 /* UBI error messages */ 59 - #define ubi_err(ubi, fmt, ...) pr_err(UBI_NAME_STR "%d error: %s: " fmt "\n", \ 60 - ubi->ubi_num, __func__, ##__VA_ARGS__) 63 + __printf(2, 3) 64 + void ubi_err(const struct ubi_device *ubi, const char *fmt, ...); 61 65 62 66 /* Background thread name pattern */ 63 67 #define UBI_BGT_NAME_PATTERN "ubi_bgt%dd"
+1
fs/ubifs/Makefile
··· 4 4 ubifs-y += tnc.o master.o scan.o replay.o log.o commit.o gc.o orphan.o 5 5 ubifs-y += budget.o find.o tnc_commit.o compress.o lpt.o lprops.o 6 6 ubifs-y += recovery.o ioctl.o lpt_commit.o tnc_misc.o xattr.o debug.o 7 + ubifs-y += misc.o
+57
fs/ubifs/misc.c
··· 1 + #include <linux/kernel.h> 2 + #include "ubifs.h" 3 + 4 + /* Normal UBIFS messages */ 5 + void ubifs_msg(const struct ubifs_info *c, const char *fmt, ...) 6 + { 7 + struct va_format vaf; 8 + va_list args; 9 + 10 + va_start(args, fmt); 11 + 12 + vaf.fmt = fmt; 13 + vaf.va = &args; 14 + 15 + pr_notice("UBIFS (ubi%d:%d): %pV\n", 16 + c->vi.ubi_num, c->vi.vol_id, &vaf); 17 + 18 + va_end(args); 19 + } \ 20 + 21 + /* UBIFS error messages */ 22 + void ubifs_err(const struct ubifs_info *c, const char *fmt, ...) 23 + { 24 + struct va_format vaf; 25 + va_list args; 26 + 27 + va_start(args, fmt); 28 + 29 + vaf.fmt = fmt; 30 + vaf.va = &args; 31 + 32 + pr_err("UBIFS error (ubi%d:%d pid %d): %ps: %pV\n", 33 + c->vi.ubi_num, c->vi.vol_id, current->pid, 34 + __builtin_return_address(0), 35 + &vaf); 36 + 37 + va_end(args); 38 + } \ 39 + 40 + /* UBIFS warning messages */ 41 + void ubifs_warn(const struct ubifs_info *c, const char *fmt, ...) 42 + { 43 + struct va_format vaf; 44 + va_list args; 45 + 46 + va_start(args, fmt); 47 + 48 + vaf.fmt = fmt; 49 + vaf.va = &args; 50 + 51 + pr_warn("UBIFS warning (ubi%d:%d pid %d): %ps: %pV\n", 52 + c->vi.ubi_num, c->vi.vol_id, current->pid, 53 + __builtin_return_address(0), 54 + &vaf); 55 + 56 + va_end(args); 57 + }
+17 -24
fs/ubifs/ubifs.h
··· 42 42 /* Version of this UBIFS implementation */ 43 43 #define UBIFS_VERSION 1 44 44 45 - /* Normal UBIFS messages */ 46 - #define ubifs_msg(c, fmt, ...) \ 47 - pr_notice("UBIFS (ubi%d:%d): " fmt "\n", \ 48 - (c)->vi.ubi_num, (c)->vi.vol_id, ##__VA_ARGS__) 49 - /* UBIFS error messages */ 50 - #define ubifs_err(c, fmt, ...) \ 51 - pr_err("UBIFS error (ubi%d:%d pid %d): %s: " fmt "\n", \ 52 - (c)->vi.ubi_num, (c)->vi.vol_id, current->pid, \ 53 - __func__, ##__VA_ARGS__) 54 - /* UBIFS warning messages */ 55 - #define ubifs_warn(c, fmt, ...) \ 56 - pr_warn("UBIFS warning (ubi%d:%d pid %d): %s: " fmt "\n", \ 57 - (c)->vi.ubi_num, (c)->vi.vol_id, current->pid, \ 58 - __func__, ##__VA_ARGS__) 59 - /* 60 - * A variant of 'ubifs_err()' which takes the UBIFS file-sytem description 61 - * object as an argument. 62 - */ 63 - #define ubifs_errc(c, fmt, ...) \ 64 - do { \ 65 - if (!(c)->probing) \ 66 - ubifs_err(c, fmt, ##__VA_ARGS__); \ 67 - } while (0) 68 - 69 45 /* UBIFS file system VFS magic number */ 70 46 #define UBIFS_SUPER_MAGIC 0x24051905 71 47 ··· 1777 1801 #include "debug.h" 1778 1802 #include "misc.h" 1779 1803 #include "key.h" 1804 + 1805 + /* Normal UBIFS messages */ 1806 + __printf(2, 3) 1807 + void ubifs_msg(const struct ubifs_info *c, const char *fmt, ...); 1808 + __printf(2, 3) 1809 + void ubifs_err(const struct ubifs_info *c, const char *fmt, ...); 1810 + __printf(2, 3) 1811 + void ubifs_warn(const struct ubifs_info *c, const char *fmt, ...); 1812 + /* 1813 + * A variant of 'ubifs_err()' which takes the UBIFS file-sytem description 1814 + * object as an argument. 1815 + */ 1816 + #define ubifs_errc(c, fmt, ...) \ 1817 + do { \ 1818 + if (!(c)->probing) \ 1819 + ubifs_err(c, fmt, ##__VA_ARGS__); \ 1820 + } while (0) 1780 1821 1781 1822 #endif /* !__UBIFS_H__ */
-1
fs/ubifs/xattr.c
··· 59 59 #include <linux/fs.h> 60 60 #include <linux/slab.h> 61 61 #include <linux/xattr.h> 62 - #include <linux/posix_acl_xattr.h> 63 62 64 63 /* 65 64 * Limit the number of extended attributes per inode so that the total size