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

Commit 15057e98 authored by Tao Ma's avatar Tao Ma
Browse files

ocfs2: Remove masklog ML_BH_IO.



Remove mlog(0,...) and mlog(ML_BH_IO,...) from
fs/ocfs2/buffer_head_io.c.
The masklog BH_IO is removed finally.

Signed-off-by: default avatarTao Ma <boyu.mt@taobao.com>
parent b4107950
Loading
Loading
Loading
Loading
+13 −24
Original line number Original line Diff line number Diff line
@@ -35,8 +35,8 @@
#include "inode.h"
#include "inode.h"
#include "journal.h"
#include "journal.h"
#include "uptodate.h"
#include "uptodate.h"

#include "buffer_head_io.h"
#include "buffer_head_io.h"
#include "ocfs2_trace.h"


/*
/*
 * Bits on bh->b_state used by ocfs2.
 * Bits on bh->b_state used by ocfs2.
@@ -55,8 +55,7 @@ int ocfs2_write_block(struct ocfs2_super *osb, struct buffer_head *bh,
{
{
	int ret = 0;
	int ret = 0;


	mlog(0, "(bh->b_blocknr = %llu, ci=%p)\n",
	trace_ocfs2_write_block((unsigned long long)bh->b_blocknr, ci);
	     (unsigned long long)bh->b_blocknr, ci);


	BUG_ON(bh->b_blocknr < OCFS2_SUPER_BLOCK_BLKNO);
	BUG_ON(bh->b_blocknr < OCFS2_SUPER_BLOCK_BLKNO);
	BUG_ON(buffer_jbd(bh));
	BUG_ON(buffer_jbd(bh));
@@ -107,10 +106,10 @@ int ocfs2_read_blocks_sync(struct ocfs2_super *osb, u64 block,
	unsigned int i;
	unsigned int i;
	struct buffer_head *bh;
	struct buffer_head *bh;


	if (!nr) {
	trace_ocfs2_read_blocks_sync((unsigned long long)block, nr);
		mlog(ML_BH_IO, "No buffers will be read!\n");

	if (!nr)
		goto bail;
		goto bail;
	}


	for (i = 0 ; i < nr ; i++) {
	for (i = 0 ; i < nr ; i++) {
		if (bhs[i] == NULL) {
		if (bhs[i] == NULL) {
@@ -124,9 +123,7 @@ int ocfs2_read_blocks_sync(struct ocfs2_super *osb, u64 block,
		bh = bhs[i];
		bh = bhs[i];


		if (buffer_jbd(bh)) {
		if (buffer_jbd(bh)) {
			mlog(ML_BH_IO,
			trace_ocfs2_read_blocks_sync_jbd(
			     "trying to sync read a jbd "
			     "managed bh (blocknr = %llu), skipping\n",
					(unsigned long long)bh->b_blocknr);
					(unsigned long long)bh->b_blocknr);
			continue;
			continue;
		}
		}
@@ -187,8 +184,7 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr,
	struct buffer_head *bh;
	struct buffer_head *bh;
	struct super_block *sb = ocfs2_metadata_cache_get_super(ci);
	struct super_block *sb = ocfs2_metadata_cache_get_super(ci);


	mlog(0, "(ci=%p, block=(%llu), nr=(%d), flags=%d)\n",
	trace_ocfs2_read_blocks_begin(ci, (unsigned long long)block, nr, flags);
	     ci, (unsigned long long)block, nr, flags);


	BUG_ON(!ci);
	BUG_ON(!ci);
	BUG_ON((flags & OCFS2_BH_READAHEAD) &&
	BUG_ON((flags & OCFS2_BH_READAHEAD) &&
@@ -208,7 +204,6 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr,
	}
	}


	if (nr == 0) {
	if (nr == 0) {
		mlog(ML_BH_IO, "No buffers will be read!\n");
		status = 0;
		status = 0;
		goto bail;
		goto bail;
	}
	}
@@ -261,11 +256,10 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr,
			ignore_cache = 1;
			ignore_cache = 1;
		}
		}


		trace_ocfs2_read_blocks_bh((unsigned long long)bh->b_blocknr,
			ignore_cache, buffer_jbd(bh), buffer_dirty(bh));

		if (buffer_jbd(bh)) {
		if (buffer_jbd(bh)) {
			if (ignore_cache)
				mlog(ML_BH_IO, "trying to sync read a jbd "
					       "managed bh (blocknr = %llu)\n",
				     (unsigned long long)bh->b_blocknr);
			continue;
			continue;
		}
		}


@@ -273,9 +267,6 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr,
			if (buffer_dirty(bh)) {
			if (buffer_dirty(bh)) {
				/* This should probably be a BUG, or
				/* This should probably be a BUG, or
				 * at least return an error. */
				 * at least return an error. */
				mlog(ML_BH_IO, "asking me to sync read a dirty "
					       "buffer! (blocknr = %llu)\n",
				     (unsigned long long)bh->b_blocknr);
				continue;
				continue;
			}
			}


@@ -368,10 +359,8 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr,
	}
	}
	ocfs2_metadata_cache_io_unlock(ci);
	ocfs2_metadata_cache_io_unlock(ci);


	mlog(ML_BH_IO, "block=(%llu), nr=(%d), cached=%s, flags=0x%x\n",
	trace_ocfs2_read_blocks_end((unsigned long long)block, nr,
	     (unsigned long long)block, nr,
				    flags, ignore_cache);
	     ((flags & OCFS2_BH_IGNORE_CACHE) || ignore_cache) ? "no" : "yes",
	     flags);


bail:
bail:


+0 −1
Original line number Original line Diff line number Diff line
@@ -93,7 +93,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = {
	define_mask(DLM_RECOVERY),
	define_mask(DLM_RECOVERY),
	define_mask(AIO),
	define_mask(AIO),
	define_mask(DLM_GLUE),
	define_mask(DLM_GLUE),
	define_mask(BH_IO),
	define_mask(UPTODATE),
	define_mask(UPTODATE),
	define_mask(VOTE),
	define_mask(VOTE),
	define_mask(CONN),
	define_mask(CONN),
+0 −1
Original line number Original line Diff line number Diff line
@@ -95,7 +95,6 @@
#define ML_DLM_RECOVERY	0x0000000000001000ULL /* dlm master functions */
#define ML_DLM_RECOVERY	0x0000000000001000ULL /* dlm master functions */
#define ML_AIO		0x0000000000002000ULL /* ocfs2 aio read and write */
#define ML_AIO		0x0000000000002000ULL /* ocfs2 aio read and write */
#define ML_DLM_GLUE	0x0000000000080000ULL /* ocfs2 dlm glue layer */
#define ML_DLM_GLUE	0x0000000000080000ULL /* ocfs2 dlm glue layer */
#define ML_BH_IO	0x0000000000100000ULL /* ocfs2 buffer I/O */
#define ML_UPTODATE	0x0000000000200000ULL /* ocfs2 caching sequence #'s */
#define ML_UPTODATE	0x0000000000200000ULL /* ocfs2 caching sequence #'s */
#define ML_VOTE		0x0000000001000000ULL /* ocfs2 node messaging  */
#define ML_VOTE		0x0000000001000000ULL /* ocfs2 node messaging  */
#define ML_CONN		0x0000000004000000ULL /* net connection management */
#define ML_CONN		0x0000000004000000ULL /* net connection management */
+46 −0
Original line number Original line Diff line number Diff line
@@ -2642,6 +2642,52 @@ DEFINE_OCFS2_ULL_EVENT(ocfs2_recover_orphans_iput);
DEFINE_OCFS2_INT_EVENT(ocfs2_wait_on_mount);
DEFINE_OCFS2_INT_EVENT(ocfs2_wait_on_mount);


/* End of trace events for fs/ocfs2/journal.c. */
/* End of trace events for fs/ocfs2/journal.c. */

/* Trace events for fs/ocfs2/buffer_head_io.c. */

DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_read_blocks_sync);

DEFINE_OCFS2_ULL_EVENT(ocfs2_read_blocks_sync_jbd);

DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_read_blocks_bh);

DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_read_blocks_end);

TRACE_EVENT(ocfs2_write_block,
	TP_PROTO(unsigned long long block, void *ci),
	TP_ARGS(block, ci),
	TP_STRUCT__entry(
		__field(unsigned long long, block)
		__field(void *, ci)
	),
	TP_fast_assign(
		__entry->block = block;
		__entry->ci = ci;
	),
	TP_printk("%llu %p", __entry->block, __entry->ci)
);

TRACE_EVENT(ocfs2_read_blocks_begin,
	TP_PROTO(void *ci, unsigned long long block,
		 unsigned int nr, int flags),
	TP_ARGS(ci, block, nr, flags),
	TP_STRUCT__entry(
		__field(void *, ci)
		__field(unsigned long long, block)
		__field(unsigned int, nr)
		__field(int, flags)
	),
	TP_fast_assign(
		__entry->ci = ci;
		__entry->block = block;
		__entry->nr = nr;
		__entry->flags = flags;
	),
	TP_printk("%p %llu %u %d", __entry->ci, __entry->block,
		  __entry->nr, __entry->flags)
);

/* End of trace events for fs/ocfs2/buffer_head_io.c. */
#endif /* _TRACE_OCFS2_H */
#endif /* _TRACE_OCFS2_H */


/* This part must be outside protection */
/* This part must be outside protection */