Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 243013
b: refs/heads/master
c: a873108
h: refs/heads/master
i:
  243011: e7b2276
v: v3
  • Loading branch information
Tao Ma committed Feb 22, 2011
1 parent ec651b4 commit 7df9fec
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a716357c47ea1cc4f535356cff2c39edd327136b
refs/heads/master: a8731086eff053b430cddbf5783654dfd700ea06
11 changes: 11 additions & 0 deletions trunk/fs/ocfs2/ocfs2_trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -1519,6 +1519,17 @@ TRACE_EVENT(ocfs2_read_virt_blocks,

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

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

DEFINE_OCFS2_UINT_EVENT(ocfs2_refresh_slot_info);

DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_map_slot_buffers);

DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_map_slot_buffers_block);

DEFINE_OCFS2_INT_EVENT(ocfs2_find_slot);

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

/* This part must be outside protection */
Expand Down
13 changes: 5 additions & 8 deletions trunk/fs/ocfs2/slot_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <linux/slab.h>
#include <linux/highmem.h>

#define MLOG_MASK_PREFIX ML_SUPER
#include <cluster/masklog.h>

#include "ocfs2.h"
Expand All @@ -39,6 +38,7 @@
#include "slot_map.h"
#include "super.h"
#include "sysfile.h"
#include "ocfs2_trace.h"

#include "buffer_head_io.h"

Expand Down Expand Up @@ -142,8 +142,7 @@ int ocfs2_refresh_slot_info(struct ocfs2_super *osb)
BUG_ON(si->si_blocks == 0);
BUG_ON(si->si_bh == NULL);

mlog(0, "Refreshing slot map, reading %u block(s)\n",
si->si_blocks);
trace_ocfs2_refresh_slot_info(si->si_blocks);

/*
* We pass -1 as blocknr because we expect all of si->si_bh to
Expand Down Expand Up @@ -381,8 +380,7 @@ static int ocfs2_map_slot_buffers(struct ocfs2_super *osb,
/* The size checks above should ensure this */
BUG_ON((osb->max_slots / si->si_slots_per_block) > blocks);

mlog(0, "Slot map needs %u buffers for %llu bytes\n",
si->si_blocks, bytes);
trace_ocfs2_map_slot_buffers(bytes, si->si_blocks);

si->si_bh = kzalloc(sizeof(struct buffer_head *) * si->si_blocks,
GFP_KERNEL);
Expand All @@ -400,8 +398,7 @@ static int ocfs2_map_slot_buffers(struct ocfs2_super *osb,
goto bail;
}

mlog(0, "Reading slot map block %u at %llu\n", i,
(unsigned long long)blkno);
trace_ocfs2_map_slot_buffers_block((unsigned long long)blkno, i);

bh = NULL; /* Acquire a fresh bh */
status = ocfs2_read_blocks(INODE_CACHE(si->si_inode), blkno,
Expand Down Expand Up @@ -503,7 +500,7 @@ int ocfs2_find_slot(struct ocfs2_super *osb)
osb->slot_num = slot;
spin_unlock(&osb->osb_lock);

mlog(0, "taking node slot %d\n", osb->slot_num);
trace_ocfs2_find_slot(osb->slot_num);

status = ocfs2_update_disk_slot(osb, si, osb->slot_num);
if (status < 0)
Expand Down

0 comments on commit 7df9fec

Please sign in to comment.