aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/ubifs.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ubifs/ubifs.h')
-rw-r--r--fs/ubifs/ubifs.h40
1 files changed, 22 insertions, 18 deletions
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
index bc04b9c69891..de759022f3d6 100644
--- a/fs/ubifs/ubifs.h
+++ b/fs/ubifs/ubifs.h
@@ -43,15 +43,19 @@
43#define UBIFS_VERSION 1 43#define UBIFS_VERSION 1
44 44
45/* Normal UBIFS messages */ 45/* Normal UBIFS messages */
46#define ubifs_msg(fmt, ...) pr_notice("UBIFS: " fmt "\n", ##__VA_ARGS__) 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__)
47/* UBIFS error messages */ 49/* UBIFS error messages */
48#define ubifs_err(fmt, ...) \ 50#define ubifs_err(c, fmt, ...) \
49 pr_err("UBIFS error (pid %d): %s: " fmt "\n", current->pid, \ 51 pr_err("UBIFS error (ubi%d:%d pid %d): %s: " fmt "\n", \
52 (c)->vi.ubi_num, (c)->vi.vol_id, current->pid, \
50 __func__, ##__VA_ARGS__) 53 __func__, ##__VA_ARGS__)
51/* UBIFS warning messages */ 54/* UBIFS warning messages */
52#define ubifs_warn(fmt, ...) \ 55#define ubifs_warn(c, fmt, ...) \
53 pr_warn("UBIFS warning (pid %d): %s: " fmt "\n", \ 56 pr_warn("UBIFS warning (ubi%d:%d pid %d): %s: " fmt "\n", \
54 current->pid, __func__, ##__VA_ARGS__) 57 (c)->vi.ubi_num, (c)->vi.vol_id, current->pid, \
58 __func__, ##__VA_ARGS__)
55/* 59/*
56 * A variant of 'ubifs_err()' which takes the UBIFS file-sytem description 60 * A variant of 'ubifs_err()' which takes the UBIFS file-sytem description
57 * object as an argument. 61 * object as an argument.
@@ -59,7 +63,7 @@
59#define ubifs_errc(c, fmt, ...) \ 63#define ubifs_errc(c, fmt, ...) \
60 do { \ 64 do { \
61 if (!(c)->probing) \ 65 if (!(c)->probing) \
62 ubifs_err(fmt, ##__VA_ARGS__); \ 66 ubifs_err(c, fmt, ##__VA_ARGS__); \
63 } while (0) 67 } while (0)
64 68
65/* UBIFS file system VFS magic number */ 69/* UBIFS file system VFS magic number */
@@ -158,7 +162,7 @@
158#define WORST_COMPR_FACTOR 2 162#define WORST_COMPR_FACTOR 2
159 163
160/* 164/*
161 * How much memory is needed for a buffer where we comress a data node. 165 * How much memory is needed for a buffer where we compress a data node.
162 */ 166 */
163#define COMPRESSED_DATA_NODE_BUF_SZ \ 167#define COMPRESSED_DATA_NODE_BUF_SZ \
164 (UBIFS_DATA_NODE_SZ + UBIFS_BLOCK_SIZE * WORST_COMPR_FACTOR) 168 (UBIFS_DATA_NODE_SZ + UBIFS_BLOCK_SIZE * WORST_COMPR_FACTOR)
@@ -664,7 +668,7 @@ typedef int (*ubifs_lpt_scan_callback)(struct ubifs_info *c,
664 * @lock: serializes @buf, @lnum, @offs, @avail, @used, @next_ino and @inodes 668 * @lock: serializes @buf, @lnum, @offs, @avail, @used, @next_ino and @inodes
665 * fields 669 * fields
666 * @softlimit: soft write-buffer timeout interval 670 * @softlimit: soft write-buffer timeout interval
667 * @delta: hard and soft timeouts delta (the timer expire inteval is @softlimit 671 * @delta: hard and soft timeouts delta (the timer expire interval is @softlimit
668 * and @softlimit + @delta) 672 * and @softlimit + @delta)
669 * @timer: write-buffer timer 673 * @timer: write-buffer timer
670 * @no_timer: non-zero if this write-buffer does not have a timer 674 * @no_timer: non-zero if this write-buffer does not have a timer
@@ -930,9 +934,9 @@ struct ubifs_orphan {
930/** 934/**
931 * struct ubifs_mount_opts - UBIFS-specific mount options information. 935 * struct ubifs_mount_opts - UBIFS-specific mount options information.
932 * @unmount_mode: selected unmount mode (%0 default, %1 normal, %2 fast) 936 * @unmount_mode: selected unmount mode (%0 default, %1 normal, %2 fast)
933 * @bulk_read: enable/disable bulk-reads (%0 default, %1 disabe, %2 enable) 937 * @bulk_read: enable/disable bulk-reads (%0 default, %1 disable, %2 enable)
934 * @chk_data_crc: enable/disable CRC data checking when reading data nodes 938 * @chk_data_crc: enable/disable CRC data checking when reading data nodes
935 * (%0 default, %1 disabe, %2 enable) 939 * (%0 default, %1 disable, %2 enable)
936 * @override_compr: override default compressor (%0 - do not override and use 940 * @override_compr: override default compressor (%0 - do not override and use
937 * superblock compressor, %1 - override and use compressor 941 * superblock compressor, %1 - override and use compressor
938 * specified in @compr_type) 942 * specified in @compr_type)
@@ -962,9 +966,9 @@ struct ubifs_mount_opts {
962 * optimization) 966 * optimization)
963 * @nospace_rp: the same as @nospace, but additionally means that even reserved 967 * @nospace_rp: the same as @nospace, but additionally means that even reserved
964 * pool is full 968 * pool is full
965 * @page_budget: budget for a page (constant, nenver changed after mount) 969 * @page_budget: budget for a page (constant, never changed after mount)
966 * @inode_budget: budget for an inode (constant, nenver changed after mount) 970 * @inode_budget: budget for an inode (constant, never changed after mount)
967 * @dent_budget: budget for a directory entry (constant, nenver changed after 971 * @dent_budget: budget for a directory entry (constant, never changed after
968 * mount) 972 * mount)
969 */ 973 */
970struct ubifs_budg_info { 974struct ubifs_budg_info {
@@ -1787,10 +1791,10 @@ long ubifs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
1787/* compressor.c */ 1791/* compressor.c */
1788int __init ubifs_compressors_init(void); 1792int __init ubifs_compressors_init(void);
1789void ubifs_compressors_exit(void); 1793void ubifs_compressors_exit(void);
1790void ubifs_compress(const void *in_buf, int in_len, void *out_buf, int *out_len, 1794void ubifs_compress(const struct ubifs_info *c, const void *in_buf, int in_len,
1791 int *compr_type); 1795 void *out_buf, int *out_len, int *compr_type);
1792int ubifs_decompress(const void *buf, int len, void *out, int *out_len, 1796int ubifs_decompress(const struct ubifs_info *c, const void *buf, int len,
1793 int compr_type); 1797 void *out, int *out_len, int compr_type);
1794 1798
1795#include "debug.h" 1799#include "debug.h"
1796#include "misc.h" 1800#include "misc.h"