Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 782c3fb2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull ubifs changes from Artem Bityutskiy:
 "No big changes for 3.7 in UBIFS:
   - Error reporting and debug printing improvements
   - Power cut emulation fixes
   - Minor cleanups"

Fix trivial conflict in fs/ubifs/debug.c due to the user namespace
changes.

* tag 'upstream-3.7-rc1' of git://git.infradead.org/linux-ubifs:
  UBIFS: print less
  UBIFS: use pr_ helper instead of printk
  UBIFS: comply with coding style
  UBIFS: use __aligned() attribute
  UBIFS: remove __DATE__ and __TIME__
  UBIFS: fix power cut emulation for mtdram
  UBIFS: improve scanning debug output
  UBIFS: always print full error reports
  UBIFS: print PID in debug messages
parents 60c7b4df 3668b70f
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -342,9 +342,8 @@ static int do_budget_space(struct ubifs_info *c)
	lebs = c->lst.empty_lebs + c->freeable_cnt + c->idx_gc_cnt -
	       c->lst.taken_empty_lebs;
	if (unlikely(rsvd_idx_lebs > lebs)) {
		dbg_budg("out of indexing space: min_idx_lebs %d (old %d), "
			 "rsvd_idx_lebs %d", min_idx_lebs, c->bi.min_idx_lebs,
			 rsvd_idx_lebs);
		dbg_budg("out of indexing space: min_idx_lebs %d (old %d), rsvd_idx_lebs %d",
			 min_idx_lebs, c->bi.min_idx_lebs, rsvd_idx_lebs);
		return -ENOSPC;
	}

+4 −4
Original line number Diff line number Diff line
@@ -293,7 +293,7 @@ int ubifs_bg_thread(void *info)
	int err;
	struct ubifs_info *c = info;

	dbg_msg("background thread \"%s\" started, PID %d",
	ubifs_msg("background thread \"%s\" started, PID %d",
		  c->bgt_name, current->pid);
	set_freezable();

@@ -328,7 +328,7 @@ int ubifs_bg_thread(void *info)
		cond_resched();
	}

	dbg_msg("background thread \"%s\" stops", c->bgt_name);
	ubifs_msg("background thread \"%s\" stops", c->bgt_name);
	return 0;
}

@@ -514,7 +514,7 @@ struct idx_node {
	struct list_head list;
	int iip;
	union ubifs_key upper_key;
	struct ubifs_idx_node idx __attribute__((aligned(8)));
	struct ubifs_idx_node idx __aligned(8);
};

/**
+3 −4
Original line number Diff line number Diff line
@@ -112,8 +112,7 @@ void ubifs_compress(const void *in_buf, int in_len, void *out_buf, int *out_len,
	if (compr->comp_mutex)
		mutex_unlock(compr->comp_mutex);
	if (unlikely(err)) {
		ubifs_warn("cannot compress %d bytes, compressor %s, "
			   "error %d, leave data uncompressed",
		ubifs_warn("cannot compress %d bytes, compressor %s, error %d, leave data uncompressed",
			   in_len, compr->name, err);
		 goto no_compr;
	}
@@ -176,8 +175,8 @@ int ubifs_decompress(const void *in_buf, int in_len, void *out_buf,
	if (compr->decomp_mutex)
		mutex_unlock(compr->decomp_mutex);
	if (err)
		ubifs_err("cannot decompress %d bytes, compressor %s, "
			  "error %d", in_len, compr->name, err);
		ubifs_err("cannot decompress %d bytes, compressor %s, error %d",
			  in_len, compr->name, err);

	return err;
}
+270 −363

File changed.

Preview size limit exceeded, changes collapsed.

+6 −9
Original line number Diff line number Diff line
@@ -150,7 +150,7 @@ struct ubifs_global_debug_info {

#define ubifs_assert(expr) do {                                                \
	if (unlikely(!(expr))) {                                               \
		printk(KERN_CRIT "UBIFS assert failed in %s at %u (pid %d)\n", \
		pr_crit("UBIFS assert failed in %s at %u (pid %d)\n",          \
		       __func__, __LINE__, current->pid);                      \
		dump_stack();                                                  \
	}                                                                      \
@@ -159,26 +159,23 @@ struct ubifs_global_debug_info {
#define ubifs_assert_cmt_locked(c) do {                                        \
	if (unlikely(down_write_trylock(&(c)->commit_sem))) {                  \
		up_write(&(c)->commit_sem);                                    \
		printk(KERN_CRIT "commit lock is not locked!\n");              \
		pr_crit("commit lock is not locked!\n");                       \
		ubifs_assert(0);                                               \
	}                                                                      \
} while (0)

#define ubifs_dbg_msg(type, fmt, ...) \
	pr_debug("UBIFS DBG " type ": " fmt "\n", ##__VA_ARGS__)
	pr_debug("UBIFS DBG " type " (pid %d): " fmt "\n", current->pid,       \
		 ##__VA_ARGS__)

#define DBG_KEY_BUF_LEN 48
#define ubifs_dbg_msg_key(type, key, fmt, ...) do {                            \
	char __tmp_key_buf[DBG_KEY_BUF_LEN];                                   \
	pr_debug("UBIFS DBG " type ": " fmt "%s\n", ##__VA_ARGS__,             \
	pr_debug("UBIFS DBG " type " (pid %d): " fmt "%s\n", current->pid,     \
		 ##__VA_ARGS__,                                                \
		 dbg_snprintf_key(c, key, __tmp_key_buf, DBG_KEY_BUF_LEN));    \
} while (0)

/* Just a debugging messages not related to any specific UBIFS subsystem */
#define dbg_msg(fmt, ...)                                                      \
	printk(KERN_DEBUG "UBIFS DBG (pid %d): %s: " fmt "\n", current->pid,   \
	       __func__, ##__VA_ARGS__)

/* General messages */
#define dbg_gen(fmt, ...)   ubifs_dbg_msg("gen", fmt, ##__VA_ARGS__)
/* Additional journal messages */
Loading