This pull request contains cleanups and a maintainer update
for UBI and UBIFS. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABAgAGBQJW9C7iAAoJEEtJtSqsAOnWLSIP/3ijRdZdGCD9QlKQfb0qg+wH kS0yHiPRp6mabMqPrgvDvF5/+ULRkVdEJef1Pcvs24odB2cH8SmwY7sPXTJIAh49 R9tbAQsgz+nPgplBnCnKaO1Io6aHZ3v4eJZL6UF5Y89B2i8d5zAzql/9Y+a2gFZP wTCSxVC+NsO1Bf822701pQXON9fTZbBEYomeb1xIIC2paOp3XrBuLIT6grKv+h2Z wvZ9iCuMzWdPkRoIi/qLUkrWVdsuCt2oN/GqKJn5uSbjybS/bIqUYe5dcm322c2s vPhcQptgv4zkjHoJd6hyf/hts+y1i1K6NNX3hCGZ1sgL1qldeq5VMAlf+Ksuy9V5 NlfNTU7/AJEJT1DgcuRqvXBP+sB7W/4T3TTphW7sn4uTFMDQ94N3LBkUC7dOkWLg qOIvBJho1im/gZyZS9g3mwg0h7SCnYCNOoZFTU17f5wCyYCLgVaFWIzcBH4iwPXk BSADYNv9crYyyV2RDdcYif4QDZ9QwUPanvJdrdH3CsieymboHseMW9N3I53kr3Bq lU2pRSeQz9aTLCN1l06bkXHHtoE+RWb5oiL3Gy28a+QwW7dluz58NjIRkT6vEost UzIgvBl5GJTjO7JInrIgwDIuAeznwFkG7xDS0VG9lCki+HlIH4R5SGJdqkFtcVIF sXeRIQCDh03niv37vwAh =y4hr -----END PGP SIGNATURE----- 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
This commit is contained in:
Коммит
88875667eb
|
@ -11326,12 +11326,13 @@ S: Maintained
|
|||
F: drivers/scsi/u14-34f.c
|
||||
|
||||
UBI FILE SYSTEM (UBIFS)
|
||||
M: Richard Weinberger <richard@nod.at>
|
||||
M: Artem Bityutskiy <dedekind1@gmail.com>
|
||||
M: Adrian Hunter <adrian.hunter@intel.com>
|
||||
L: linux-mtd@lists.infradead.org
|
||||
T: git git://git.infradead.org/ubifs-2.6.git
|
||||
W: http://www.linux-mtd.infradead.org/doc/ubifs.html
|
||||
S: Maintained
|
||||
S: Supported
|
||||
F: Documentation/filesystems/ubifs.txt
|
||||
F: fs/ubifs/
|
||||
|
||||
|
|
|
@ -153,3 +153,52 @@ int ubi_check_pattern(const void *buf, uint8_t patt, int size)
|
|||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Normal UBI messages */
|
||||
void ubi_msg(const struct ubi_device *ubi, const char *fmt, ...)
|
||||
{
|
||||
struct va_format vaf;
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
|
||||
vaf.fmt = fmt;
|
||||
vaf.va = &args;
|
||||
|
||||
pr_notice(UBI_NAME_STR "%d: %pV\n", ubi->ubi_num, &vaf);
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
/* UBI warning messages */
|
||||
void ubi_warn(const struct ubi_device *ubi, const char *fmt, ...)
|
||||
{
|
||||
struct va_format vaf;
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
|
||||
vaf.fmt = fmt;
|
||||
vaf.va = &args;
|
||||
|
||||
pr_warn(UBI_NAME_STR "%d warning: %ps: %pV\n",
|
||||
ubi->ubi_num, __builtin_return_address(0), &vaf);
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
/* UBI error messages */
|
||||
void ubi_err(const struct ubi_device *ubi, const char *fmt, ...)
|
||||
{
|
||||
struct va_format vaf;
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
|
||||
vaf.fmt = fmt;
|
||||
vaf.va = &args;
|
||||
|
||||
pr_err(UBI_NAME_STR "%d error: %ps: %pV\n",
|
||||
ubi->ubi_num, __builtin_return_address(0), &vaf);
|
||||
va_end(args);
|
||||
}
|
||||
|
|
|
@ -49,15 +49,19 @@
|
|||
/* UBI name used for character devices, sysfs, etc */
|
||||
#define UBI_NAME_STR "ubi"
|
||||
|
||||
struct ubi_device;
|
||||
|
||||
/* Normal UBI messages */
|
||||
#define ubi_msg(ubi, fmt, ...) pr_notice(UBI_NAME_STR "%d: " fmt "\n", \
|
||||
ubi->ubi_num, ##__VA_ARGS__)
|
||||
__printf(2, 3)
|
||||
void ubi_msg(const struct ubi_device *ubi, const char *fmt, ...);
|
||||
|
||||
/* UBI warning messages */
|
||||
#define ubi_warn(ubi, fmt, ...) pr_warn(UBI_NAME_STR "%d warning: %s: " fmt "\n", \
|
||||
ubi->ubi_num, __func__, ##__VA_ARGS__)
|
||||
__printf(2, 3)
|
||||
void ubi_warn(const struct ubi_device *ubi, const char *fmt, ...);
|
||||
|
||||
/* UBI error messages */
|
||||
#define ubi_err(ubi, fmt, ...) pr_err(UBI_NAME_STR "%d error: %s: " fmt "\n", \
|
||||
ubi->ubi_num, __func__, ##__VA_ARGS__)
|
||||
__printf(2, 3)
|
||||
void ubi_err(const struct ubi_device *ubi, const char *fmt, ...);
|
||||
|
||||
/* Background thread name pattern */
|
||||
#define UBI_BGT_NAME_PATTERN "ubi_bgt%dd"
|
||||
|
|
|
@ -4,3 +4,4 @@ ubifs-y += shrinker.o journal.o file.o dir.o super.o sb.o io.o
|
|||
ubifs-y += tnc.o master.o scan.o replay.o log.o commit.o gc.o orphan.o
|
||||
ubifs-y += budget.o find.o tnc_commit.o compress.o lpt.o lprops.o
|
||||
ubifs-y += recovery.o ioctl.o lpt_commit.o tnc_misc.o xattr.o debug.o
|
||||
ubifs-y += misc.o
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
#include <linux/kernel.h>
|
||||
#include "ubifs.h"
|
||||
|
||||
/* Normal UBIFS messages */
|
||||
void ubifs_msg(const struct ubifs_info *c, const char *fmt, ...)
|
||||
{
|
||||
struct va_format vaf;
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
|
||||
vaf.fmt = fmt;
|
||||
vaf.va = &args;
|
||||
|
||||
pr_notice("UBIFS (ubi%d:%d): %pV\n",
|
||||
c->vi.ubi_num, c->vi.vol_id, &vaf);
|
||||
|
||||
va_end(args);
|
||||
} \
|
||||
|
||||
/* UBIFS error messages */
|
||||
void ubifs_err(const struct ubifs_info *c, const char *fmt, ...)
|
||||
{
|
||||
struct va_format vaf;
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
|
||||
vaf.fmt = fmt;
|
||||
vaf.va = &args;
|
||||
|
||||
pr_err("UBIFS error (ubi%d:%d pid %d): %ps: %pV\n",
|
||||
c->vi.ubi_num, c->vi.vol_id, current->pid,
|
||||
__builtin_return_address(0),
|
||||
&vaf);
|
||||
|
||||
va_end(args);
|
||||
} \
|
||||
|
||||
/* UBIFS warning messages */
|
||||
void ubifs_warn(const struct ubifs_info *c, const char *fmt, ...)
|
||||
{
|
||||
struct va_format vaf;
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
|
||||
vaf.fmt = fmt;
|
||||
vaf.va = &args;
|
||||
|
||||
pr_warn("UBIFS warning (ubi%d:%d pid %d): %ps: %pV\n",
|
||||
c->vi.ubi_num, c->vi.vol_id, current->pid,
|
||||
__builtin_return_address(0),
|
||||
&vaf);
|
||||
|
||||
va_end(args);
|
||||
}
|
|
@ -42,30 +42,6 @@
|
|||
/* Version of this UBIFS implementation */
|
||||
#define UBIFS_VERSION 1
|
||||
|
||||
/* Normal UBIFS messages */
|
||||
#define ubifs_msg(c, fmt, ...) \
|
||||
pr_notice("UBIFS (ubi%d:%d): " fmt "\n", \
|
||||
(c)->vi.ubi_num, (c)->vi.vol_id, ##__VA_ARGS__)
|
||||
/* UBIFS error messages */
|
||||
#define ubifs_err(c, fmt, ...) \
|
||||
pr_err("UBIFS error (ubi%d:%d pid %d): %s: " fmt "\n", \
|
||||
(c)->vi.ubi_num, (c)->vi.vol_id, current->pid, \
|
||||
__func__, ##__VA_ARGS__)
|
||||
/* UBIFS warning messages */
|
||||
#define ubifs_warn(c, fmt, ...) \
|
||||
pr_warn("UBIFS warning (ubi%d:%d pid %d): %s: " fmt "\n", \
|
||||
(c)->vi.ubi_num, (c)->vi.vol_id, current->pid, \
|
||||
__func__, ##__VA_ARGS__)
|
||||
/*
|
||||
* A variant of 'ubifs_err()' which takes the UBIFS file-sytem description
|
||||
* object as an argument.
|
||||
*/
|
||||
#define ubifs_errc(c, fmt, ...) \
|
||||
do { \
|
||||
if (!(c)->probing) \
|
||||
ubifs_err(c, fmt, ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
/* UBIFS file system VFS magic number */
|
||||
#define UBIFS_SUPER_MAGIC 0x24051905
|
||||
|
||||
|
@ -1802,4 +1778,21 @@ int ubifs_decompress(const struct ubifs_info *c, const void *buf, int len,
|
|||
#include "misc.h"
|
||||
#include "key.h"
|
||||
|
||||
/* Normal UBIFS messages */
|
||||
__printf(2, 3)
|
||||
void ubifs_msg(const struct ubifs_info *c, const char *fmt, ...);
|
||||
__printf(2, 3)
|
||||
void ubifs_err(const struct ubifs_info *c, const char *fmt, ...);
|
||||
__printf(2, 3)
|
||||
void ubifs_warn(const struct ubifs_info *c, const char *fmt, ...);
|
||||
/*
|
||||
* A variant of 'ubifs_err()' which takes the UBIFS file-sytem description
|
||||
* object as an argument.
|
||||
*/
|
||||
#define ubifs_errc(c, fmt, ...) \
|
||||
do { \
|
||||
if (!(c)->probing) \
|
||||
ubifs_err(c, fmt, ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
#endif /* !__UBIFS_H__ */
|
||||
|
|
|
@ -59,7 +59,6 @@
|
|||
#include <linux/fs.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/xattr.h>
|
||||
#include <linux/posix_acl_xattr.h>
|
||||
|
||||
/*
|
||||
* Limit the number of extended attributes per inode so that the total size
|
||||
|
|
Загрузка…
Ссылка в новой задаче