Commit 0c505273 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'upstream-linus' of git://oss.oracle.com/home/sourcebo/git/ocfs2

* 'upstream-linus' of git://oss.oracle.com/home/sourcebo/git/ocfs2:
  ocfs2: finally remove MLF* macros
  ocfs2: don't use MLF* in the file system
  ocfs2: don't use MLF* in dlm/ files
  ocfs2: don't use MLF* in cluster/ files
  [PATCH] ocfs2: dlm recovery fixes
  [PATCH] ocfs2: fix hang in dlm lock resource mastery
  ocfs2: use __attribute__ format
parents 7d14f145 ea8aa68d
...@@ -566,9 +566,8 @@ static int ocfs2_do_insert_extent(struct ocfs2_super *osb, ...@@ -566,9 +566,8 @@ static int ocfs2_do_insert_extent(struct ocfs2_super *osb,
next_free = le16_to_cpu(el->l_next_free_rec); next_free = le16_to_cpu(el->l_next_free_rec);
if (next_free == 0) { if (next_free == 0) {
ocfs2_error(inode->i_sb, ocfs2_error(inode->i_sb,
"Dinode %"MLFu64" has a bad " "Dinode %llu has a bad extent list",
"extent list", (unsigned long long)OCFS2_I(inode)->ip_blkno);
OCFS2_I(inode)->ip_blkno);
status = -EIO; status = -EIO;
goto bail; goto bail;
} }
...@@ -611,9 +610,8 @@ static int ocfs2_do_insert_extent(struct ocfs2_super *osb, ...@@ -611,9 +610,8 @@ static int ocfs2_do_insert_extent(struct ocfs2_super *osb,
next_free = le16_to_cpu(el->l_next_free_rec); next_free = le16_to_cpu(el->l_next_free_rec);
if (next_free == 0) { if (next_free == 0) {
ocfs2_error(inode->i_sb, ocfs2_error(inode->i_sb,
"Dinode %"MLFu64" has a bad " "Dinode %llu has a bad extent list",
"extent list", (unsigned long long)OCFS2_I(inode)->ip_blkno);
OCFS2_I(inode)->ip_blkno);
status = -EIO; status = -EIO;
goto bail; goto bail;
} }
...@@ -652,8 +650,9 @@ static int ocfs2_do_insert_extent(struct ocfs2_super *osb, ...@@ -652,8 +650,9 @@ static int ocfs2_do_insert_extent(struct ocfs2_super *osb,
/* having an empty extent at eof is legal. */ /* having an empty extent at eof is legal. */
if (el->l_recs[i].e_cpos != fe->i_clusters) { if (el->l_recs[i].e_cpos != fe->i_clusters) {
ocfs2_error(inode->i_sb, ocfs2_error(inode->i_sb,
"Dinode %"MLFu64" trailing extent is bad: " "Dinode %llu trailing extent is bad: "
"cpos (%u) != number of clusters (%u)", "cpos (%u) != number of clusters (%u)",
(unsigned long long)OCFS2_I(inode)->ip_blkno,
le32_to_cpu(el->l_recs[i].e_cpos), le32_to_cpu(el->l_recs[i].e_cpos),
le32_to_cpu(fe->i_clusters)); le32_to_cpu(fe->i_clusters));
status = -EIO; status = -EIO;
...@@ -747,19 +746,19 @@ static int ocfs2_find_branch_target(struct ocfs2_super *osb, ...@@ -747,19 +746,19 @@ static int ocfs2_find_branch_target(struct ocfs2_super *osb,
while(le16_to_cpu(el->l_tree_depth) > 1) { while(le16_to_cpu(el->l_tree_depth) > 1) {
if (le16_to_cpu(el->l_next_free_rec) == 0) { if (le16_to_cpu(el->l_next_free_rec) == 0) {
ocfs2_error(inode->i_sb, "Dinode %"MLFu64" has empty " ocfs2_error(inode->i_sb, "Dinode %llu has empty "
"extent list (next_free_rec == 0)", "extent list (next_free_rec == 0)",
OCFS2_I(inode)->ip_blkno); (unsigned long long)OCFS2_I(inode)->ip_blkno);
status = -EIO; status = -EIO;
goto bail; goto bail;
} }
i = le16_to_cpu(el->l_next_free_rec) - 1; i = le16_to_cpu(el->l_next_free_rec) - 1;
blkno = le64_to_cpu(el->l_recs[i].e_blkno); blkno = le64_to_cpu(el->l_recs[i].e_blkno);
if (!blkno) { if (!blkno) {
ocfs2_error(inode->i_sb, "Dinode %"MLFu64" has extent " ocfs2_error(inode->i_sb, "Dinode %llu has extent "
"list where extent # %d has no physical " "list where extent # %d has no physical "
"block start", "block start",
OCFS2_I(inode)->ip_blkno, i); (unsigned long long)OCFS2_I(inode)->ip_blkno, i);
status = -EIO; status = -EIO;
goto bail; goto bail;
} }
...@@ -826,9 +825,9 @@ int ocfs2_insert_extent(struct ocfs2_super *osb, ...@@ -826,9 +825,9 @@ int ocfs2_insert_extent(struct ocfs2_super *osb,
mlog_entry_void(); mlog_entry_void();
mlog(0, "add %u clusters starting at block %"MLFu64" to " mlog(0, "add %u clusters starting at block %llu to inode %llu\n",
"inode %"MLFu64"\n", new_clusters, (unsigned long long)start_blk,
new_clusters, start_blk, OCFS2_I(inode)->ip_blkno); (unsigned long long)OCFS2_I(inode)->ip_blkno);
fe = (struct ocfs2_dinode *) fe_bh->b_data; fe = (struct ocfs2_dinode *) fe_bh->b_data;
el = &fe->id2.i_list; el = &fe->id2.i_list;
...@@ -963,8 +962,8 @@ static int ocfs2_truncate_log_append(struct ocfs2_super *osb, ...@@ -963,8 +962,8 @@ static int ocfs2_truncate_log_append(struct ocfs2_super *osb,
struct ocfs2_dinode *di; struct ocfs2_dinode *di;
struct ocfs2_truncate_log *tl; struct ocfs2_truncate_log *tl;
mlog_entry("start_blk = %"MLFu64", num_clusters = %u\n", start_blk, mlog_entry("start_blk = %llu, num_clusters = %u\n",
num_clusters); (unsigned long long)start_blk, num_clusters);
BUG_ON(mutex_trylock(&tl_inode->i_mutex)); BUG_ON(mutex_trylock(&tl_inode->i_mutex));
...@@ -981,8 +980,9 @@ static int ocfs2_truncate_log_append(struct ocfs2_super *osb, ...@@ -981,8 +980,9 @@ static int ocfs2_truncate_log_append(struct ocfs2_super *osb,
tl_count = le16_to_cpu(tl->tl_count); tl_count = le16_to_cpu(tl->tl_count);
mlog_bug_on_msg(tl_count > ocfs2_truncate_recs_per_inode(osb->sb) || mlog_bug_on_msg(tl_count > ocfs2_truncate_recs_per_inode(osb->sb) ||
tl_count == 0, tl_count == 0,
"Truncate record count on #%"MLFu64" invalid (" "Truncate record count on #%llu invalid "
"wanted %u, actual %u\n", OCFS2_I(tl_inode)->ip_blkno, "wanted %u, actual %u\n",
(unsigned long long)OCFS2_I(tl_inode)->ip_blkno,
ocfs2_truncate_recs_per_inode(osb->sb), ocfs2_truncate_recs_per_inode(osb->sb),
le16_to_cpu(tl->tl_count)); le16_to_cpu(tl->tl_count));
...@@ -1002,8 +1002,8 @@ static int ocfs2_truncate_log_append(struct ocfs2_super *osb, ...@@ -1002,8 +1002,8 @@ static int ocfs2_truncate_log_append(struct ocfs2_super *osb,
} }
mlog(0, "Log truncate of %u clusters starting at cluster %u to " mlog(0, "Log truncate of %u clusters starting at cluster %u to "
"%"MLFu64" (index = %d)\n", num_clusters, start_cluster, "%llu (index = %d)\n", num_clusters, start_cluster,
OCFS2_I(tl_inode)->ip_blkno, index); (unsigned long long)OCFS2_I(tl_inode)->ip_blkno, index);
if (ocfs2_truncate_log_can_coalesce(tl, start_cluster)) { if (ocfs2_truncate_log_can_coalesce(tl, start_cluster)) {
/* /*
...@@ -1134,8 +1134,8 @@ static int __ocfs2_flush_truncate_log(struct ocfs2_super *osb) ...@@ -1134,8 +1134,8 @@ static int __ocfs2_flush_truncate_log(struct ocfs2_super *osb)
} }
num_to_flush = le16_to_cpu(tl->tl_used); num_to_flush = le16_to_cpu(tl->tl_used);
mlog(0, "Flush %u records from truncate log #%"MLFu64"\n", mlog(0, "Flush %u records from truncate log #%llu\n",
num_to_flush, OCFS2_I(tl_inode)->ip_blkno); num_to_flush, (unsigned long long)OCFS2_I(tl_inode)->ip_blkno);
if (!num_to_flush) { if (!num_to_flush) {
status = 0; status = 0;
goto bail; goto bail;
...@@ -1360,8 +1360,8 @@ int ocfs2_complete_truncate_log_recovery(struct ocfs2_super *osb, ...@@ -1360,8 +1360,8 @@ int ocfs2_complete_truncate_log_recovery(struct ocfs2_super *osb,
tl = &tl_copy->id2.i_dealloc; tl = &tl_copy->id2.i_dealloc;
num_recs = le16_to_cpu(tl->tl_used); num_recs = le16_to_cpu(tl->tl_used);
mlog(0, "cleanup %u records from %"MLFu64"\n", num_recs, mlog(0, "cleanup %u records from %llu\n", num_recs,
tl_copy->i_blkno); (unsigned long long)tl_copy->i_blkno);
mutex_lock(&tl_inode->i_mutex); mutex_lock(&tl_inode->i_mutex);
for(i = 0; i < num_recs; i++) { for(i = 0; i < num_recs; i++) {
...@@ -1529,7 +1529,8 @@ static int ocfs2_find_new_last_ext_blk(struct ocfs2_super *osb, ...@@ -1529,7 +1529,8 @@ static int ocfs2_find_new_last_ext_blk(struct ocfs2_super *osb,
*new_last_eb = bh; *new_last_eb = bh;
get_bh(*new_last_eb); get_bh(*new_last_eb);
mlog(0, "returning block %"MLFu64"\n", le64_to_cpu(eb->h_blkno)); mlog(0, "returning block %llu\n",
(unsigned long long)le64_to_cpu(eb->h_blkno));
bail: bail:
if (bh) if (bh)
brelse(bh); brelse(bh);
...@@ -1646,8 +1647,8 @@ static int ocfs2_do_truncate(struct ocfs2_super *osb, ...@@ -1646,8 +1647,8 @@ static int ocfs2_do_truncate(struct ocfs2_super *osb,
/* if our tree depth > 0, update all the tree blocks below us. */ /* if our tree depth > 0, update all the tree blocks below us. */
while (depth) { while (depth) {
mlog(0, "traveling tree (depth = %d, next_eb = %"MLFu64")\n", mlog(0, "traveling tree (depth = %d, next_eb = %llu)\n",
depth, next_eb); depth, (unsigned long long)next_eb);
status = ocfs2_read_block(osb, next_eb, &eb_bh, status = ocfs2_read_block(osb, next_eb, &eb_bh,
OCFS2_BH_CACHED, inode); OCFS2_BH_CACHED, inode);
if (status < 0) { if (status < 0) {
...@@ -1674,12 +1675,12 @@ static int ocfs2_do_truncate(struct ocfs2_super *osb, ...@@ -1674,12 +1675,12 @@ static int ocfs2_do_truncate(struct ocfs2_super *osb,
i = le16_to_cpu(el->l_next_free_rec) - 1; i = le16_to_cpu(el->l_next_free_rec) - 1;
mlog(0, "extent block %"MLFu64", before: record %d: " mlog(0, "extent block %llu, before: record %d: "
"(%u, %u, %"MLFu64"), next = %u\n", "(%u, %u, %llu), next = %u\n",
le64_to_cpu(eb->h_blkno), i, (unsigned long long)le64_to_cpu(eb->h_blkno), i,
le32_to_cpu(el->l_recs[i].e_cpos), le32_to_cpu(el->l_recs[i].e_cpos),
le32_to_cpu(el->l_recs[i].e_clusters), le32_to_cpu(el->l_recs[i].e_clusters),
le64_to_cpu(el->l_recs[i].e_blkno), (unsigned long long)le64_to_cpu(el->l_recs[i].e_blkno),
le16_to_cpu(el->l_next_free_rec)); le16_to_cpu(el->l_next_free_rec));
BUG_ON(le32_to_cpu(el->l_recs[i].e_clusters) < clusters_to_del); BUG_ON(le32_to_cpu(el->l_recs[i].e_clusters) < clusters_to_del);
...@@ -1697,12 +1698,12 @@ static int ocfs2_do_truncate(struct ocfs2_super *osb, ...@@ -1697,12 +1698,12 @@ static int ocfs2_do_truncate(struct ocfs2_super *osb,
BUG_ON(!el->l_next_free_rec); BUG_ON(!el->l_next_free_rec);
le16_add_cpu(&el->l_next_free_rec, -1); le16_add_cpu(&el->l_next_free_rec, -1);
} }
mlog(0, "extent block %"MLFu64", after: record %d: " mlog(0, "extent block %llu, after: record %d: "
"(%u, %u, %"MLFu64"), next = %u\n", "(%u, %u, %llu), next = %u\n",
le64_to_cpu(eb->h_blkno), i, (unsigned long long)le64_to_cpu(eb->h_blkno), i,
le32_to_cpu(el->l_recs[i].e_cpos), le32_to_cpu(el->l_recs[i].e_cpos),
le32_to_cpu(el->l_recs[i].e_clusters), le32_to_cpu(el->l_recs[i].e_clusters),
le64_to_cpu(el->l_recs[i].e_blkno), (unsigned long long)le64_to_cpu(el->l_recs[i].e_blkno),
le16_to_cpu(el->l_next_free_rec)); le16_to_cpu(el->l_next_free_rec));
status = ocfs2_journal_dirty(handle, eb_bh); status = ocfs2_journal_dirty(handle, eb_bh);
...@@ -1792,10 +1793,10 @@ int ocfs2_commit_truncate(struct ocfs2_super *osb, ...@@ -1792,10 +1793,10 @@ int ocfs2_commit_truncate(struct ocfs2_super *osb,
last_eb = le64_to_cpu(fe->i_last_eb_blk); last_eb = le64_to_cpu(fe->i_last_eb_blk);
start: start:
mlog(0, "ocfs2_commit_truncate: fe->i_clusters = %u, " mlog(0, "ocfs2_commit_truncate: fe->i_clusters = %u, "
"last_eb = %"MLFu64", fe->i_last_eb_blk = %"MLFu64", " "last_eb = %llu, fe->i_last_eb_blk = %llu, "
"fe->id2.i_list.l_tree_depth = %u last_eb_bh = %p\n", "fe->id2.i_list.l_tree_depth = %u last_eb_bh = %p\n",
le32_to_cpu(fe->i_clusters), last_eb, le32_to_cpu(fe->i_clusters), (unsigned long long)last_eb,
le64_to_cpu(fe->i_last_eb_blk), (unsigned long long)le64_to_cpu(fe->i_last_eb_blk),
le16_to_cpu(fe->id2.i_list.l_tree_depth), last_eb_bh); le16_to_cpu(fe->id2.i_list.l_tree_depth), last_eb_bh);
if (last_eb != le64_to_cpu(fe->i_last_eb_blk)) { if (last_eb != le64_to_cpu(fe->i_last_eb_blk)) {
...@@ -1934,16 +1935,17 @@ int ocfs2_prepare_truncate(struct ocfs2_super *osb, ...@@ -1934,16 +1935,17 @@ int ocfs2_prepare_truncate(struct ocfs2_super *osb,
fe = (struct ocfs2_dinode *) fe_bh->b_data; fe = (struct ocfs2_dinode *) fe_bh->b_data;
mlog(0, "fe->i_clusters = %u, new_i_clusters = %u, fe->i_size =" mlog(0, "fe->i_clusters = %u, new_i_clusters = %u, fe->i_size ="
"%"MLFu64"\n", fe->i_clusters, new_i_clusters, fe->i_size); "%llu\n", fe->i_clusters, new_i_clusters,
(unsigned long long)fe->i_size);
if (le32_to_cpu(fe->i_clusters) <= new_i_clusters) { if (le32_to_cpu(fe->i_clusters) <= new_i_clusters) {
ocfs2_error(inode->i_sb, "Dinode %"MLFu64" has cluster count " ocfs2_error(inode->i_sb, "Dinode %llu has cluster count "
"%u and size %"MLFu64" whereas struct inode has " "%u and size %llu whereas struct inode has "
"cluster count %u and size %llu which caused an " "cluster count %u and size %llu which caused an "
"invalid truncate to %u clusters.", "invalid truncate to %u clusters.",
le64_to_cpu(fe->i_blkno), (unsigned long long)le64_to_cpu(fe->i_blkno),
le32_to_cpu(fe->i_clusters), le32_to_cpu(fe->i_clusters),
le64_to_cpu(fe->i_size), (unsigned long long)le64_to_cpu(fe->i_size),
OCFS2_I(inode)->ip_clusters, i_size_read(inode), OCFS2_I(inode)->ip_clusters, i_size_read(inode),
new_i_clusters); new_i_clusters);
mlog_meta_lvb(ML_ERROR, &OCFS2_I(inode)->ip_meta_lockres); mlog_meta_lvb(ML_ERROR, &OCFS2_I(inode)->ip_meta_lockres);
......
...@@ -74,8 +74,8 @@ static int ocfs2_symlink_get_block(struct inode *inode, sector_t iblock, ...@@ -74,8 +74,8 @@ static int ocfs2_symlink_get_block(struct inode *inode, sector_t iblock,
fe = (struct ocfs2_dinode *) bh->b_data; fe = (struct ocfs2_dinode *) bh->b_data;
if (!OCFS2_IS_VALID_DINODE(fe)) { if (!OCFS2_IS_VALID_DINODE(fe)) {
mlog(ML_ERROR, "Invalid dinode #%"MLFu64": signature = %.*s\n", mlog(ML_ERROR, "Invalid dinode #%llu: signature = %.*s\n",
fe->i_blkno, 7, fe->i_signature); (unsigned long long)fe->i_blkno, 7, fe->i_signature);
goto bail; goto bail;
} }
...@@ -162,8 +162,8 @@ static int ocfs2_get_block(struct inode *inode, sector_t iblock, ...@@ -162,8 +162,8 @@ static int ocfs2_get_block(struct inode *inode, sector_t iblock,
NULL); NULL);
if (err) { if (err) {
mlog(ML_ERROR, "Error %d from get_blocks(0x%p, %llu, 1, " mlog(ML_ERROR, "Error %d from get_blocks(0x%p, %llu, 1, "
"%"MLFu64", NULL)\n", err, inode, "%llu, NULL)\n", err, inode, (unsigned long long)iblock,
(unsigned long long)iblock, p_blkno); (unsigned long long)p_blkno);
goto bail; goto bail;
} }
...@@ -171,13 +171,15 @@ static int ocfs2_get_block(struct inode *inode, sector_t iblock, ...@@ -171,13 +171,15 @@ static int ocfs2_get_block(struct inode *inode, sector_t iblock,
if (bh_result->b_blocknr == 0) { if (bh_result->b_blocknr == 0) {
err = -EIO; err = -EIO;
mlog(ML_ERROR, "iblock = %llu p_blkno = %"MLFu64" " mlog(ML_ERROR, "iblock = %llu p_blkno = %llu blkno=(%llu)\n",
"blkno=(%"MLFu64")\n", (unsigned long long)iblock, (unsigned long long)iblock,
p_blkno, OCFS2_I(inode)->ip_blkno); (unsigned long long)p_blkno,
(unsigned long long)OCFS2_I(inode)->ip_blkno);
} }
past_eof = ocfs2_blocks_for_bytes(inode->i_sb, i_size_read(inode)); past_eof = ocfs2_blocks_for_bytes(inode->i_sb, i_size_read(inode));
mlog(0, "Inode %lu, past_eof = %"MLFu64"\n", inode->i_ino, past_eof); mlog(0, "Inode %lu, past_eof = %llu\n", inode->i_ino,
(unsigned long long)past_eof);
if (create && (iblock >= past_eof)) if (create && (iblock >= past_eof))
set_buffer_new(bh_result); set_buffer_new(bh_result);
......
...@@ -97,8 +97,8 @@ int ocfs2_read_blocks(struct ocfs2_super *osb, u64 block, int nr, ...@@ -97,8 +97,8 @@ int ocfs2_read_blocks(struct ocfs2_super *osb, u64 block, int nr,
int i, ignore_cache = 0; int i, ignore_cache = 0;
struct buffer_head *bh; struct buffer_head *bh;
mlog_entry("(block=(%"MLFu64"), nr=(%d), flags=%d, inode=%p)\n", mlog_entry("(block=(%llu), nr=(%d), flags=%d, inode=%p)\n",
block, nr, flags, inode); (unsigned long long)block, nr, flags, inode);
if (osb == NULL || osb->sb == NULL || bhs == NULL) { if (osb == NULL || osb->sb == NULL || bhs == NULL) {
status = -EINVAL; status = -EINVAL;
...@@ -143,9 +143,9 @@ int ocfs2_read_blocks(struct ocfs2_super *osb, u64 block, int nr, ...@@ -143,9 +143,9 @@ int ocfs2_read_blocks(struct ocfs2_super *osb, u64 block, int nr,
if (flags & OCFS2_BH_CACHED && if (flags & OCFS2_BH_CACHED &&
!ocfs2_buffer_uptodate(inode, bh)) { !ocfs2_buffer_uptodate(inode, bh)) {
mlog(ML_UPTODATE, mlog(ML_UPTODATE,
"bh (%llu), inode %"MLFu64" not uptodate\n", "bh (%llu), inode %llu not uptodate\n",
(unsigned long long)bh->b_blocknr, (unsigned long long)bh->b_blocknr,
OCFS2_I(inode)->ip_blkno); (unsigned long long)OCFS2_I(inode)->ip_blkno);
ignore_cache = 1; ignore_cache = 1;
} }
...@@ -222,7 +222,8 @@ int ocfs2_read_blocks(struct ocfs2_super *osb, u64 block, int nr, ...@@ -222,7 +222,8 @@ int ocfs2_read_blocks(struct ocfs2_super *osb, u64 block, int nr,
if (inode) if (inode)
mutex_unlock(&OCFS2_I(inode)->ip_io_mutex); mutex_unlock(&OCFS2_I(inode)->ip_io_mutex);
mlog(ML_BH_IO, "block=(%"MLFu64"), nr=(%d), cached=%s\n", block, nr, mlog(ML_BH_IO, "block=(%llu), nr=(%d), cached=%s\n",
(unsigned long long)block, nr,
(!(flags & OCFS2_BH_CACHED) || ignore_cache) ? "no" : "yes"); (!(flags & OCFS2_BH_CACHED) || ignore_cache) ? "no" : "yes");
bail: bail:
......
...@@ -449,11 +449,11 @@ static u32 o2hb_compute_block_crc_le(struct o2hb_region *reg, ...@@ -449,11 +449,11 @@ static u32 o2hb_compute_block_crc_le(struct o2hb_region *reg,
static void o2hb_dump_slot(struct o2hb_disk_heartbeat_block *hb_block) static void o2hb_dump_slot(struct o2hb_disk_heartbeat_block *hb_block)
{ {
mlog(ML_ERROR, "Dump slot information: seq = 0x%"MLFx64", node = %u, " mlog(ML_ERROR, "Dump slot information: seq = 0x%llx, node = %u, "
"cksum = 0x%x, generation 0x%"MLFx64"\n", "cksum = 0x%x, generation 0x%llx\n",
le64_to_cpu(hb_block->hb_seq), hb_block->hb_node, (long long)le64_to_cpu(hb_block->hb_seq),
le32_to_cpu(hb_block->hb_cksum), hb_block->hb_node, le32_to_cpu(hb_block->hb_cksum),
le64_to_cpu(hb_block->hb_generation)); (long long)le64_to_cpu(hb_block->hb_generation));
} }
static int o2hb_verify_crc(struct o2hb_region *reg, static int o2hb_verify_crc(struct o2hb_region *reg,
...@@ -516,8 +516,9 @@ static inline void o2hb_prepare_block(struct o2hb_region *reg, ...@@ -516,8 +516,9 @@ static inline void o2hb_prepare_block(struct o2hb_region *reg,
hb_block->hb_cksum = cpu_to_le32(o2hb_compute_block_crc_le(reg, hb_block->hb_cksum = cpu_to_le32(o2hb_compute_block_crc_le(reg,
hb_block)); hb_block));
mlog(ML_HB_BIO, "our node generation = 0x%"MLFx64", cksum = 0x%x\n", mlog(ML_HB_BIO, "our node generation = 0x%llx, cksum = 0x%x\n",
cpu_to_le64(generation), le32_to_cpu(hb_block->hb_cksum)); (long long)cpu_to_le64(generation),
le32_to_cpu(hb_block->hb_cksum));
} }
static void o2hb_fire_callbacks(struct o2hb_callback *hbcall, static void o2hb_fire_callbacks(struct o2hb_callback *hbcall,
...@@ -686,19 +687,20 @@ static int o2hb_check_slot(struct o2hb_region *reg, ...@@ -686,19 +687,20 @@ static int o2hb_check_slot(struct o2hb_region *reg,
if (slot->ds_last_generation != le64_to_cpu(hb_block->hb_generation)) { if (slot->ds_last_generation != le64_to_cpu(hb_block->hb_generation)) {
gen_changed = 1; gen_changed = 1;
slot->ds_equal_samples = 0; slot->ds_equal_samples = 0;
mlog(ML_HEARTBEAT, "Node %d changed generation (0x%"MLFx64" " mlog(ML_HEARTBEAT, "Node %d changed generation (0x%llx "
"to 0x%"MLFx64")\n", slot->ds_node_num, "to 0x%llx)\n", slot->ds_node_num,
slot->ds_last_generation, (long long)slot->ds_last_generation,
le64_to_cpu(hb_block->hb_generation)); (long long)le64_to_cpu(hb_block->hb_generation));
} }
slot->ds_last_generation = le64_to_cpu(hb_block->hb_generation); slot->ds_last_generation = le64_to_cpu(hb_block->hb_generation);
mlog(ML_HEARTBEAT, "Slot %d gen 0x%"MLFx64" cksum 0x%x " mlog(ML_HEARTBEAT, "Slot %d gen 0x%llx cksum 0x%x "
"seq %"MLFu64" last %"MLFu64" changed %u equal %u\n", "seq %llu last %llu changed %u equal %u\n",
slot->ds_node_num, slot->ds_last_generation, slot->ds_node_num, (long long)slot->ds_last_generation,
le32_to_cpu(hb_block->hb_cksum), le64_to_cpu(hb_block->hb_seq), le32_to_cpu(hb_block->hb_cksum),
slot->ds_last_time, slot->ds_changed_samples, (unsigned long long)le64_to_cpu(hb_block->hb_seq),
(unsigned long long)slot->ds_last_time, slot->ds_changed_samples,
slot->ds_equal_samples); slot->ds_equal_samples);
spin_lock(&o2hb_live_lock); spin_lock(&o2hb_live_lock);
...@@ -708,8 +710,8 @@ static int o2hb_check_slot(struct o2hb_region *reg, ...@@ -708,8 +710,8 @@ static int o2hb_check_slot(struct o2hb_region *reg,
* changes at any time during their dead time */ * changes at any time during their dead time */
if (list_empty(&slot->ds_live_item) && if (list_empty(&slot->ds_live_item) &&
slot->ds_changed_samples >= O2HB_LIVE_THRESHOLD) { slot->ds_changed_samples >= O2HB_LIVE_THRESHOLD) {
mlog(ML_HEARTBEAT, "Node %d (id 0x%"MLFx64") joined my " mlog(ML_HEARTBEAT, "Node %d (id 0x%llx) joined my region\n",
"region\n", slot->ds_node_num, slot->ds_last_generation); slot->ds_node_num, (long long)slot->ds_last_generation);
/* first on the list generates a callback */ /* first on the list generates a callback */
if (list_empty(&o2hb_live_slots[slot->ds_node_num])) { if (list_empty(&o2hb_live_slots[slot->ds_node_num])) {
......
...@@ -256,16 +256,6 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits; ...@@ -256,16 +256,6 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits;
} \ } \
} while (0) } while (0)
#if (BITS_PER_LONG == 32) || defined(CONFIG_X86_64) || (defined(CONFIG_UML_X86) && defined(CONFIG_64BIT))
#define MLFi64 "lld"
#define MLFu64 "llu"
#define MLFx64 "llx"
#else
#define MLFi64 "ld"
#define MLFu64 "lu"
#define MLFx64 "lx"
#endif
#include <linux/kobject.h> #include <linux/kobject.h>
#include <linux/sysfs.h> #include <linux/sysfs.h>
int mlog_sys_init(struct subsystem *o2cb_subsys); int mlog_sys_init(struct subsystem *o2cb_subsys);
......
...@@ -64,15 +64,16 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry, ...@@ -64,15 +64,16 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry,
/* did we or someone else delete this inode? */ /* did we or someone else delete this inode? */
if (OCFS2_I(inode)->ip_flags & OCFS2_INODE_DELETED) { if (OCFS2_I(inode)->ip_flags & OCFS2_INODE_DELETED) {
spin_unlock(&OCFS2_I(inode)->ip_lock); spin_unlock(&OCFS2_I(inode)->ip_lock);
mlog(0, "inode (%"MLFu64") deleted, returning false\n", mlog(0, "inode (%llu) deleted, returning false\n",
OCFS2_I(inode)->ip_blkno); (unsigned long long)OCFS2_I(inode)->ip_blkno);
goto bail; goto bail;
} }
spin_unlock(&OCFS2_I(inode)->ip_lock); spin_unlock(&OCFS2_I(inode)->ip_lock);
if (!inode->i_nlink) { if (!inode->i_nlink) {
mlog(0, "Inode %"MLFu64" orphaned, returning false " mlog(0, "Inode %llu orphaned, returning false "
"dir = %d\n", OCFS2_I(inode)->ip_blkno, "dir = %d\n",
(unsigned long long)OCFS2_I(inode)->ip_blkno,
S_ISDIR(inode->i_mode)); S_ISDIR(inode->i_mode));
goto bail; goto bail;
} }
......
...@@ -83,7 +83,8 @@ int ocfs2_readdir(struct file * filp, void * dirent, filldir_t filldir) ...@@ -83,7 +83,8 @@ int ocfs2_readdir(struct file * filp, void * dirent, filldir_t filldir)
struct super_block * sb = inode->i_sb; struct super_block * sb = inode->i_sb;
int have_disk_lock = 0; int have_disk_lock = 0;
mlog_entry("dirino=%"MLFu64"\n", OCFS2_I(inode)->ip_blkno); mlog_entry("dirino=%llu\n",
(unsigned long long)OCFS2_I(inode)->ip_blkno);
stored = 0; stored = 0;
bh = NULL; bh = NULL;
...@@ -104,9 +105,9 @@ int ocfs2_readdir(struct file * filp, void * dirent, filldir_t filldir) ...@@ -104,9 +105,9 @@ int ocfs2_readdir(struct file * filp, void * dirent, filldir_t filldir)
blk = (filp->f_pos) >> sb->s_blocksize_bits; blk = (filp->f_pos) >> sb->s_blocksize_bits;
bh = ocfs2_bread(inode, blk, &err, 0); bh = ocfs2_bread(inode, blk, &err, 0);
if (!bh) { if (!bh) {
mlog(ML_ERROR, "directory #%"MLFu64" contains a hole " mlog(ML_ERROR,
"at offset %lld\n", "directory #%llu contains a hole at offset %lld\n",
OCFS2_I(inode)->ip_blkno, (unsigned long long)OCFS2_I(inode)->ip_blkno,
filp->f_pos); filp->f_pos);
filp->f_pos += sb->s_blocksize - offset; filp->f_pos += sb->s_blocksize - offset;
continue; continue;
...@@ -214,9 +215,9 @@ int ocfs2_find_files_on_disk(const char *name, ...@@ -214,9 +215,9 @@ int ocfs2_find_files_on_disk(const char *name,
int status = -ENOENT; int status = -ENOENT;
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
mlog_entry("(osb=%p, parent=%"MLFu64", name='%.*s', blkno=%p, " mlog_entry("(osb=%p, parent=%llu, name='%.*s', blkno=%p, inode=%p)\n",
"inode=%p)\n", osb, (unsigned long long)OCFS2_I(inode)->ip_blkno,
osb, OCFS2_I(inode)->ip_blkno, namelen, name, blkno, inode); namelen, name, blkno, inode);
*dirent_bh = ocfs2_find_entry(name, namelen, inode, dirent); *dirent_bh = ocfs2_find_entry(name, namelen, inode, dirent);
if (!*dirent_bh || !*dirent) { if (!*dirent_bh || !*dirent) {
...@@ -255,8 +256,8 @@ int ocfs2_check_dir_for_entry(struct inode *dir, ...@@ -255,8 +256,8 @@ int ocfs2_check_dir_for_entry(struct inode *dir,
struct buffer_head *dirent_bh = NULL; struct buffer_head *dirent_bh = NULL;
struct ocfs2_dir_entry *dirent = NULL; struct ocfs2_dir_entry *dirent = NULL;
mlog_entry("dir %"MLFu64", name '%.*s'\n", OCFS2_I(dir)->ip_blkno, mlog_entry("dir %llu, name '%.*s'\n",
namelen, name); (unsigned long long)OCFS2_I(dir)->ip_blkno, namelen, name);
ret = -EEXIST; ret = -EEXIST;
dirent_bh = ocfs2_find_entry(name, namelen, dir, &dirent); dirent_bh = ocfs2_find_entry(name, namelen, dir, &dirent);
...@@ -287,9 +288,8 @@ int ocfs2_empty_dir(struct inode *inode) ...@@ -287,9 +288,8 @@ int ocfs2_empty_dir(struct inode *inode)
if ((i_size_read(inode) < if ((i_size_read(inode) <
(OCFS2_DIR_REC_LEN(1) + OCFS2_DIR_REC_LEN(2))) || (OCFS2_DIR_REC_LEN(1) + OCFS2_DIR_REC_LEN(2))) ||
!(bh = ocfs2_bread(inode, 0, &err, 0))) { !(bh = ocfs2_bread(inode, 0, &err, 0))) {
mlog(ML_ERROR, "bad directory (dir #%"MLFu64") - " mlog(ML_ERROR, "bad directory (dir #%llu) - no data block\n",
"no data block\n", (unsigned long long)OCFS2_I(inode)->ip_blkno);
OCFS2_I(inode)->ip_blkno);
return 1; return 1;
} }
...@@ -300,9 +300,8 @@ int ocfs2_empty_dir(struct inode *inode) ...@@ -300,9 +300,8 @@ int ocfs2_empty_dir(struct inode *inode)
!le64_to_cpu(de1->inode) || !le64_to_cpu(de1->inode) ||
strcmp(".", de->name) || strcmp(".", de->name) ||
strcmp("..", de1->name)) { strcmp("..", de1->name)) {
mlog(ML_ERROR, "bad directory (dir #%"MLFu64") - " mlog(ML_ERROR, "bad directory (dir #%llu) - no `.' or `..'\n",
"no `.' or `..'\n", (unsigned long long)OCFS2_I(inode)->ip_blkno);
OCFS2_I(inode)->ip_blkno);
brelse(bh); brelse(bh);
return 1; return 1;
} }
...@@ -314,9 +313,8 @@ int ocfs2_empty_dir(struct inode *inode) ...@@ -314,9 +313,8 @@ int ocfs2_empty_dir(struct inode *inode)
bh = ocfs2_bread(inode, bh = ocfs2_bread(inode,
offset >> sb->s_blocksize_bits, &err, 0); offset >> sb->s_blocksize_bits, &err, 0);
if (!bh) { if (!bh) {
mlog(ML_ERROR, "directory #%"MLFu64" contains " mlog(ML_ERROR, "dir %llu has a hole at %lu\n",
"a hole at offset %lu\n", (unsigned long long)OCFS2_I(inode)->ip_blkno, offset);
OCFS2_I(inode)->ip_blkno, offset);
offset += sb->s_blocksize; offset += sb->s_blocksize;
continue; continue;
} }
...@@ -406,8 +404,8 @@ static int ocfs2_extend_dir(struct ocfs2_super *osb, ...@@ -406,8 +404,8 @@ static int ocfs2_extend_dir(struct ocfs2_super *osb,
mlog_entry_void(); mlog_entry_void();
dir_i_size = i_size_read(dir); dir_i_size = i_size_read(dir);
mlog(0, "extending dir %"MLFu64" (i_size = %lld)\n", mlog(0, "extending dir %llu (i_size = %lld)\n",
OCFS2_I(dir)->ip_blkno, dir_i_size); (unsigned long long)OCFS2_I(dir)->ip_blkno, dir_i_size);
handle = ocfs2_alloc_handle(osb); handle = ocfs2_alloc_handle(osb);
if (handle == NULL) { if (handle == NULL) {
...@@ -531,8 +529,8 @@ int ocfs2_prepare_dir_for_insert(struct ocfs2_super *osb, ...@@ -531,8 +529,8 @@ int ocfs2_prepare_dir_for_insert(struct ocfs2_super *osb,
mlog_entry_void(); mlog_entry_void();
mlog(0, "getting ready to insert namelen %d into dir %"MLFu64"\n", mlog(0, "getting ready to insert namelen %d into dir %llu\n",
namelen, OCFS2_I(dir)->ip_blkno); namelen, (unsigned long long)OCFS2_I(dir)->ip_blkno);
BUG_ON(!S_ISDIR(dir->i_mode)); BUG_ON(!S_ISDIR(dir->i_mode));
fe = (struct ocfs2_dinode *) parent_fe_bh->b_data; fe = (struct ocfs2_dinode *) parent_fe_bh->b_data;
......
...@@ -307,8 +307,11 @@ int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data) ...@@ -307,8 +307,11 @@ int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data)
if (past->type != DLM_AST && if (past->type != DLM_AST &&
past->type != DLM_BAST) { past->type != DLM_BAST) {
mlog(ML_ERROR, "Unknown ast type! %d, cookie=%"MLFu64", " mlog(ML_ERROR, "Unknown ast type! %d, cookie=%u:%llu"
"name=%.*s\n", past->type, cookie, locklen, name); "name=%.*s\n", past->type,
dlm_get_lock_cookie_node(cookie),
dlm_get_lock_cookie_seq(cookie),
locklen, name);
ret = DLM_IVLOCKID; ret = DLM_IVLOCKID;
goto leave; goto leave;
} }
...@@ -316,9 +319,11 @@ int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data) ...@@ -316,9 +319,11 @@ int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data)
res = dlm_lookup_lockres(dlm, name, locklen); res = dlm_lookup_lockres(dlm, name, locklen);
if (!res) { if (!res) {
mlog(ML_ERROR, "got %sast for unknown lockres! " mlog(ML_ERROR, "got %sast for unknown lockres! "
"cookie=%"MLFu64", name=%.*s, namelen=%u\n", "cookie=%u:%llu, name=%.*s, namelen=%u\n",
past->type == DLM_AST ? "" : "b", past->type == DLM_AST ? "" : "b",
cookie, locklen, name, locklen); dlm_get_lock_cookie_node(cookie),
dlm_get_lock_cookie_seq(cookie),
locklen, name, locklen);
ret = DLM_IVLOCKID; ret = DLM_IVLOCKID;
goto leave; goto leave;
} }
...@@ -360,9 +365,12 @@ int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data) ...@@ -360,9 +365,12 @@ int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data)
goto do_ast; goto do_ast;
} }
mlog(ML_ERROR, "got %sast for unknown lock! cookie=%"MLFu64", " mlog(ML_ERROR, "got %sast for unknown lock! cookie=%u:%llu, "
"name=%.*s, namelen=%u\n", "name=%.*s, namelen=%u\n",
past->type == DLM_AST ? "" : "b", cookie, locklen, name, locklen); past->type == DLM_AST ? "" : "b",
dlm_get_lock_cookie_node(cookie),
dlm_get_lock_cookie_seq(cookie),
locklen, name, locklen);
ret = DLM_NORMAL; ret = DLM_NORMAL;
unlock_out: unlock_out:
......
...@@ -630,6 +630,21 @@ __dlm_lockres_state_to_status(struct dlm_lock_resource *res) ...@@ -630,6 +630,21 @@ __dlm_lockres_state_to_status(struct dlm_lock_resource *res)
return status; return status;
} }
static inline u8 dlm_get_lock_cookie_node(u64 cookie)
{
u8 ret;
cookie >>= 56;
ret = (u8)(cookie & 0xffULL);
return ret;
}
static inline unsigned long long dlm_get_lock_cookie_seq(u64 cookie)
{
unsigned long long ret;
ret = ((unsigned long long)cookie) & 0x00ffffffffffffffULL;
return ret;
}
struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie, struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie,
struct dlm_lockstatus *lksb); struct dlm_lockstatus *lksb);
void dlm_lock_get(struct dlm_lock *lock); void dlm_lock_get(struct dlm_lock *lock);
...@@ -658,6 +673,7 @@ void dlm_complete_thread(struct dlm_ctxt *dlm); ...@@ -658,6 +673,7 @@ void dlm_complete_thread(struct dlm_ctxt *dlm);
int dlm_launch_recovery_thread(struct dlm_ctxt *dlm); int dlm_launch_recovery_thread(struct dlm_ctxt *dlm);
void dlm_complete_recovery_thread(struct dlm_ctxt *dlm); void dlm_complete_recovery_thread(struct dlm_ctxt *dlm);
void dlm_wait_for_recovery(struct dlm_ctxt *dlm); void dlm_wait_for_recovery(struct dlm_ctxt *dlm);
void dlm_kick_recovery_thread(struct dlm_ctxt *dlm);
int dlm_is_node_dead(struct dlm_ctxt *dlm, u8 node); int dlm_is_node_dead(struct dlm_ctxt *dlm, u8 node);
int dlm_wait_for_node_death(struct dlm_ctxt *dlm, u8 node, int timeout); int dlm_wait_for_node_death(struct dlm_ctxt *dlm, u8 node, int timeout);
...@@ -762,6 +778,11 @@ int dlm_request_all_locks_handler(struct o2net_msg *msg, u32 len, void *data); ...@@ -762,6 +778,11 @@ int dlm_request_all_locks_handler(struct o2net_msg *msg, u32 len, void *data);
int dlm_reco_data_done_handler(struct o2net_msg *msg, u32 len, void *data); int dlm_reco_data_done_handler(struct o2net_msg *msg, u32 len, void *data);
int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data); int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data);
int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data); int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data);
int dlm_do_master_requery(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
u8 nodenum, u8 *real_master);
int dlm_lockres_master_requery(struct dlm_ctxt *dlm,
struct dlm_lock_resource *res, u8 *real_master);
int dlm_dispatch_assert_master(struct dlm_ctxt *dlm, int dlm_dispatch_assert_master(struct dlm_ctxt *dlm,
struct dlm_lock_resource *res, struct dlm_lock_resource *res,
......
...@@ -284,8 +284,10 @@ enum dlm_status dlmconvert_remote(struct dlm_ctxt *dlm, ...@@ -284,8 +284,10 @@ enum dlm_status dlmconvert_remote(struct dlm_ctxt *dlm,
if (lock->ml.convert_type != LKM_IVMODE) { if (lock->ml.convert_type != LKM_IVMODE) {
__dlm_print_one_lock_resource(res); __dlm_print_one_lock_resource(res);
mlog(ML_ERROR, "converting a remote lock that is already " mlog(ML_ERROR, "converting a remote lock that is already "
"converting! (cookie=%"MLFu64", conv=%d)\n", "converting! (cookie=%u:%llu, conv=%d)\n",
lock->ml.cookie, lock->ml.convert_type); dlm_get_lock_cookie_node(lock->ml.cookie),
dlm_get_lock_cookie_seq(lock->ml.cookie),
lock->ml.convert_type);
status = DLM_DENIED; status = DLM_DENIED;
goto bail; goto bail;
} }
...@@ -513,8 +515,9 @@ int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data) ...@@ -513,8 +515,9 @@ int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data)
leave: leave:
if (!lock) if (!lock)
mlog(ML_ERROR, "did not find lock to convert on grant queue! " mlog(ML_ERROR, "did not find lock to convert on grant queue! "
"cookie=%"MLFu64"\n", "cookie=%u:%llu\n",
cnv->cookie); dlm_get_lock_cookie_node(cnv->cookie),
dlm_get_lock_cookie_seq(cnv->cookie));
else else
dlm_lock_put(lock); dlm_lock_put(lock);
......
...@@ -72,8 +72,10 @@ void __dlm_print_one_lock_resource(struct dlm_lock_resource *res) ...@@ -72,8 +72,10 @@ void __dlm_print_one_lock_resource(struct dlm_lock_resource *res)
lock = list_entry(iter2, struct dlm_lock, list); lock = list_entry(iter2, struct dlm_lock, list);
spin_lock(&lock->spinlock); spin_lock(&lock->spinlock);
mlog(ML_NOTICE, " type=%d, conv=%d, node=%u, " mlog(ML_NOTICE, " type=%d, conv=%d, node=%u, "
"cookie=%"MLFu64", ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n", "cookie=%u:%llu, ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n",
lock->ml.type, lock->ml.convert_type, lock->ml.node, lock->ml.cookie, lock->ml.type, lock->ml.convert_type, lock->ml.node,
dlm_get_lock_cookie_node(lock->ml.cookie),
dlm_get_lock_cookie_seq(lock->ml.cookie),
list_empty(&lock->ast_list) ? 'y' : 'n', list_empty(&lock->ast_list) ? 'y' : 'n',
lock->ast_pending ? 'y' : 'n', lock->ast_pending ? 'y' : 'n',
list_empty(&lock->bast_list) ? 'y' : 'n', list_empty(&lock->bast_list) ? 'y' : 'n',
...@@ -85,8 +87,10 @@ void __dlm_print_one_lock_resource(struct dlm_lock_resource *res) ...@@ -85,8 +87,10 @@ void __dlm_print_one_lock_resource(struct dlm_lock_resource *res)
lock = list_entry(iter2, struct dlm_lock, list); lock = list_entry(iter2, struct dlm_lock, list);
spin_lock(&lock->spinlock); spin_lock(&lock->spinlock);
mlog(ML_NOTICE, " type=%d, conv=%d, node=%u, " mlog(ML_NOTICE, " type=%d, conv=%d, node=%u, "
"cookie=%"MLFu64", ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n", "cookie=%u:%llu, ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n",
lock->ml.type, lock->ml.convert_type, lock->ml.node, lock->ml.cookie, lock->ml.type, lock->ml.convert_type, lock->ml.node,
dlm_get_lock_cookie_node(lock->ml.cookie),
dlm_get_lock_cookie_seq(lock->ml.cookie),
list_empty(&lock->ast_list) ? 'y' : 'n', list_empty(&lock->ast_list) ? 'y' : 'n',
lock->ast_pending ? 'y' : 'n', lock->ast_pending ? 'y' : 'n',
list_empty(&lock->bast_list) ? 'y' : 'n', list_empty(&lock->bast_list) ? 'y' : 'n',
...@@ -98,8 +102,10 @@ void __dlm_print_one_lock_resource(struct dlm_lock_resource *res) ...@@ -98,8 +102,10 @@ void __dlm_print_one_lock_resource(struct dlm_lock_resource *res)
lock = list_entry(iter2, struct dlm_lock, list); lock = list_entry(iter2, struct dlm_lock, list);
spin_lock(&lock->spinlock); spin_lock(&lock->spinlock);
mlog(ML_NOTICE, " type=%d, conv=%d, node=%u, " mlog(ML_NOTICE, " type=%d, conv=%d, node=%u, "
"cookie=%"MLFu64", ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n", "cookie=%u:%llu, ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n",
lock->ml.type, lock->ml.convert_type, lock->ml.node, lock->ml.cookie, lock->ml.type, lock->ml.convert_type, lock->ml.node,
dlm_get_lock_cookie_node(lock->ml.cookie),
dlm_get_lock_cookie_seq(lock->ml.cookie),
list_empty(&lock->ast_list) ? 'y' : 'n', list_empty(&lock->ast_list) ? 'y' : 'n',
lock->ast_pending ? 'y' : 'n', lock->ast_pending ? 'y' : 'n',
list_empty(&lock->bast_list) ? 'y' : 'n', list_empty(&lock->bast_list) ? 'y' : 'n',
......
...@@ -141,13 +141,23 @@ static enum dlm_status dlmlock_master(struct dlm_ctxt *dlm, ...@@ -141,13 +141,23 @@ static enum dlm_status dlmlock_master(struct dlm_ctxt *dlm,
res->lockname.len)) { res->lockname.len)) {
kick_thread = 1; kick_thread = 1;
call_ast = 1; call_ast = 1;
} else {
mlog(0, "%s: returning DLM_NORMAL to "
"node %u for reco lock\n", dlm->name,
lock->ml.node);
} }
} else { } else {
/* for NOQUEUE request, unless we get the /* for NOQUEUE request, unless we get the
* lock right away, return DLM_NOTQUEUED */ * lock right away, return DLM_NOTQUEUED */
if (flags & LKM_NOQUEUE) if (flags & LKM_NOQUEUE) {
status = DLM_NOTQUEUED; status = DLM_NOTQUEUED;
else { if (dlm_is_recovery_lock(res->lockname.name,
res->lockname.len)) {
mlog(0, "%s: returning NOTQUEUED to "
"node %u for reco lock\n", dlm->name,
lock->ml.node);
}
} else {
dlm_lock_get(lock); dlm_lock_get(lock);
list_add_tail(&lock->list, &res->blocked); list_add_tail(&lock->list, &res->blocked);
kick_thread = 1; kick_thread = 1;
......
This diff is collapsed.
...@@ -58,7 +58,7 @@ static void dlm_do_local_recovery_cleanup(struct dlm_ctxt *dlm, u8 dead_node); ...@@ -58,7 +58,7 @@ static void dlm_do_local_recovery_cleanup(struct dlm_ctxt *dlm, u8 dead_node);
static int dlm_recovery_thread(void *data); static int dlm_recovery_thread(void *data);
void dlm_complete_recovery_thread(struct dlm_ctxt *dlm); void dlm_complete_recovery_thread(struct dlm_ctxt *dlm);
int dlm_launch_recovery_thread(struct dlm_ctxt *dlm); int dlm_launch_recovery_thread(struct dlm_ctxt *dlm);
static void dlm_kick_recovery_thread(struct dlm_ctxt *dlm); void dlm_kick_recovery_thread(struct dlm_ctxt *dlm);
static int dlm_do_recovery(struct dlm_ctxt *dlm); static int dlm_do_recovery(struct dlm_ctxt *dlm);
static int dlm_pick_recovery_master(struct dlm_ctxt *dlm); static int dlm_pick_recovery_master(struct dlm_ctxt *dlm);
...@@ -78,15 +78,9 @@ static int dlm_send_mig_lockres_msg(struct dlm_ctxt *dlm, ...@@ -78,15 +78,9 @@ static int dlm_send_mig_lockres_msg(struct dlm_ctxt *dlm,
u8 send_to, u8 send_to,
struct dlm_lock_resource *res, struct dlm_lock_resource *res,
int total_locks); int total_locks);
static int dlm_lockres_master_requery(struct dlm_ctxt *dlm,
struct dlm_lock_resource *res,
u8 *real_master);
static int dlm_process_recovery_data(struct dlm_ctxt *dlm, static int dlm_process_recovery_data(struct dlm_ctxt *dlm,
struct dlm_lock_resource *res, struct dlm_lock_resource *res,
struct dlm_migratable_lockres *mres); struct dlm_migratable_lockres *mres);
static int dlm_do_master_requery(struct dlm_ctxt *dlm,
struct dlm_lock_resource *res,
u8 nodenum, u8 *real_master);
static int dlm_send_finalize_reco_message(struct dlm_ctxt *dlm); static int dlm_send_finalize_reco_message(struct dlm_ctxt *dlm);
static int dlm_send_all_done_msg(struct dlm_ctxt *dlm, static int dlm_send_all_done_msg(struct dlm_ctxt *dlm,
u8 dead_node, u8 send_to); u8 dead_node, u8 send_to);
...@@ -165,7 +159,7 @@ void dlm_dispatch_work(void *data) ...@@ -165,7 +159,7 @@ void dlm_dispatch_work(void *data)
* RECOVERY THREAD * RECOVERY THREAD
*/ */
static void dlm_kick_recovery_thread(struct dlm_ctxt *dlm) void dlm_kick_recovery_thread(struct dlm_ctxt *dlm)
{ {
/* wake the recovery thread /* wake the recovery thread
* this will wake the reco thread in one of three places * this will wake the reco thread in one of three places
...@@ -750,10 +744,12 @@ static void dlm_request_all_locks_worker(struct dlm_work_item *item, void *data) ...@@ -750,10 +744,12 @@ static void dlm_request_all_locks_worker(struct dlm_work_item *item, void *data)
dlm->name, dlm->reco.dead_node, dlm->reco.new_master, dlm->name, dlm->reco.dead_node, dlm->reco.new_master,
dead_node, reco_master); dead_node, reco_master);
mlog(ML_ERROR, "%s: name=%.*s master=%u locks=%u/%u flags=%u " mlog(ML_ERROR, "%s: name=%.*s master=%u locks=%u/%u flags=%u "
"entry[0]={c=%"MLFu64",l=%u,f=%u,t=%d,ct=%d,hb=%d,n=%u}\n", "entry[0]={c=%u:%llu,l=%u,f=%u,t=%d,ct=%d,hb=%d,n=%u}\n",
dlm->name, mres->lockname_len, mres->lockname, mres->master, dlm->name, mres->lockname_len, mres->lockname, mres->master,
mres->num_locks, mres->total_locks, mres->flags, mres->num_locks, mres->total_locks, mres->flags,
mres->ml[0].cookie, mres->ml[0].list, mres->ml[0].flags, dlm_get_lock_cookie_node(mres->ml[0].cookie),
dlm_get_lock_cookie_seq(mres->ml[0].cookie),
mres->ml[0].list, mres->ml[0].flags,
mres->ml[0].type, mres->ml[0].convert_type, mres->ml[0].type, mres->ml[0].convert_type,
mres->ml[0].highest_blocked, mres->ml[0].node); mres->ml[0].highest_blocked, mres->ml[0].node);
BUG(); BUG();
...@@ -1316,9 +1312,8 @@ static void dlm_mig_lockres_worker(struct dlm_work_item *item, void *data) ...@@ -1316,9 +1312,8 @@ static void dlm_mig_lockres_worker(struct dlm_work_item *item, void *data)
static int dlm_lockres_master_requery(struct dlm_ctxt *dlm, int dlm_lockres_master_requery(struct dlm_ctxt *dlm,
struct dlm_lock_resource *res, struct dlm_lock_resource *res, u8 *real_master)
u8 *real_master)
{ {
struct dlm_node_iter iter; struct dlm_node_iter iter;
int nodenum; int nodenum;
...@@ -1360,8 +1355,10 @@ static int dlm_lockres_master_requery(struct dlm_ctxt *dlm, ...@@ -1360,8 +1355,10 @@ static int dlm_lockres_master_requery(struct dlm_ctxt *dlm,
ret = dlm_do_master_requery(dlm, res, nodenum, real_master); ret = dlm_do_master_requery(dlm, res, nodenum, real_master);
if (ret < 0) { if (ret < 0) {
mlog_errno(ret); mlog_errno(ret);
if (!dlm_is_host_down(ret))
BUG(); BUG();
/* TODO: need to figure a way to restart this */ /* host is down, so answer for that node would be
* DLM_LOCK_RES_OWNER_UNKNOWN. continue. */
} }
if (*real_master != DLM_LOCK_RES_OWNER_UNKNOWN) { if (*real_master != DLM_LOCK_RES_OWNER_UNKNOWN) {
mlog(0, "lock master is %u\n", *real_master); mlog(0, "lock master is %u\n", *real_master);
...@@ -1372,8 +1369,7 @@ static int dlm_lockres_master_requery(struct dlm_ctxt *dlm, ...@@ -1372,8 +1369,7 @@ static int dlm_lockres_master_requery(struct dlm_ctxt *dlm,
} }
static int dlm_do_master_requery(struct dlm_ctxt *dlm, int dlm_do_master_requery(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
struct dlm_lock_resource *res,
u8 nodenum, u8 *real_master) u8 nodenum, u8 *real_master)
{ {
int ret = -EINVAL; int ret = -EINVAL;
...@@ -1519,9 +1515,11 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm, ...@@ -1519,9 +1515,11 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm,
/* lock is always created locally first, and /* lock is always created locally first, and
* destroyed locally last. it must be on the list */ * destroyed locally last. it must be on the list */
if (!lock) { if (!lock) {
u64 c = ml->cookie;
mlog(ML_ERROR, "could not find local lock " mlog(ML_ERROR, "could not find local lock "
"with cookie %"MLFu64"!\n", "with cookie %u:%llu!\n",
ml->cookie); dlm_get_lock_cookie_node(c),
dlm_get_lock_cookie_seq(c));
BUG(); BUG();
} }
BUG_ON(lock->ml.node != ml->node); BUG_ON(lock->ml.node != ml->node);
...@@ -1739,6 +1737,13 @@ static void dlm_finish_local_lockres_recovery(struct dlm_ctxt *dlm, ...@@ -1739,6 +1737,13 @@ static void dlm_finish_local_lockres_recovery(struct dlm_ctxt *dlm,
} else } else
continue; continue;
if (!list_empty(&res->recovering)) {
mlog(0, "%s:%.*s: lockres was "
"marked RECOVERING, owner=%u\n",
dlm->name, res->lockname.len,
res->lockname.name, res->owner);
list_del_init(&res->recovering);
}
spin_lock(&res->spinlock); spin_lock(&res->spinlock);
dlm_change_lockres_owner(dlm, res, new_master); dlm_change_lockres_owner(dlm, res, new_master);
res->state &= ~DLM_LOCK_RES_RECOVERING; res->state &= ~DLM_LOCK_RES_RECOVERING;
...@@ -2258,7 +2263,10 @@ int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data) ...@@ -2258,7 +2263,10 @@ int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data)
mlog(0, "%u not in domain/live_nodes map " mlog(0, "%u not in domain/live_nodes map "
"so setting it in reco map manually\n", "so setting it in reco map manually\n",
br->dead_node); br->dead_node);
set_bit(br->dead_node, dlm->recovery_map); /* force the recovery cleanup in __dlm_hb_node_down
* both of these will be cleared in a moment */
set_bit(br->dead_node, dlm->domain_map);
set_bit(br->dead_node, dlm->live_nodes_map);
__dlm_hb_node_down(dlm, br->dead_node); __dlm_hb_node_down(dlm, br->dead_node);
} }
spin_unlock(&dlm->spinlock); spin_unlock(&dlm->spinlock);
......
...@@ -244,8 +244,10 @@ static enum dlm_status dlmunlock_common(struct dlm_ctxt *dlm, ...@@ -244,8 +244,10 @@ static enum dlm_status dlmunlock_common(struct dlm_ctxt *dlm,
if (actions & DLM_UNLOCK_FREE_LOCK) { if (actions & DLM_UNLOCK_FREE_LOCK) {
/* this should always be coupled with list removal */ /* this should always be coupled with list removal */
BUG_ON(!(actions & DLM_UNLOCK_REMOVE_LOCK)); BUG_ON(!(actions & DLM_UNLOCK_REMOVE_LOCK));
mlog(0, "lock %"MLFu64" should be gone now! refs=%d\n", mlog(0, "lock %u:%llu should be gone now! refs=%d\n",
lock->ml.cookie, atomic_read(&lock->lock_refs.refcount)-1); dlm_get_lock_cookie_node(lock->ml.cookie),
dlm_get_lock_cookie_seq(lock->ml.cookie),
atomic_read(&lock->lock_refs.refcount)-1);
dlm_lock_put(lock); dlm_lock_put(lock);
} }
if (actions & DLM_UNLOCK_CALL_AST) if (actions & DLM_UNLOCK_CALL_AST)
...@@ -493,8 +495,9 @@ int dlm_unlock_lock_handler(struct o2net_msg *msg, u32 len, void *data) ...@@ -493,8 +495,9 @@ int dlm_unlock_lock_handler(struct o2net_msg *msg, u32 len, void *data)
not_found: not_found:
if (!found) if (!found)
mlog(ML_ERROR, "failed to find lock to unlock! " mlog(ML_ERROR, "failed to find lock to unlock! "
"cookie=%"MLFu64"\n", "cookie=%u:%llu\n",
unlock->cookie); dlm_get_lock_cookie_node(unlock->cookie),
dlm_get_lock_cookie_seq(unlock->cookie));
else { else {
/* send the lksb->status back to the other node */ /* send the lksb->status back to the other node */
status = lksb->status; status = lksb->status;
......
...@@ -231,9 +231,9 @@ static void ocfs2_build_lock_name(enum ocfs2_lock_type type, ...@@ -231,9 +231,9 @@ static void ocfs2_build_lock_name(enum ocfs2_lock_type type,
BUG_ON(type >= OCFS2_NUM_LOCK_TYPES); BUG_ON(type >= OCFS2_NUM_LOCK_TYPES);
len = snprintf(name, OCFS2_LOCK_ID_MAX_LEN, "%c%s%016"MLFx64"%08x", len = snprintf(name, OCFS2_LOCK_ID_MAX_LEN, "%c%s%016llx%08x",
ocfs2_lock_type_char(type), OCFS2_LOCK_ID_PAD, blkno, ocfs2_lock_type_char(type), OCFS2_LOCK_ID_PAD,
generation); (long long)blkno, generation);
BUG_ON(len != (OCFS2_LOCK_ID_MAX_LEN - 1)); BUG_ON(len != (OCFS2_LOCK_ID_MAX_LEN - 1));
...@@ -533,8 +533,8 @@ static void ocfs2_inode_ast_func(void *opaque) ...@@ -533,8 +533,8 @@ static void ocfs2_inode_ast_func(void *opaque)
inode = ocfs2_lock_res_inode(lockres); inode = ocfs2_lock_res_inode(lockres);
mlog(0, "AST fired for inode %"MLFu64", l_action = %u, type = %s\n", mlog(0, "AST fired for inode %llu, l_action = %u, type = %s\n",
OCFS2_I(inode)->ip_blkno, lockres->l_action, (unsigned long long)OCFS2_I(inode)->ip_blkno, lockres->l_action,
ocfs2_lock_type_string(lockres->l_type)); ocfs2_lock_type_string(lockres->l_type));
BUG_ON(!ocfs2_is_inode_lock(lockres)); BUG_ON(!ocfs2_is_inode_lock(lockres));
...@@ -544,8 +544,8 @@ static void ocfs2_inode_ast_func(void *opaque) ...@@ -544,8 +544,8 @@ static void ocfs2_inode_ast_func(void *opaque)
lksb = &(lockres->l_lksb); lksb = &(lockres->l_lksb);
if (lksb->status != DLM_NORMAL) { if (lksb->status != DLM_NORMAL) {
mlog(ML_ERROR, "ocfs2_inode_ast_func: lksb status value of %u " mlog(ML_ERROR, "ocfs2_inode_ast_func: lksb status value of %u "
"on inode %"MLFu64"\n", lksb->status, "on inode %llu\n", lksb->status,
OCFS2_I(inode)->ip_blkno); (unsigned long long)OCFS2_I(inode)->ip_blkno);
spin_unlock_irqrestore(&lockres->l_lock, flags); spin_unlock_irqrestore(&lockres->l_lock, flags);
mlog_exit_void(); mlog_exit_void();
return; return;
...@@ -646,10 +646,9 @@ static void ocfs2_inode_bast_func(void *opaque, int level) ...@@ -646,10 +646,9 @@ static void ocfs2_inode_bast_func(void *opaque, int level)
inode = ocfs2_lock_res_inode(lockres); inode = ocfs2_lock_res_inode(lockres);
osb = OCFS2_SB(inode->i_sb); osb = OCFS2_SB(inode->i_sb);
mlog(0, "BAST fired for inode %"MLFu64", blocking = %d, level = %d " mlog(0, "BAST fired for inode %llu, blocking %d, level %d type %s\n",
"type = %s\n", OCFS2_I(inode)->ip_blkno, level, (unsigned long long)OCFS2_I(inode)->ip_blkno, level,
lockres->l_level, lockres->l_level, ocfs2_lock_type_string(lockres->l_type));
ocfs2_lock_type_string(lockres->l_type));
ocfs2_generic_bast_func(osb, lockres, level); ocfs2_generic_bast_func(osb, lockres, level);
...@@ -1104,7 +1103,7 @@ int ocfs2_create_new_inode_locks(struct inode *inode) ...@@ -1104,7 +1103,7 @@ int ocfs2_create_new_inode_locks(struct inode *inode)
mlog_entry_void(); mlog_entry_void();
mlog(0, "Inode %"MLFu64"\n", OCFS2_I(inode)->ip_blkno); mlog(0, "Inode %llu\n", (unsigned long long)OCFS2_I(inode)->ip_blkno);
/* NOTE: That we don't increment any of the holder counts, nor /* NOTE: That we don't increment any of the holder counts, nor
* do we add anything to a journal handle. Since this is * do we add anything to a journal handle. Since this is
...@@ -1149,8 +1148,8 @@ int ocfs2_rw_lock(struct inode *inode, int write) ...@@ -1149,8 +1148,8 @@ int ocfs2_rw_lock(struct inode *inode, int write)
mlog_entry_void(); mlog_entry_void();
mlog(0, "inode %"MLFu64" take %s RW lock\n", mlog(0, "inode %llu take %s RW lock\n",
OCFS2_I(inode)->ip_blkno, (unsigned long long)OCFS2_I(inode)->ip_blkno,
write ? "EXMODE" : "PRMODE"); write ? "EXMODE" : "PRMODE");
lockres = &OCFS2_I(inode)->ip_rw_lockres; lockres = &OCFS2_I(inode)->ip_rw_lockres;
...@@ -1173,8 +1172,8 @@ void ocfs2_rw_unlock(struct inode *inode, int write) ...@@ -1173,8 +1172,8 @@ void ocfs2_rw_unlock(struct inode *inode, int write)
mlog_entry_void(); mlog_entry_void();
mlog(0, "inode %"MLFu64" drop %s RW lock\n", mlog(0, "inode %llu drop %s RW lock\n",
OCFS2_I(inode)->ip_blkno, (unsigned long long)OCFS2_I(inode)->ip_blkno,
write ? "EXMODE" : "PRMODE"); write ? "EXMODE" : "PRMODE");
ocfs2_cluster_unlock(OCFS2_SB(inode->i_sb), lockres, level); ocfs2_cluster_unlock(OCFS2_SB(inode->i_sb), lockres, level);
...@@ -1193,8 +1192,8 @@ int ocfs2_data_lock_full(struct inode *inode, ...@@ -1193,8 +1192,8 @@ int ocfs2_data_lock_full(struct inode *inode,
mlog_entry_void(); mlog_entry_void();
mlog(0, "inode %"MLFu64" take %s DATA lock\n", mlog(0, "inode %llu take %s DATA lock\n",
OCFS2_I(inode)->ip_blkno, (unsigned long long)OCFS2_I(inode)->ip_blkno,
write ? "EXMODE" : "PRMODE"); write ? "EXMODE" : "PRMODE");
/* We'll allow faking a readonly data lock for /* We'll allow faking a readonly data lock for
...@@ -1278,8 +1277,8 @@ void ocfs2_data_unlock(struct inode *inode, ...@@ -1278,8 +1277,8 @@ void ocfs2_data_unlock(struct inode *inode,
mlog_entry_void(); mlog_entry_void();
mlog(0, "inode %"MLFu64" drop %s DATA lock\n", mlog(0, "inode %llu drop %s DATA lock\n",
OCFS2_I(inode)->ip_blkno, (unsigned long long)OCFS2_I(inode)->ip_blkno,
write ? "EXMODE" : "PRMODE"); write ? "EXMODE" : "PRMODE");
if (!ocfs2_is_hard_readonly(OCFS2_SB(inode->i_sb))) if (!ocfs2_is_hard_readonly(OCFS2_SB(inode->i_sb)))
...@@ -1462,9 +1461,9 @@ static int ocfs2_meta_lock_update(struct inode *inode, ...@@ -1462,9 +1461,9 @@ static int ocfs2_meta_lock_update(struct inode *inode,
spin_lock(&oi->ip_lock); spin_lock(&oi->ip_lock);
if (oi->ip_flags & OCFS2_INODE_DELETED) { if (oi->ip_flags & OCFS2_INODE_DELETED) {
mlog(0, "Orphaned inode %"MLFu64" was deleted while we " mlog(0, "Orphaned inode %llu was deleted while we "
"were waiting on a lock. ip_flags = 0x%x\n", "were waiting on a lock. ip_flags = 0x%x\n",
oi->ip_blkno, oi->ip_flags); (unsigned long long)oi->ip_blkno, oi->ip_flags);
spin_unlock(&oi->ip_lock); spin_unlock(&oi->ip_lock);
status = -ENOENT; status = -ENOENT;
goto bail; goto bail;
...@@ -1485,8 +1484,8 @@ static int ocfs2_meta_lock_update(struct inode *inode, ...@@ -1485,8 +1484,8 @@ static int ocfs2_meta_lock_update(struct inode *inode,
ocfs2_extent_map_trunc(inode, 0); ocfs2_extent_map_trunc(inode, 0);
if (ocfs2_meta_lvb_is_trustable(lockres)) { if (ocfs2_meta_lvb_is_trustable(lockres)) {
mlog(0, "Trusting LVB on inode %"MLFu64"\n", mlog(0, "Trusting LVB on inode %llu\n",
oi->ip_blkno); (unsigned long long)oi->ip_blkno);
ocfs2_refresh_inode_from_lvb(inode); ocfs2_refresh_inode_from_lvb(inode);
} else { } else {
/* Boo, we have to go to disk. */ /* Boo, we have to go to disk. */
...@@ -1514,15 +1513,16 @@ static int ocfs2_meta_lock_update(struct inode *inode, ...@@ -1514,15 +1513,16 @@ static int ocfs2_meta_lock_update(struct inode *inode,
} }
mlog_bug_on_msg(inode->i_generation != mlog_bug_on_msg(inode->i_generation !=
le32_to_cpu(fe->i_generation), le32_to_cpu(fe->i_generation),
"Invalid dinode %"MLFu64" disk generation: %u " "Invalid dinode %llu disk generation: %u "
"inode->i_generation: %u\n", "inode->i_generation: %u\n",
oi->ip_blkno, le32_to_cpu(fe->i_generation), (unsigned long long)oi->ip_blkno,
le32_to_cpu(fe->i_generation),
inode->i_generation); inode->i_generation);
mlog_bug_on_msg(le64_to_cpu(fe->i_dtime) || mlog_bug_on_msg(le64_to_cpu(fe->i_dtime) ||
!(fe->i_flags & cpu_to_le32(OCFS2_VALID_FL)), !(fe->i_flags & cpu_to_le32(OCFS2_VALID_FL)),
"Stale dinode %"MLFu64" dtime: %"MLFu64" " "Stale dinode %llu dtime: %llu flags: 0x%x\n",
"flags: 0x%x\n", oi->ip_blkno, (unsigned long long)oi->ip_blkno,
le64_to_cpu(fe->i_dtime), (unsigned long long)le64_to_cpu(fe->i_dtime),
le32_to_cpu(fe->i_flags)); le32_to_cpu(fe->i_flags));
ocfs2_refresh_inode(inode, fe); ocfs2_refresh_inode(inode, fe);
...@@ -1581,8 +1581,8 @@ int ocfs2_meta_lock_full(struct inode *inode, ...@@ -1581,8 +1581,8 @@ int ocfs2_meta_lock_full(struct inode *inode,
mlog_entry_void(); mlog_entry_void();
mlog(0, "inode %"MLFu64", take %s META lock\n", mlog(0, "inode %llu, take %s META lock\n",
OCFS2_I(inode)->ip_blkno, (unsigned long long)OCFS2_I(inode)->ip_blkno,
ex ? "EXMODE" : "PRMODE"); ex ? "EXMODE" : "PRMODE");
status = 0; status = 0;
...@@ -1716,8 +1716,8 @@ void ocfs2_meta_unlock(struct inode *inode, ...@@ -1716,8 +1716,8 @@ void ocfs2_meta_unlock(struct inode *inode,
mlog_entry_void(); mlog_entry_void();
mlog(0, "inode %"MLFu64" drop %s META lock\n", mlog(0, "inode %llu drop %s META lock\n",
OCFS2_I(inode)->ip_blkno, (unsigned long long)OCFS2_I(inode)->ip_blkno,
ex ? "EXMODE" : "PRMODE"); ex ? "EXMODE" : "PRMODE");
if (!ocfs2_is_hard_readonly(OCFS2_SB(inode->i_sb))) if (!ocfs2_is_hard_readonly(OCFS2_SB(inode->i_sb)))
...@@ -2686,8 +2686,8 @@ static void ocfs2_data_convert_worker(struct ocfs2_lock_res *lockres, ...@@ -2686,8 +2686,8 @@ static void ocfs2_data_convert_worker(struct ocfs2_lock_res *lockres,
mapping = inode->i_mapping; mapping = inode->i_mapping;
if (filemap_fdatawrite(mapping)) { if (filemap_fdatawrite(mapping)) {
mlog(ML_ERROR, "Could not sync inode %"MLFu64" for downconvert!", mlog(ML_ERROR, "Could not sync inode %llu for downconvert!",
OCFS2_I(inode)->ip_blkno); (unsigned long long)OCFS2_I(inode)->ip_blkno);
} }
sync_mapping_buffers(mapping); sync_mapping_buffers(mapping);
if (blocking == LKM_EXMODE) { if (blocking == LKM_EXMODE) {
...@@ -2717,7 +2717,8 @@ int ocfs2_unblock_data(struct ocfs2_lock_res *lockres, ...@@ -2717,7 +2717,8 @@ int ocfs2_unblock_data(struct ocfs2_lock_res *lockres,
inode = ocfs2_lock_res_inode(lockres); inode = ocfs2_lock_res_inode(lockres);
osb = OCFS2_SB(inode->i_sb); osb = OCFS2_SB(inode->i_sb);
mlog(0, "unblock inode %"MLFu64"\n", OCFS2_I(inode)->ip_blkno); mlog(0, "unblock inode %llu\n",
(unsigned long long)OCFS2_I(inode)->ip_blkno);
status = ocfs2_generic_unblock_lock(osb, status = ocfs2_generic_unblock_lock(osb,
lockres, lockres,
...@@ -2726,8 +2727,8 @@ int ocfs2_unblock_data(struct ocfs2_lock_res *lockres, ...@@ -2726,8 +2727,8 @@ int ocfs2_unblock_data(struct ocfs2_lock_res *lockres,
if (status < 0) if (status < 0)
mlog_errno(status); mlog_errno(status);
mlog(0, "inode %"MLFu64", requeue = %d\n", mlog(0, "inode %llu, requeue = %d\n",
OCFS2_I(inode)->ip_blkno, *requeue); (unsigned long long)OCFS2_I(inode)->ip_blkno, *requeue);
mlog_exit(status); mlog_exit(status);
return status; return status;
...@@ -2767,14 +2768,15 @@ int ocfs2_unblock_meta(struct ocfs2_lock_res *lockres, ...@@ -2767,14 +2768,15 @@ int ocfs2_unblock_meta(struct ocfs2_lock_res *lockres,
inode = ocfs2_lock_res_inode(lockres); inode = ocfs2_lock_res_inode(lockres);
mlog(0, "unblock inode %"MLFu64"\n", OCFS2_I(inode)->ip_blkno); mlog(0, "unblock inode %llu\n",
(unsigned long long)OCFS2_I(inode)->ip_blkno);
status = ocfs2_do_unblock_meta(inode, requeue); status = ocfs2_do_unblock_meta(inode, requeue);
if (status < 0) if (status < 0)
mlog_errno(status); mlog_errno(status);
mlog(0, "inode %"MLFu64", requeue = %d\n", mlog(0, "inode %llu, requeue = %d\n",
OCFS2_I(inode)->ip_blkno, *requeue); (unsigned long long)OCFS2_I(inode)->ip_blkno, *requeue);
mlog_exit(status); mlog_exit(status);
return status; return status;
...@@ -2893,12 +2895,13 @@ void ocfs2_dump_meta_lvb_info(u64 level, ...@@ -2893,12 +2895,13 @@ void ocfs2_dump_meta_lvb_info(u64 level,
lockres->l_name, function, line); lockres->l_name, function, line);
mlog(level, "version: %u, clusters: %u\n", mlog(level, "version: %u, clusters: %u\n",
be32_to_cpu(lvb->lvb_version), be32_to_cpu(lvb->lvb_iclusters)); be32_to_cpu(lvb->lvb_version), be32_to_cpu(lvb->lvb_iclusters));
mlog(level, "size: %"MLFu64", uid %u, gid %u, mode 0x%x\n", mlog(level, "size: %llu, uid %u, gid %u, mode 0x%x\n",
be64_to_cpu(lvb->lvb_isize), be32_to_cpu(lvb->lvb_iuid), (unsigned long long)be64_to_cpu(lvb->lvb_isize),
be32_to_cpu(lvb->lvb_igid), be16_to_cpu(lvb->lvb_imode)); be32_to_cpu(lvb->lvb_iuid), be32_to_cpu(lvb->lvb_igid),
mlog(level, "nlink %u, atime_packed 0x%"MLFx64", " be16_to_cpu(lvb->lvb_imode));
"ctime_packed 0x%"MLFx64", mtime_packed 0x%"MLFx64"\n", mlog(level, "nlink %u, atime_packed 0x%llx, ctime_packed 0x%llx, "
be16_to_cpu(lvb->lvb_inlink), be64_to_cpu(lvb->lvb_iatime_packed), "mtime_packed 0x%llx\n", be16_to_cpu(lvb->lvb_inlink),
be64_to_cpu(lvb->lvb_ictime_packed), (long long)be64_to_cpu(lvb->lvb_iatime_packed),
be64_to_cpu(lvb->lvb_imtime_packed)); (long long)be64_to_cpu(lvb->lvb_ictime_packed),
(long long)be64_to_cpu(lvb->lvb_imtime_packed));
} }
...@@ -95,8 +95,8 @@ static struct dentry *ocfs2_get_parent(struct dentry *child) ...@@ -95,8 +95,8 @@ static struct dentry *ocfs2_get_parent(struct dentry *child)
mlog_entry("(0x%p, '%.*s')\n", child, mlog_entry("(0x%p, '%.*s')\n", child,
child->d_name.len, child->d_name.name); child->d_name.len, child->d_name.name);
mlog(0, "find parent of directory %"MLFu64"\n", mlog(0, "find parent of directory %llu\n",
OCFS2_I(dir)->ip_blkno); (unsigned long long)OCFS2_I(dir)->ip_blkno);
status = ocfs2_meta_lock(dir, NULL, NULL, 0); status = ocfs2_meta_lock(dir, NULL, NULL, 0);
if (status < 0) { if (status < 0) {
...@@ -115,7 +115,8 @@ static struct dentry *ocfs2_get_parent(struct dentry *child) ...@@ -115,7 +115,8 @@ static struct dentry *ocfs2_get_parent(struct dentry *child)
inode = ocfs2_iget(OCFS2_SB(dir->i_sb), blkno); inode = ocfs2_iget(OCFS2_SB(dir->i_sb), blkno);
if (IS_ERR(inode)) { if (IS_ERR(inode)) {
mlog(ML_ERROR, "Unable to create inode %"MLFu64"\n", blkno); mlog(ML_ERROR, "Unable to create inode %llu\n",
(unsigned long long)blkno);
parent = ERR_PTR(-EACCES); parent = ERR_PTR(-EACCES);
goto bail_unlock; goto bail_unlock;
} }
...@@ -160,8 +161,8 @@ static int ocfs2_encode_fh(struct dentry *dentry, __be32 *fh, int *max_len, ...@@ -160,8 +161,8 @@ static int ocfs2_encode_fh(struct dentry *dentry, __be32 *fh, int *max_len,
blkno = OCFS2_I(inode)->ip_blkno; blkno = OCFS2_I(inode)->ip_blkno;
generation = inode->i_generation; generation = inode->i_generation;
mlog(0, "Encoding fh: blkno: %"MLFu64", generation: %u\n", mlog(0, "Encoding fh: blkno: %llu, generation: %u\n",
blkno, generation); (unsigned long long)blkno, generation);
len = 3; len = 3;
fh[0] = cpu_to_le32((u32)(blkno >> 32)); fh[0] = cpu_to_le32((u32)(blkno >> 32));
...@@ -186,8 +187,8 @@ static int ocfs2_encode_fh(struct dentry *dentry, __be32 *fh, int *max_len, ...@@ -186,8 +187,8 @@ static int ocfs2_encode_fh(struct dentry *dentry, __be32 *fh, int *max_len,
len = 6; len = 6;
type = 2; type = 2;
mlog(0, "Encoding parent: blkno: %"MLFu64", generation: %u\n", mlog(0, "Encoding parent: blkno: %llu, generation: %u\n",
blkno, generation); (unsigned long long)blkno, generation);
} }
*max_len = len; *max_len = len;
...@@ -220,16 +221,17 @@ static struct dentry *ocfs2_decode_fh(struct super_block *sb, __be32 *fh, ...@@ -220,16 +221,17 @@ static struct dentry *ocfs2_decode_fh(struct super_block *sb, __be32 *fh,
parent.ih_blkno |= (u64)le32_to_cpu(fh[4]); parent.ih_blkno |= (u64)le32_to_cpu(fh[4]);
parent.ih_generation = le32_to_cpu(fh[5]); parent.ih_generation = le32_to_cpu(fh[5]);
mlog(0, "Decoding parent: blkno: %"MLFu64", generation: %u\n", mlog(0, "Decoding parent: blkno: %llu, generation: %u\n",
parent.ih_blkno, parent.ih_generation); (unsigned long long)parent.ih_blkno,
parent.ih_generation);
} }
handle.ih_blkno = (u64)le32_to_cpu(fh[0]) << 32; handle.ih_blkno = (u64)le32_to_cpu(fh[0]) << 32;
handle.ih_blkno |= (u64)le32_to_cpu(fh[1]); handle.ih_blkno |= (u64)le32_to_cpu(fh[1]);
handle.ih_generation = le32_to_cpu(fh[2]); handle.ih_generation = le32_to_cpu(fh[2]);
mlog(0, "Encoding fh: blkno: %"MLFu64", generation: %u\n", mlog(0, "Encoding fh: blkno: %llu, generation: %u\n",
handle.ih_blkno, handle.ih_generation); (unsigned long long)handle.ih_blkno, handle.ih_generation);
ret = ocfs2_export_ops.find_exported_dentry(sb, &handle, &parent, ret = ocfs2_export_ops.find_exported_dentry(sb, &handle, &parent,
acceptable, context); acceptable, context);
......
...@@ -182,10 +182,10 @@ static int ocfs2_extent_map_find_leaf(struct inode *inode, ...@@ -182,10 +182,10 @@ static int ocfs2_extent_map_find_leaf(struct inode *inode,
if (rec_end > OCFS2_I(inode)->ip_clusters) { if (rec_end > OCFS2_I(inode)->ip_clusters) {
mlog_errno(ret); mlog_errno(ret);
ocfs2_error(inode->i_sb, ocfs2_error(inode->i_sb,
"Extent %d at e_blkno %"MLFu64" of inode %"MLFu64" goes past ip_clusters of %u\n", "Extent %d at e_blkno %llu of inode %llu goes past ip_clusters of %u\n",
i, i,
le64_to_cpu(rec->e_blkno), (unsigned long long)le64_to_cpu(rec->e_blkno),
OCFS2_I(inode)->ip_blkno, (unsigned long long)OCFS2_I(inode)->ip_blkno,
OCFS2_I(inode)->ip_clusters); OCFS2_I(inode)->ip_clusters);
goto out_free; goto out_free;
} }
...@@ -233,11 +233,11 @@ static int ocfs2_extent_map_find_leaf(struct inode *inode, ...@@ -233,11 +233,11 @@ static int ocfs2_extent_map_find_leaf(struct inode *inode,
if (blkno) { if (blkno) {
mlog_errno(ret); mlog_errno(ret);
ocfs2_error(inode->i_sb, ocfs2_error(inode->i_sb,
"Multiple extents for (cpos = %u, clusters = %u) on inode %"MLFu64"; e_blkno %"MLFu64" and rec %d at e_blkno %"MLFu64"\n", "Multiple extents for (cpos = %u, clusters = %u) on inode %llu; e_blkno %llu and rec %d at e_blkno %llu\n",
cpos, clusters, cpos, clusters,
OCFS2_I(inode)->ip_blkno, (unsigned long long)OCFS2_I(inode)->ip_blkno,
blkno, i, (unsigned long long)blkno, i,
le64_to_cpu(rec->e_blkno)); (unsigned long long)le64_to_cpu(rec->e_blkno));
goto out_free; goto out_free;
} }
...@@ -251,9 +251,9 @@ static int ocfs2_extent_map_find_leaf(struct inode *inode, ...@@ -251,9 +251,9 @@ static int ocfs2_extent_map_find_leaf(struct inode *inode,
ret = -EBADR; ret = -EBADR;
if (!blkno) { if (!blkno) {
ocfs2_error(inode->i_sb, ocfs2_error(inode->i_sb,
"No record found for (cpos = %u, clusters = %u) on inode %"MLFu64"\n", "No record found for (cpos = %u, clusters = %u) on inode %llu\n",
cpos, clusters, cpos, clusters,
OCFS2_I(inode)->ip_blkno); (unsigned long long)OCFS2_I(inode)->ip_blkno);
mlog_errno(ret); mlog_errno(ret);
goto out_free; goto out_free;
} }
...@@ -288,10 +288,10 @@ static int ocfs2_extent_map_find_leaf(struct inode *inode, ...@@ -288,10 +288,10 @@ static int ocfs2_extent_map_find_leaf(struct inode *inode,
ret = -EBADR; ret = -EBADR;
mlog_errno(ret); mlog_errno(ret);
ocfs2_error(inode->i_sb, ocfs2_error(inode->i_sb,
"Extent %d at e_blkno %"MLFu64" of inode %"MLFu64" goes past ip_clusters of %u\n", "Extent %d at e_blkno %llu of inode %llu goes past ip_clusters of %u\n",
i, i,
le64_to_cpu(rec->e_blkno), (unsigned long long)le64_to_cpu(rec->e_blkno),
OCFS2_I(inode)->ip_blkno, (unsigned long long)OCFS2_I(inode)->ip_blkno,
OCFS2_I(inode)->ip_clusters); OCFS2_I(inode)->ip_clusters);
return ret; return ret;
} }
...@@ -557,9 +557,9 @@ static int ocfs2_extent_map_insert(struct inode *inode, ...@@ -557,9 +557,9 @@ static int ocfs2_extent_map_insert(struct inode *inode,
ret = -EBADR; ret = -EBADR;
mlog_errno(ret); mlog_errno(ret);
ocfs2_error(inode->i_sb, ocfs2_error(inode->i_sb,
"Zero e_clusters on non-tail extent record at e_blkno %"MLFu64" on inode %"MLFu64"\n", "Zero e_clusters on non-tail extent record at e_blkno %llu on inode %llu\n",
le64_to_cpu(rec->e_blkno), (unsigned long long)le64_to_cpu(rec->e_blkno),
OCFS2_I(inode)->ip_blkno); (unsigned long long)OCFS2_I(inode)->ip_blkno);
return ret; return ret;
} }
...@@ -660,10 +660,10 @@ int ocfs2_extent_map_append(struct inode *inode, ...@@ -660,10 +660,10 @@ int ocfs2_extent_map_append(struct inode *inode,
mlog_bug_on_msg((le32_to_cpu(rec->e_cpos) + mlog_bug_on_msg((le32_to_cpu(rec->e_cpos) +
le32_to_cpu(rec->e_clusters)) != le32_to_cpu(rec->e_clusters)) !=
(em->em_clusters + new_clusters), (em->em_clusters + new_clusters),
"Inode %"MLFu64":\n" "Inode %llu:\n"
"rec->e_cpos = %u + rec->e_clusters = %u = %u\n" "rec->e_cpos = %u + rec->e_clusters = %u = %u\n"
"em->em_clusters = %u + new_clusters = %u = %u\n", "em->em_clusters = %u + new_clusters = %u = %u\n",
OCFS2_I(inode)->ip_blkno, (unsigned long long)OCFS2_I(inode)->ip_blkno,
le32_to_cpu(rec->e_cpos), le32_to_cpu(rec->e_clusters), le32_to_cpu(rec->e_cpos), le32_to_cpu(rec->e_clusters),
le32_to_cpu(rec->e_cpos) + le32_to_cpu(rec->e_clusters), le32_to_cpu(rec->e_cpos) + le32_to_cpu(rec->e_clusters),
em->em_clusters, new_clusters, em->em_clusters, new_clusters,
......
...@@ -220,8 +220,9 @@ static int ocfs2_truncate_file(struct inode *inode, ...@@ -220,8 +220,9 @@ static int ocfs2_truncate_file(struct inode *inode,
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct ocfs2_truncate_context *tc = NULL; struct ocfs2_truncate_context *tc = NULL;
mlog_entry("(inode = %"MLFu64", new_i_size = %"MLFu64"\n", mlog_entry("(inode = %llu, new_i_size = %llu\n",
OCFS2_I(inode)->ip_blkno, new_i_size); (unsigned long long)OCFS2_I(inode)->ip_blkno,
(unsigned long long)new_i_size);
truncate_inode_pages(inode->i_mapping, new_i_size); truncate_inode_pages(inode->i_mapping, new_i_size);
...@@ -233,23 +234,26 @@ static int ocfs2_truncate_file(struct inode *inode, ...@@ -233,23 +234,26 @@ static int ocfs2_truncate_file(struct inode *inode,
} }
mlog_bug_on_msg(le64_to_cpu(fe->i_size) != i_size_read(inode), mlog_bug_on_msg(le64_to_cpu(fe->i_size) != i_size_read(inode),
"Inode %"MLFu64", inode i_size = %lld != di " "Inode %llu, inode i_size = %lld != di "
"i_size = %"MLFu64", i_flags = 0x%x\n", "i_size = %llu, i_flags = 0x%x\n",
OCFS2_I(inode)->ip_blkno, (unsigned long long)OCFS2_I(inode)->ip_blkno,
i_size_read(inode), i_size_read(inode),
le64_to_cpu(fe->i_size), le32_to_cpu(fe->i_flags)); (unsigned long long)le64_to_cpu(fe->i_size),
le32_to_cpu(fe->i_flags));
if (new_i_size > le64_to_cpu(fe->i_size)) { if (new_i_size > le64_to_cpu(fe->i_size)) {
mlog(0, "asked to truncate file with size (%"MLFu64") " mlog(0, "asked to truncate file with size (%llu) to size (%llu)!\n",
"to size (%"MLFu64")!\n", (unsigned long long)le64_to_cpu(fe->i_size),
le64_to_cpu(fe->i_size), new_i_size); (unsigned long long)new_i_size);
status = -EINVAL; status = -EINVAL;
mlog_errno(status); mlog_errno(status);
goto bail; goto bail;
} }
mlog(0, "inode %"MLFu64", i_size = %"MLFu64", new_i_size = %"MLFu64"\n", mlog(0, "inode %llu, i_size = %llu, new_i_size = %llu\n",
le64_to_cpu(fe->i_blkno), le64_to_cpu(fe->i_size), new_i_size); (unsigned long long)le64_to_cpu(fe->i_blkno),
(unsigned long long)le64_to_cpu(fe->i_size),
(unsigned long long)new_i_size);
/* lets handle the simple truncate cases before doing any more /* lets handle the simple truncate cases before doing any more
* cluster locking. */ * cluster locking. */
...@@ -378,8 +382,8 @@ int ocfs2_do_extend_allocation(struct ocfs2_super *osb, ...@@ -378,8 +382,8 @@ int ocfs2_do_extend_allocation(struct ocfs2_super *osb,
} }
block = ocfs2_clusters_to_blocks(osb->sb, bit_off); block = ocfs2_clusters_to_blocks(osb->sb, bit_off);
mlog(0, "Allocating %u clusters at block %u for inode %"MLFu64"\n", mlog(0, "Allocating %u clusters at block %u for inode %llu\n",
num_bits, bit_off, OCFS2_I(inode)->ip_blkno); num_bits, bit_off, (unsigned long long)OCFS2_I(inode)->ip_blkno);
status = ocfs2_insert_extent(osb, handle, inode, fe_bh, block, status = ocfs2_insert_extent(osb, handle, inode, fe_bh, block,
num_bits, meta_ac); num_bits, meta_ac);
if (status < 0) { if (status < 0) {
...@@ -449,9 +453,9 @@ static int ocfs2_extend_allocation(struct inode *inode, ...@@ -449,9 +453,9 @@ static int ocfs2_extend_allocation(struct inode *inode,
restart_all: restart_all:
BUG_ON(le32_to_cpu(fe->i_clusters) != OCFS2_I(inode)->ip_clusters); BUG_ON(le32_to_cpu(fe->i_clusters) != OCFS2_I(inode)->ip_clusters);
mlog(0, "extend inode %"MLFu64", i_size = %lld, fe->i_clusters = %u, " mlog(0, "extend inode %llu, i_size = %lld, fe->i_clusters = %u, "
"clusters_to_add = %u\n", "clusters_to_add = %u\n",
OCFS2_I(inode)->ip_blkno, i_size_read(inode), (unsigned long long)OCFS2_I(inode)->ip_blkno, i_size_read(inode),
fe->i_clusters, clusters_to_add); fe->i_clusters, clusters_to_add);
handle = ocfs2_alloc_handle(osb); handle = ocfs2_alloc_handle(osb);
...@@ -569,8 +573,8 @@ static int ocfs2_extend_allocation(struct inode *inode, ...@@ -569,8 +573,8 @@ static int ocfs2_extend_allocation(struct inode *inode,
} }
} }
mlog(0, "fe: i_clusters = %u, i_size=%"MLFu64"\n", mlog(0, "fe: i_clusters = %u, i_size=%llu\n",
fe->i_clusters, fe->i_size); fe->i_clusters, (unsigned long long)fe->i_size);
mlog(0, "inode: ip_clusters=%u, i_size=%lld\n", mlog(0, "inode: ip_clusters=%u, i_size=%lld\n",
OCFS2_I(inode)->ip_clusters, i_size_read(inode)); OCFS2_I(inode)->ip_clusters, i_size_read(inode));
...@@ -865,8 +869,8 @@ static int ocfs2_write_remove_suid(struct inode *inode) ...@@ -865,8 +869,8 @@ static int ocfs2_write_remove_suid(struct inode *inode)
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct ocfs2_dinode *di; struct ocfs2_dinode *di;
mlog_entry("(Inode %"MLFu64", mode 0%o)\n", oi->ip_blkno, mlog_entry("(Inode %llu, mode 0%o)\n",
inode->i_mode); (unsigned long long)oi->ip_blkno, inode->i_mode);
handle = ocfs2_start_trans(osb, NULL, OCFS2_INODE_UPDATE_CREDITS); handle = ocfs2_start_trans(osb, NULL, OCFS2_INODE_UPDATE_CREDITS);
if (handle == NULL) { if (handle == NULL) {
......
This diff is collapsed.
...@@ -503,8 +503,8 @@ static void ocfs2_handle_cleanup_locks(struct ocfs2_journal *journal, ...@@ -503,8 +503,8 @@ static void ocfs2_handle_cleanup_locks(struct ocfs2_journal *journal,
ocfs2_meta_unlock(inode, 1); ocfs2_meta_unlock(inode, 1);
if (atomic_read(&inode->i_count) == 1) if (atomic_read(&inode->i_count) == 1)
mlog(ML_ERROR, mlog(ML_ERROR,
"Inode %"MLFu64", I'm doing a last iput for!", "Inode %llu, I'm doing a last iput for!",
OCFS2_I(inode)->ip_blkno); (unsigned long long)OCFS2_I(inode)->ip_blkno);
iput(inode); iput(inode);
kmem_cache_free(ocfs2_lock_cache, lock); kmem_cache_free(ocfs2_lock_cache, lock);
} }
...@@ -640,8 +640,9 @@ static int ocfs2_journal_toggle_dirty(struct ocfs2_super *osb, ...@@ -640,8 +640,9 @@ static int ocfs2_journal_toggle_dirty(struct ocfs2_super *osb,
/* This is called from startup/shutdown which will /* This is called from startup/shutdown which will
* handle the errors in a specific manner, so no need * handle the errors in a specific manner, so no need
* to call ocfs2_error() here. */ * to call ocfs2_error() here. */
mlog(ML_ERROR, "Journal dinode %"MLFu64" has invalid " mlog(ML_ERROR, "Journal dinode %llu has invalid "
"signature: %.*s", fe->i_blkno, 7, fe->i_signature); "signature: %.*s", (unsigned long long)fe->i_blkno, 7,
fe->i_signature);
status = -EIO; status = -EIO;
goto out; goto out;
} }
...@@ -934,8 +935,8 @@ void ocfs2_complete_recovery(void *data) ...@@ -934,8 +935,8 @@ void ocfs2_complete_recovery(void *data)
la_dinode = item->lri_la_dinode; la_dinode = item->lri_la_dinode;
if (la_dinode) { if (la_dinode) {
mlog(0, "Clean up local alloc %"MLFu64"\n", mlog(0, "Clean up local alloc %llu\n",
la_dinode->i_blkno); (unsigned long long)la_dinode->i_blkno);
ret = ocfs2_complete_local_alloc_recovery(osb, ret = ocfs2_complete_local_alloc_recovery(osb,
la_dinode); la_dinode);
...@@ -947,8 +948,8 @@ void ocfs2_complete_recovery(void *data) ...@@ -947,8 +948,8 @@ void ocfs2_complete_recovery(void *data)
tl_dinode = item->lri_tl_dinode; tl_dinode = item->lri_tl_dinode;
if (tl_dinode) { if (tl_dinode) {
mlog(0, "Clean up truncate log %"MLFu64"\n", mlog(0, "Clean up truncate log %llu\n",
tl_dinode->i_blkno); (unsigned long long)tl_dinode->i_blkno);
ret = ocfs2_complete_truncate_log_recovery(osb, ret = ocfs2_complete_truncate_log_recovery(osb,
tl_dinode); tl_dinode);
...@@ -1473,11 +1474,11 @@ static int ocfs2_queue_orphans(struct ocfs2_super *osb, ...@@ -1473,11 +1474,11 @@ static int ocfs2_queue_orphans(struct ocfs2_super *osb,
if (de->file_type > OCFS2_FT_MAX) { if (de->file_type > OCFS2_FT_MAX) {
mlog(ML_ERROR, mlog(ML_ERROR,
"block %llu contains invalid de: " "block %llu contains invalid de: "
"inode = %"MLFu64", rec_len = %u, " "inode = %llu, rec_len = %u, "
"name_len = %u, file_type = %u, " "name_len = %u, file_type = %u, "
"name='%.*s'\n", "name='%.*s'\n",
(unsigned long long)bh->b_blocknr, (unsigned long long)bh->b_blocknr,
le64_to_cpu(de->inode), (unsigned long long)le64_to_cpu(de->inode),
le16_to_cpu(de->rec_len), le16_to_cpu(de->rec_len),
de->name_len, de->name_len,
de->file_type, de->file_type,
...@@ -1494,8 +1495,8 @@ static int ocfs2_queue_orphans(struct ocfs2_super *osb, ...@@ -1494,8 +1495,8 @@ static int ocfs2_queue_orphans(struct ocfs2_super *osb,
if (IS_ERR(iter)) if (IS_ERR(iter))
continue; continue;
mlog(0, "queue orphan %"MLFu64"\n", mlog(0, "queue orphan %llu\n",
OCFS2_I(iter)->ip_blkno); (unsigned long long)OCFS2_I(iter)->ip_blkno);
/* No locking is required for the next_orphan /* No locking is required for the next_orphan
* queue as there is only ever a single * queue as there is only ever a single
* process doing orphan recovery. */ * process doing orphan recovery. */
...@@ -1588,7 +1589,7 @@ static int ocfs2_recover_orphans(struct ocfs2_super *osb, ...@@ -1588,7 +1589,7 @@ static int ocfs2_recover_orphans(struct ocfs2_super *osb,
while (inode) { while (inode) {
oi = OCFS2_I(inode); oi = OCFS2_I(inode);
mlog(0, "iput orphan %"MLFu64"\n", oi->ip_blkno); mlog(0, "iput orphan %llu\n", (unsigned long long)oi->ip_blkno);
iter = oi->ip_next_orphan; iter = oi->ip_next_orphan;
......
...@@ -143,8 +143,8 @@ int ocfs2_load_local_alloc(struct ocfs2_super *osb) ...@@ -143,8 +143,8 @@ int ocfs2_load_local_alloc(struct ocfs2_super *osb)
if (!(le32_to_cpu(alloc->i_flags) & if (!(le32_to_cpu(alloc->i_flags) &
(OCFS2_LOCAL_ALLOC_FL|OCFS2_BITMAP_FL))) { (OCFS2_LOCAL_ALLOC_FL|OCFS2_BITMAP_FL))) {
mlog(ML_ERROR, "Invalid local alloc inode, %"MLFu64"\n", mlog(ML_ERROR, "Invalid local alloc inode, %llu\n",
OCFS2_I(inode)->ip_blkno); (unsigned long long)OCFS2_I(inode)->ip_blkno);
status = -EINVAL; status = -EINVAL;
goto bail; goto bail;
} }
...@@ -493,9 +493,9 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb, ...@@ -493,9 +493,9 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
if (le32_to_cpu(alloc->id1.bitmap1.i_used) != if (le32_to_cpu(alloc->id1.bitmap1.i_used) !=
ocfs2_local_alloc_count_bits(alloc)) { ocfs2_local_alloc_count_bits(alloc)) {
ocfs2_error(osb->sb, "local alloc inode %"MLFu64" says it has " ocfs2_error(osb->sb, "local alloc inode %llu says it has "
"%u free bits, but a count shows %u", "%u free bits, but a count shows %u",
le64_to_cpu(alloc->i_blkno), (unsigned long long)le64_to_cpu(alloc->i_blkno),
le32_to_cpu(alloc->id1.bitmap1.i_used), le32_to_cpu(alloc->id1.bitmap1.i_used),
ocfs2_local_alloc_count_bits(alloc)); ocfs2_local_alloc_count_bits(alloc));
status = -EIO; status = -EIO;
...@@ -753,10 +753,11 @@ static int ocfs2_sync_local_to_main(struct ocfs2_super *osb, ...@@ -753,10 +753,11 @@ static int ocfs2_sync_local_to_main(struct ocfs2_super *osb,
ocfs2_clusters_to_blocks(osb->sb, ocfs2_clusters_to_blocks(osb->sb,
start - count); start - count);
mlog(0, "freeing %u bits starting at local " mlog(0, "freeing %u bits starting at local alloc bit "
"alloc bit %u (la_start_blk = %"MLFu64", " "%u (la_start_blk = %llu, blkno = %llu)\n",
"blkno = %"MLFu64")\n", count, start - count, count, start - count,
la_start_blk, blkno); (unsigned long long)la_start_blk,
(unsigned long long)blkno);
status = ocfs2_free_clusters(handle, main_bm_inode, status = ocfs2_free_clusters(handle, main_bm_inode,
main_bm_bh, blkno, count); main_bm_bh, blkno, count);
......
...@@ -161,8 +161,8 @@ static struct dentry *ocfs2_lookup(struct inode *dir, struct dentry *dentry, ...@@ -161,8 +161,8 @@ static struct dentry *ocfs2_lookup(struct inode *dir, struct dentry *dentry,
goto bail; goto bail;
} }
mlog(0, "find name %.*s in directory %"MLFu64"\n", dentry->d_name.len, mlog(0, "find name %.*s in directory %llu\n", dentry->d_name.len,
dentry->d_name.name, OCFS2_I(dir)->ip_blkno); dentry->d_name.name, (unsigned long long)OCFS2_I(dir)->ip_blkno);
status = ocfs2_meta_lock(dir, NULL, NULL, 0); status = ocfs2_meta_lock(dir, NULL, NULL, 0);
if (status < 0) { if (status < 0) {
...@@ -180,7 +180,8 @@ static struct dentry *ocfs2_lookup(struct inode *dir, struct dentry *dentry, ...@@ -180,7 +180,8 @@ static struct dentry *ocfs2_lookup(struct inode *dir, struct dentry *dentry,
inode = ocfs2_iget(OCFS2_SB(dir->i_sb), blkno); inode = ocfs2_iget(OCFS2_SB(dir->i_sb), blkno);
if (IS_ERR(inode)) { if (IS_ERR(inode)) {
mlog(ML_ERROR, "Unable to create inode %"MLFu64"\n", blkno); mlog(ML_ERROR, "Unable to create inode %llu\n",
(unsigned long long)blkno);
ret = ERR_PTR(-EACCES); ret = ERR_PTR(-EACCES);
goto bail_unlock; goto bail_unlock;
} }
...@@ -310,8 +311,8 @@ static int ocfs2_mknod(struct inode *dir, ...@@ -310,8 +311,8 @@ static int ocfs2_mknod(struct inode *dir,
osb = OCFS2_SB(dir->i_sb); osb = OCFS2_SB(dir->i_sb);
if (S_ISDIR(mode) && (dir->i_nlink >= OCFS2_LINK_MAX)) { if (S_ISDIR(mode) && (dir->i_nlink >= OCFS2_LINK_MAX)) {
mlog(ML_ERROR, "inode %"MLFu64" has i_nlink of %u\n", mlog(ML_ERROR, "inode %llu has i_nlink of %u\n",
OCFS2_I(dir)->ip_blkno, dir->i_nlink); (unsigned long long)OCFS2_I(dir)->ip_blkno, dir->i_nlink);
status = -EMLINK; status = -EMLINK;
goto leave; goto leave;
} }
...@@ -562,9 +563,9 @@ static int ocfs2_mknod_locked(struct ocfs2_super *osb, ...@@ -562,9 +563,9 @@ static int ocfs2_mknod_locked(struct ocfs2_super *osb,
if (ocfs2_populate_inode(inode, fe, 1) < 0) { if (ocfs2_populate_inode(inode, fe, 1) < 0) {
mlog(ML_ERROR, "populate inode failed! bh->b_blocknr=%llu, " mlog(ML_ERROR, "populate inode failed! bh->b_blocknr=%llu, "
"i_blkno=%"MLFu64", i_ino=%lu\n", "i_blkno=%llu, i_ino=%lu\n",
(unsigned long long) (*new_fe_bh)->b_blocknr, (unsigned long long) (*new_fe_bh)->b_blocknr,
fe->i_blkno, inode->i_ino); (unsigned long long)fe->i_blkno, inode->i_ino);
BUG(); BUG();
} }
...@@ -765,7 +766,7 @@ static int ocfs2_unlink(struct inode *dir, ...@@ -765,7 +766,7 @@ static int ocfs2_unlink(struct inode *dir,
BUG_ON(dentry->d_parent->d_inode != dir); BUG_ON(dentry->d_parent->d_inode != dir);
mlog(0, "ino = %"MLFu64"\n", OCFS2_I(inode)->ip_blkno); mlog(0, "ino = %llu\n", (unsigned long long)OCFS2_I(inode)->ip_blkno);
if (inode == osb->root_inode) { if (inode == osb->root_inode) {
mlog(0, "Cannot delete the root directory\n"); mlog(0, "Cannot delete the root directory\n");
...@@ -799,9 +800,9 @@ static int ocfs2_unlink(struct inode *dir, ...@@ -799,9 +800,9 @@ static int ocfs2_unlink(struct inode *dir,
if (OCFS2_I(inode)->ip_blkno != blkno) { if (OCFS2_I(inode)->ip_blkno != blkno) {
status = -ENOENT; status = -ENOENT;
mlog(0, "ip_blkno (%"MLFu64") != dirent blkno (%"MLFu64") " mlog(0, "ip_blkno %llu != dirent blkno %llu ip_flags = %x\n",
"ip_flags = %x\n", OCFS2_I(inode)->ip_blkno, blkno, (unsigned long long)OCFS2_I(inode)->ip_blkno,
OCFS2_I(inode)->ip_flags); (unsigned long long)blkno, OCFS2_I(inode)->ip_flags);
goto leave; goto leave;
} }
...@@ -946,8 +947,9 @@ static int ocfs2_double_lock(struct ocfs2_super *osb, ...@@ -946,8 +947,9 @@ static int ocfs2_double_lock(struct ocfs2_super *osb,
struct buffer_head **tmpbh; struct buffer_head **tmpbh;
struct inode *tmpinode; struct inode *tmpinode;
mlog_entry("(inode1 = %"MLFu64", inode2 = %"MLFu64")\n", mlog_entry("(inode1 = %llu, inode2 = %llu)\n",
oi1->ip_blkno, oi2->ip_blkno); (unsigned long long)oi1->ip_blkno,
(unsigned long long)oi2->ip_blkno);
BUG_ON(!handle); BUG_ON(!handle);
...@@ -1187,9 +1189,9 @@ static int ocfs2_rename(struct inode *old_dir, ...@@ -1187,9 +1189,9 @@ static int ocfs2_rename(struct inode *old_dir,
if (OCFS2_I(new_inode)->ip_blkno != newfe_blkno) { if (OCFS2_I(new_inode)->ip_blkno != newfe_blkno) {
status = -EACCES; status = -EACCES;
mlog(0, "Inode blkno (%"MLFu64") and dir (%"MLFu64") " mlog(0, "Inode %llu and dir %llu disagree. flags = %x\n",
"disagree. ip_flags = %x\n", (unsigned long long)OCFS2_I(new_inode)->ip_blkno,
OCFS2_I(new_inode)->ip_blkno, newfe_blkno, (unsigned long long)newfe_blkno,
OCFS2_I(new_inode)->ip_flags); OCFS2_I(new_inode)->ip_flags);
goto bail; goto bail;
} }
...@@ -1215,9 +1217,9 @@ static int ocfs2_rename(struct inode *old_dir, ...@@ -1215,9 +1217,9 @@ static int ocfs2_rename(struct inode *old_dir,
newfe = (struct ocfs2_dinode *) newfe_bh->b_data; newfe = (struct ocfs2_dinode *) newfe_bh->b_data;
mlog(0, "aha rename over existing... new_de=%p " mlog(0, "aha rename over existing... new_de=%p new_blkno=%llu "
"new_blkno=%"MLFu64" newfebh=%p bhblocknr=%llu\n", "newfebh=%p bhblocknr=%llu\n", new_de,
new_de, newfe_blkno, newfe_bh, newfe_bh ? (unsigned long long)newfe_blkno, newfe_bh, newfe_bh ?
(unsigned long long)newfe_bh->b_blocknr : 0ULL); (unsigned long long)newfe_bh->b_blocknr : 0ULL);
if (S_ISDIR(new_inode->i_mode) || (new_inode->i_nlink == 1)) { if (S_ISDIR(new_inode->i_mode) || (new_inode->i_nlink == 1)) {
...@@ -1354,8 +1356,8 @@ static int ocfs2_rename(struct inode *old_dir, ...@@ -1354,8 +1356,8 @@ static int ocfs2_rename(struct inode *old_dir,
if (new_dir_nlink != new_dir->i_nlink) { if (new_dir_nlink != new_dir->i_nlink) {
if (!new_dir_bh) { if (!new_dir_bh) {
mlog(ML_ERROR, "need to change nlink for new " mlog(ML_ERROR, "need to change nlink for new "
"dir %"MLFu64" from %d to %d but bh is " "dir %llu from %d to %d but bh is NULL\n",
"NULL\n", OCFS2_I(new_dir)->ip_blkno, (unsigned long long)OCFS2_I(new_dir)->ip_blkno,
(int)new_dir_nlink, new_dir->i_nlink); (int)new_dir_nlink, new_dir->i_nlink);
} else { } else {
struct ocfs2_dinode *fe; struct ocfs2_dinode *fe;
...@@ -1372,10 +1374,9 @@ static int ocfs2_rename(struct inode *old_dir, ...@@ -1372,10 +1374,9 @@ static int ocfs2_rename(struct inode *old_dir,
if (old_dir_nlink != old_dir->i_nlink) { if (old_dir_nlink != old_dir->i_nlink) {
if (!old_dir_bh) { if (!old_dir_bh) {
mlog(ML_ERROR, "need to change nlink for old dir " mlog(ML_ERROR, "need to change nlink for old dir "
"%"MLFu64" from %d to %d but bh is NULL!\n", "%llu from %d to %d but bh is NULL!\n",
OCFS2_I(old_dir)->ip_blkno, (unsigned long long)OCFS2_I(old_dir)->ip_blkno,
(int)old_dir_nlink, (int)old_dir_nlink, old_dir->i_nlink);
old_dir->i_nlink);
} else { } else {
struct ocfs2_dinode *fe; struct ocfs2_dinode *fe;
status = ocfs2_journal_access(handle, old_dir, status = ocfs2_journal_access(handle, old_dir,
...@@ -1634,9 +1635,9 @@ static int ocfs2_symlink(struct inode *dir, ...@@ -1634,9 +1635,9 @@ static int ocfs2_symlink(struct inode *dir,
NULL); NULL);
if (status < 0) { if (status < 0) {
if (status != -ENOSPC && status != -EINTR) { if (status != -ENOSPC && status != -EINTR) {
mlog(ML_ERROR, "Failed to extend file to " mlog(ML_ERROR,
"%"MLFu64"\n", "Failed to extend file to %llu\n",
newsize); (unsigned long long)newsize);
mlog_errno(status); mlog_errno(status);
status = -ENOSPC; status = -ENOSPC;
} }
...@@ -1716,10 +1717,11 @@ int ocfs2_check_dir_entry(struct inode * dir, ...@@ -1716,10 +1717,11 @@ int ocfs2_check_dir_entry(struct inode * dir,
error_msg = "directory entry across blocks"; error_msg = "directory entry across blocks";
if (error_msg != NULL) if (error_msg != NULL)
mlog(ML_ERROR, "bad entry in directory #%"MLFu64": %s - " mlog(ML_ERROR, "bad entry in directory #%llu: %s - "
"offset=%lu, inode=%"MLFu64", rec_len=%d, name_len=%d\n", "offset=%lu, inode=%llu, rec_len=%d, name_len=%d\n",
OCFS2_I(dir)->ip_blkno, error_msg, offset, (unsigned long long)OCFS2_I(dir)->ip_blkno, error_msg,
le64_to_cpu(de->inode), rlen, de->name_len); offset, (unsigned long long)le64_to_cpu(de->inode), rlen,
de->name_len);
return error_msg == NULL ? 1 : 0; return error_msg == NULL ? 1 : 0;
} }
...@@ -2021,8 +2023,8 @@ static int ocfs2_blkno_stringify(u64 blkno, char *name) ...@@ -2021,8 +2023,8 @@ static int ocfs2_blkno_stringify(u64 blkno, char *name)
mlog_entry_void(); mlog_entry_void();
namelen = snprintf(name, OCFS2_ORPHAN_NAMELEN + 1, "%016"MLFx64, namelen = snprintf(name, OCFS2_ORPHAN_NAMELEN + 1, "%016llx",
blkno); (long long)blkno);
if (namelen <= 0) { if (namelen <= 0) {
if (namelen) if (namelen)
status = namelen; status = namelen;
...@@ -2167,8 +2169,8 @@ static int ocfs2_orphan_add(struct ocfs2_super *osb, ...@@ -2167,8 +2169,8 @@ static int ocfs2_orphan_add(struct ocfs2_super *osb,
OCFS2_I(inode)->ip_orphaned_slot = osb->slot_num; OCFS2_I(inode)->ip_orphaned_slot = osb->slot_num;
spin_unlock(&OCFS2_I(inode)->ip_lock); spin_unlock(&OCFS2_I(inode)->ip_lock);
mlog(0, "Inode %"MLFu64" orphaned in slot %d\n", mlog(0, "Inode %llu orphaned in slot %d\n",
OCFS2_I(inode)->ip_blkno, osb->slot_num); (unsigned long long)OCFS2_I(inode)->ip_blkno, osb->slot_num);
leave: leave:
if (orphan_dir_inode) if (orphan_dir_inode)
...@@ -2202,8 +2204,9 @@ int ocfs2_orphan_del(struct ocfs2_super *osb, ...@@ -2202,8 +2204,9 @@ int ocfs2_orphan_del(struct ocfs2_super *osb,
goto leave; goto leave;
} }
mlog(0, "removing '%s' from orphan dir %"MLFu64" (namelen=%d)\n", mlog(0, "removing '%s' from orphan dir %llu (namelen=%d)\n",
name, OCFS2_I(orphan_dir_inode)->ip_blkno, OCFS2_ORPHAN_NAMELEN); name, (unsigned long long)OCFS2_I(orphan_dir_inode)->ip_blkno,
OCFS2_ORPHAN_NAMELEN);
/* find it's spot in the orphan directory */ /* find it's spot in the orphan directory */
target_de_bh = ocfs2_find_entry(name, OCFS2_ORPHAN_NAMELEN, target_de_bh = ocfs2_find_entry(name, OCFS2_ORPHAN_NAMELEN,
......
...@@ -357,8 +357,8 @@ static inline int ocfs2_is_soft_readonly(struct ocfs2_super *osb) ...@@ -357,8 +357,8 @@ static inline int ocfs2_is_soft_readonly(struct ocfs2_super *osb)
#define OCFS2_RO_ON_INVALID_DINODE(__sb, __di) do { \ #define OCFS2_RO_ON_INVALID_DINODE(__sb, __di) do { \
typeof(__di) ____di = (__di); \ typeof(__di) ____di = (__di); \
ocfs2_error((__sb), \ ocfs2_error((__sb), \
"Dinode # %"MLFu64" has bad signature %.*s", \ "Dinode # %llu has bad signature %.*s", \
(____di)->i_blkno, 7, \ (unsigned long long)(____di)->i_blkno, 7, \
(____di)->i_signature); \ (____di)->i_signature); \
} while (0); } while (0);
...@@ -368,8 +368,8 @@ static inline int ocfs2_is_soft_readonly(struct ocfs2_super *osb) ...@@ -368,8 +368,8 @@ static inline int ocfs2_is_soft_readonly(struct ocfs2_super *osb)
#define OCFS2_RO_ON_INVALID_EXTENT_BLOCK(__sb, __eb) do { \ #define OCFS2_RO_ON_INVALID_EXTENT_BLOCK(__sb, __eb) do { \
typeof(__eb) ____eb = (__eb); \ typeof(__eb) ____eb = (__eb); \
ocfs2_error((__sb), \ ocfs2_error((__sb), \
"Extent Block # %"MLFu64" has bad signature %.*s", \ "Extent Block # %llu has bad signature %.*s", \
(____eb)->h_blkno, 7, \ (unsigned long long)(____eb)->h_blkno, 7, \
(____eb)->h_signature); \ (____eb)->h_signature); \
} while (0); } while (0);
...@@ -379,8 +379,8 @@ static inline int ocfs2_is_soft_readonly(struct ocfs2_super *osb) ...@@ -379,8 +379,8 @@ static inline int ocfs2_is_soft_readonly(struct ocfs2_super *osb)
#define OCFS2_RO_ON_INVALID_GROUP_DESC(__sb, __gd) do { \ #define OCFS2_RO_ON_INVALID_GROUP_DESC(__sb, __gd) do { \
typeof(__gd) ____gd = (__gd); \ typeof(__gd) ____gd = (__gd); \
ocfs2_error((__sb), \ ocfs2_error((__sb), \
"Group Descriptor # %"MLFu64" has bad signature %.*s", \ "Group Descriptor # %llu has bad signature %.*s", \
(____gd)->bg_blkno, 7, \ (unsigned long long)(____gd)->bg_blkno, 7, \
(____gd)->bg_signature); \ (____gd)->bg_signature); \
} while (0); } while (0);
......
...@@ -157,8 +157,9 @@ static int ocfs2_block_group_fill(struct ocfs2_journal_handle *handle, ...@@ -157,8 +157,9 @@ static int ocfs2_block_group_fill(struct ocfs2_journal_handle *handle,
mlog_entry_void(); mlog_entry_void();
if (((unsigned long long) bg_bh->b_blocknr) != group_blkno) { if (((unsigned long long) bg_bh->b_blocknr) != group_blkno) {
ocfs2_error(alloc_inode->i_sb, "group block (%"MLFu64") " ocfs2_error(alloc_inode->i_sb, "group block (%llu) != "
"!= b_blocknr (%llu)", group_blkno, "b_blocknr (%llu)",
(unsigned long long)group_blkno,
(unsigned long long) bg_bh->b_blocknr); (unsigned long long) bg_bh->b_blocknr);
status = -EIO; status = -EIO;
goto bail; goto bail;
...@@ -280,8 +281,8 @@ static int ocfs2_block_group_alloc(struct ocfs2_super *osb, ...@@ -280,8 +281,8 @@ static int ocfs2_block_group_alloc(struct ocfs2_super *osb,
/* setup the group */ /* setup the group */
bg_blkno = ocfs2_clusters_to_blocks(osb->sb, bit_off); bg_blkno = ocfs2_clusters_to_blocks(osb->sb, bit_off);
mlog(0, "new descriptor, record %u, at block %"MLFu64"\n", mlog(0, "new descriptor, record %u, at block %llu\n",
alloc_rec, bg_blkno); alloc_rec, (unsigned long long)bg_blkno);
bg_bh = sb_getblk(osb->sb, bg_blkno); bg_bh = sb_getblk(osb->sb, bg_blkno);
if (!bg_bh) { if (!bg_bh) {
...@@ -382,8 +383,8 @@ static int ocfs2_reserve_suballoc_bits(struct ocfs2_super *osb, ...@@ -382,8 +383,8 @@ static int ocfs2_reserve_suballoc_bits(struct ocfs2_super *osb,
goto bail; goto bail;
} }
if (!(fe->i_flags & cpu_to_le32(OCFS2_CHAIN_FL))) { if (!(fe->i_flags & cpu_to_le32(OCFS2_CHAIN_FL))) {
ocfs2_error(alloc_inode->i_sb, "Invalid chain allocator " ocfs2_error(alloc_inode->i_sb, "Invalid chain allocator %llu",
"# %"MLFu64, le64_to_cpu(fe->i_blkno)); (unsigned long long)le64_to_cpu(fe->i_blkno));
status = -EIO; status = -EIO;
goto bail; goto bail;
} }
...@@ -829,9 +830,10 @@ static int ocfs2_relink_block_group(struct ocfs2_journal_handle *handle, ...@@ -829,9 +830,10 @@ static int ocfs2_relink_block_group(struct ocfs2_journal_handle *handle,
goto out; goto out;
} }
mlog(0, "In suballoc %"MLFu64", chain %u, move group %"MLFu64" to " mlog(0, "Suballoc %llu, chain %u, move group %llu to top, prev = %llu\n",
"top, prev = %"MLFu64"\n", (unsigned long long)fe->i_blkno, chain,
fe->i_blkno, chain, bg->bg_blkno, prev_bg->bg_blkno); (unsigned long long)bg->bg_blkno,
(unsigned long long)prev_bg->bg_blkno);
fe_ptr = le64_to_cpu(fe->id2.i_chain.cl_recs[chain].c_blkno); fe_ptr = le64_to_cpu(fe->id2.i_chain.cl_recs[chain].c_blkno);
bg_ptr = le64_to_cpu(bg->bg_next_group); bg_ptr = le64_to_cpu(bg->bg_next_group);
...@@ -974,8 +976,9 @@ static int ocfs2_search_chain(struct ocfs2_alloc_context *ac, ...@@ -974,8 +976,9 @@ static int ocfs2_search_chain(struct ocfs2_alloc_context *ac,
struct ocfs2_group_desc *bg; struct ocfs2_group_desc *bg;
chain = ac->ac_chain; chain = ac->ac_chain;
mlog(0, "trying to alloc %u bits from chain %u, inode %"MLFu64"\n", mlog(0, "trying to alloc %u bits from chain %u, inode %llu\n",
bits_wanted, chain, OCFS2_I(alloc_inode)->ip_blkno); bits_wanted, chain,
(unsigned long long)OCFS2_I(alloc_inode)->ip_blkno);
status = ocfs2_read_block(OCFS2_SB(alloc_inode->i_sb), status = ocfs2_read_block(OCFS2_SB(alloc_inode->i_sb),
le64_to_cpu(cl->cl_recs[chain].c_blkno), le64_to_cpu(cl->cl_recs[chain].c_blkno),
...@@ -1027,8 +1030,8 @@ static int ocfs2_search_chain(struct ocfs2_alloc_context *ac, ...@@ -1027,8 +1030,8 @@ static int ocfs2_search_chain(struct ocfs2_alloc_context *ac,
goto bail; goto bail;
} }
mlog(0, "alloc succeeds: we give %u bits from block group %"MLFu64"\n", mlog(0, "alloc succeeds: we give %u bits from block group %llu\n",
tmp_bits, bg->bg_blkno); tmp_bits, (unsigned long long)bg->bg_blkno);
*num_bits = tmp_bits; *num_bits = tmp_bits;
...@@ -1092,8 +1095,8 @@ static int ocfs2_search_chain(struct ocfs2_alloc_context *ac, ...@@ -1092,8 +1095,8 @@ static int ocfs2_search_chain(struct ocfs2_alloc_context *ac,
goto bail; goto bail;
} }
mlog(0, "Allocated %u bits from suballocator %"MLFu64"\n", mlog(0, "Allocated %u bits from suballocator %llu\n", *num_bits,
*num_bits, fe->i_blkno); (unsigned long long)fe->i_blkno);
*bg_blkno = le64_to_cpu(bg->bg_blkno); *bg_blkno = le64_to_cpu(bg->bg_blkno);
bail: bail:
...@@ -1134,9 +1137,9 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb, ...@@ -1134,9 +1137,9 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb,
} }
if (le32_to_cpu(fe->id1.bitmap1.i_used) >= if (le32_to_cpu(fe->id1.bitmap1.i_used) >=
le32_to_cpu(fe->id1.bitmap1.i_total)) { le32_to_cpu(fe->id1.bitmap1.i_total)) {
ocfs2_error(osb->sb, "Chain allocator dinode %"MLFu64" has %u" ocfs2_error(osb->sb, "Chain allocator dinode %llu has %u used "
"used bits but only %u total.", "bits but only %u total.",
le64_to_cpu(fe->i_blkno), (unsigned long long)le64_to_cpu(fe->i_blkno),
le32_to_cpu(fe->id1.bitmap1.i_used), le32_to_cpu(fe->id1.bitmap1.i_used),
le32_to_cpu(fe->id1.bitmap1.i_total)); le32_to_cpu(fe->id1.bitmap1.i_total));
status = -EIO; status = -EIO;
...@@ -1479,10 +1482,9 @@ static int ocfs2_free_suballoc_bits(struct ocfs2_journal_handle *handle, ...@@ -1479,10 +1482,9 @@ static int ocfs2_free_suballoc_bits(struct ocfs2_journal_handle *handle,
} }
BUG_ON((count + start_bit) > ocfs2_bits_per_group(cl)); BUG_ON((count + start_bit) > ocfs2_bits_per_group(cl));
mlog(0, "suballocator %"MLFu64": freeing %u bits from group %"MLFu64 mlog(0, "%llu: freeing %u bits from group %llu, starting at %u\n",
", starting at %u\n", (unsigned long long)OCFS2_I(alloc_inode)->ip_blkno, count,
OCFS2_I(alloc_inode)->ip_blkno, count, bg_blkno, (unsigned long long)bg_blkno, start_bit);
start_bit);
status = ocfs2_read_block(osb, bg_blkno, &group_bh, OCFS2_BH_CACHED, status = ocfs2_read_block(osb, bg_blkno, &group_bh, OCFS2_BH_CACHED,
alloc_inode); alloc_inode);
...@@ -1592,10 +1594,10 @@ int ocfs2_free_clusters(struct ocfs2_journal_handle *handle, ...@@ -1592,10 +1594,10 @@ int ocfs2_free_clusters(struct ocfs2_journal_handle *handle,
ocfs2_block_to_cluster_group(bitmap_inode, start_blk, &bg_blkno, ocfs2_block_to_cluster_group(bitmap_inode, start_blk, &bg_blkno,
&bg_start_bit); &bg_start_bit);
mlog(0, "want to free %u clusters starting at block %"MLFu64"\n", mlog(0, "want to free %u clusters starting at block %llu\n",
num_clusters, start_blk); num_clusters, (unsigned long long)start_blk);
mlog(0, "bg_blkno = %"MLFu64", bg_start_bit = %u\n", mlog(0, "bg_blkno = %llu, bg_start_bit = %u\n",
bg_blkno, bg_start_bit); (unsigned long long)bg_blkno, bg_start_bit);
status = ocfs2_free_suballoc_bits(handle, bitmap_inode, bitmap_bh, status = ocfs2_free_suballoc_bits(handle, bitmap_inode, bitmap_bh,
bg_start_bit, bg_blkno, bg_start_bit, bg_blkno,
...@@ -1616,18 +1618,22 @@ static inline void ocfs2_debug_bg(struct ocfs2_group_desc *bg) ...@@ -1616,18 +1618,22 @@ static inline void ocfs2_debug_bg(struct ocfs2_group_desc *bg)
printk("bg_free_bits_count: %u\n", bg->bg_free_bits_count); printk("bg_free_bits_count: %u\n", bg->bg_free_bits_count);
printk("bg_chain: %u\n", bg->bg_chain); printk("bg_chain: %u\n", bg->bg_chain);
printk("bg_generation: %u\n", le32_to_cpu(bg->bg_generation)); printk("bg_generation: %u\n", le32_to_cpu(bg->bg_generation));
printk("bg_next_group: %"MLFu64"\n", bg->bg_next_group); printk("bg_next_group: %llu\n",
printk("bg_parent_dinode: %"MLFu64"\n", bg->bg_parent_dinode); (unsigned long long)bg->bg_next_group);
printk("bg_blkno: %"MLFu64"\n", bg->bg_blkno); printk("bg_parent_dinode: %llu\n",
(unsigned long long)bg->bg_parent_dinode);
printk("bg_blkno: %llu\n",
(unsigned long long)bg->bg_blkno);
} }
static inline void ocfs2_debug_suballoc_inode(struct ocfs2_dinode *fe) static inline void ocfs2_debug_suballoc_inode(struct ocfs2_dinode *fe)
{ {
int i; int i;
printk("Suballoc Inode %"MLFu64":\n", fe->i_blkno); printk("Suballoc Inode %llu:\n", (unsigned long long)fe->i_blkno);
printk("i_signature: %s\n", fe->i_signature); printk("i_signature: %s\n", fe->i_signature);
printk("i_size: %"MLFu64"\n", fe->i_size); printk("i_size: %llu\n",
(unsigned long long)fe->i_size);
printk("i_clusters: %u\n", fe->i_clusters); printk("i_clusters: %u\n", fe->i_clusters);
printk("i_generation: %u\n", printk("i_generation: %u\n",
le32_to_cpu(fe->i_generation)); le32_to_cpu(fe->i_generation));
...@@ -1645,7 +1651,7 @@ static inline void ocfs2_debug_suballoc_inode(struct ocfs2_dinode *fe) ...@@ -1645,7 +1651,7 @@ static inline void ocfs2_debug_suballoc_inode(struct ocfs2_dinode *fe)
fe->id2.i_chain.cl_recs[i].c_free); fe->id2.i_chain.cl_recs[i].c_free);
printk("fe->id2.i_chain.cl_recs[%d].c_total: %u\n", i, printk("fe->id2.i_chain.cl_recs[%d].c_total: %u\n", i,
fe->id2.i_chain.cl_recs[i].c_total); fe->id2.i_chain.cl_recs[i].c_total);
printk("fe->id2.i_chain.cl_recs[%d].c_blkno: %"MLFu64"\n", i, printk("fe->id2.i_chain.cl_recs[%d].c_blkno: %llu\n", i,
fe->id2.i_chain.cl_recs[i].c_blkno); (unsigned long long)fe->id2.i_chain.cl_recs[i].c_blkno);
} }
} }
...@@ -1428,8 +1428,9 @@ static int ocfs2_initialize_super(struct super_block *sb, ...@@ -1428,8 +1428,9 @@ static int ocfs2_initialize_super(struct super_block *sb,
osb->fs_generation = le32_to_cpu(di->i_fs_generation); osb->fs_generation = le32_to_cpu(di->i_fs_generation);
mlog(0, "vol_label: %s\n", osb->vol_label); mlog(0, "vol_label: %s\n", osb->vol_label);
mlog(0, "uuid: %s\n", osb->uuid_str); mlog(0, "uuid: %s\n", osb->uuid_str);
mlog(0, "root_blkno=%"MLFu64", system_dir_blkno=%"MLFu64"\n", mlog(0, "root_blkno=%llu, system_dir_blkno=%llu\n",
osb->root_blkno, osb->system_dir_blkno); (unsigned long long)osb->root_blkno,
(unsigned long long)osb->system_dir_blkno);
osb->osb_dlm_debug = ocfs2_new_dlm_debug(); osb->osb_dlm_debug = ocfs2_new_dlm_debug();
if (!osb->osb_dlm_debug) { if (!osb->osb_dlm_debug) {
...@@ -1472,8 +1473,8 @@ static int ocfs2_initialize_super(struct super_block *sb, ...@@ -1472,8 +1473,8 @@ static int ocfs2_initialize_super(struct super_block *sb,
osb->bitmap_cpg = le16_to_cpu(di->id2.i_chain.cl_cpg); osb->bitmap_cpg = le16_to_cpu(di->id2.i_chain.cl_cpg);
osb->num_clusters = le32_to_cpu(di->id1.bitmap1.i_total); osb->num_clusters = le32_to_cpu(di->id1.bitmap1.i_total);
brelse(bitmap_bh); brelse(bitmap_bh);
mlog(0, "cluster bitmap inode: %"MLFu64", clusters per group: %u\n", mlog(0, "cluster bitmap inode: %llu, clusters per group: %u\n",
osb->bitmap_blkno, osb->bitmap_cpg); (unsigned long long)osb->bitmap_blkno, osb->bitmap_cpg);
status = ocfs2_init_slot_info(osb); status = ocfs2_init_slot_info(osb);
if (status < 0) { if (status < 0) {
...@@ -1531,8 +1532,9 @@ static int ocfs2_verify_volume(struct ocfs2_dinode *di, ...@@ -1531,8 +1532,9 @@ static int ocfs2_verify_volume(struct ocfs2_dinode *di,
OCFS2_MINOR_REV_LEVEL); OCFS2_MINOR_REV_LEVEL);
} else if (bh->b_blocknr != le64_to_cpu(di->i_blkno)) { } else if (bh->b_blocknr != le64_to_cpu(di->i_blkno)) {
mlog(ML_ERROR, "bad block number on superblock: " mlog(ML_ERROR, "bad block number on superblock: "
"found %"MLFu64", should be %llu\n", "found %llu, should be %llu\n",
di->i_blkno, (unsigned long long)bh->b_blocknr); (unsigned long long)di->i_blkno,
(unsigned long long)bh->b_blocknr);
} else if (le32_to_cpu(di->id2.i_super.s_clustersize_bits) < 12 || } else if (le32_to_cpu(di->id2.i_super.s_clustersize_bits) < 12 ||
le32_to_cpu(di->id2.i_super.s_clustersize_bits) > 20) { le32_to_cpu(di->id2.i_super.s_clustersize_bits) > 20) {
mlog(ML_ERROR, "bad cluster size found: %u\n", mlog(ML_ERROR, "bad cluster size found: %u\n",
......
...@@ -33,12 +33,16 @@ int ocfs2_publish_get_mount_state(struct ocfs2_super *osb, ...@@ -33,12 +33,16 @@ int ocfs2_publish_get_mount_state(struct ocfs2_super *osb,
void __ocfs2_error(struct super_block *sb, void __ocfs2_error(struct super_block *sb,
const char *function, const char *function,
const char *fmt, ...); const char *fmt, ...)
__attribute__ ((format (printf, 3, 4)));
#define ocfs2_error(sb, fmt, args...) __ocfs2_error(sb, __PRETTY_FUNCTION__, fmt, ##args) #define ocfs2_error(sb, fmt, args...) __ocfs2_error(sb, __PRETTY_FUNCTION__, fmt, ##args)
void __ocfs2_abort(struct super_block *sb, void __ocfs2_abort(struct super_block *sb,
const char *function, const char *function,
const char *fmt, ...); const char *fmt, ...)
__attribute__ ((format (printf, 3, 4)));
#define ocfs2_abort(sb, fmt, args...) __ocfs2_abort(sb, __PRETTY_FUNCTION__, fmt, ##args) #define ocfs2_abort(sb, fmt, args...) __ocfs2_abort(sb, __PRETTY_FUNCTION__, fmt, ##args)
#endif /* OCFS2_SUPER_H */ #endif /* OCFS2_SUPER_H */
...@@ -119,8 +119,8 @@ void ocfs2_metadata_cache_purge(struct inode *inode) ...@@ -119,8 +119,8 @@ void ocfs2_metadata_cache_purge(struct inode *inode)
tree = !(oi->ip_flags & OCFS2_INODE_CACHE_INLINE); tree = !(oi->ip_flags & OCFS2_INODE_CACHE_INLINE);
to_purge = ci->ci_num_cached; to_purge = ci->ci_num_cached;
mlog(0, "Purge %u %s items from Inode %"MLFu64"\n", to_purge, mlog(0, "Purge %u %s items from Inode %llu\n", to_purge,
tree ? "array" : "tree", oi->ip_blkno); tree ? "array" : "tree", (unsigned long long)oi->ip_blkno);
/* If we're a tree, save off the root so that we can safely /* If we're a tree, save off the root so that we can safely
* initialize the cache. We do the work to free tree members * initialize the cache. We do the work to free tree members
...@@ -136,8 +136,8 @@ void ocfs2_metadata_cache_purge(struct inode *inode) ...@@ -136,8 +136,8 @@ void ocfs2_metadata_cache_purge(struct inode *inode)
* easily detect counting errors. Unfortunately, this is only * easily detect counting errors. Unfortunately, this is only
* meaningful for trees. */ * meaningful for trees. */
if (tree && purged != to_purge) if (tree && purged != to_purge)
mlog(ML_ERROR, "Inode %"MLFu64", count = %u, purged = %u\n", mlog(ML_ERROR, "Inode %llu, count = %u, purged = %u\n",
oi->ip_blkno, to_purge, purged); (unsigned long long)oi->ip_blkno, to_purge, purged);
} }
/* Returns the index in the cache array, -1 if not found. /* Returns the index in the cache array, -1 if not found.
...@@ -186,8 +186,9 @@ static int ocfs2_buffer_cached(struct ocfs2_inode_info *oi, ...@@ -186,8 +186,9 @@ static int ocfs2_buffer_cached(struct ocfs2_inode_info *oi,
spin_lock(&oi->ip_lock); spin_lock(&oi->ip_lock);
mlog(0, "Inode %"MLFu64", query block %llu (inline = %u)\n", mlog(0, "Inode %llu, query block %llu (inline = %u)\n",
oi->ip_blkno, (unsigned long long) bh->b_blocknr, (unsigned long long)oi->ip_blkno,
(unsigned long long) bh->b_blocknr,
!!(oi->ip_flags & OCFS2_INODE_CACHE_INLINE)); !!(oi->ip_flags & OCFS2_INODE_CACHE_INLINE));
if (oi->ip_flags & OCFS2_INODE_CACHE_INLINE) if (oi->ip_flags & OCFS2_INODE_CACHE_INLINE)
...@@ -293,12 +294,12 @@ static void ocfs2_expand_cache(struct ocfs2_inode_info *oi, ...@@ -293,12 +294,12 @@ static void ocfs2_expand_cache(struct ocfs2_inode_info *oi,
struct ocfs2_caching_info *ci = &oi->ip_metadata_cache; struct ocfs2_caching_info *ci = &oi->ip_metadata_cache;
mlog_bug_on_msg(ci->ci_num_cached != OCFS2_INODE_MAX_CACHE_ARRAY, mlog_bug_on_msg(ci->ci_num_cached != OCFS2_INODE_MAX_CACHE_ARRAY,
"Inode %"MLFu64", num cached = %u, should be %u\n", "Inode %llu, num cached = %u, should be %u\n",
oi->ip_blkno, ci->ci_num_cached, (unsigned long long)oi->ip_blkno, ci->ci_num_cached,
OCFS2_INODE_MAX_CACHE_ARRAY); OCFS2_INODE_MAX_CACHE_ARRAY);
mlog_bug_on_msg(!(oi->ip_flags & OCFS2_INODE_CACHE_INLINE), mlog_bug_on_msg(!(oi->ip_flags & OCFS2_INODE_CACHE_INLINE),
"Inode %"MLFu64" not marked as inline anymore!\n", "Inode %llu not marked as inline anymore!\n",
oi->ip_blkno); (unsigned long long)oi->ip_blkno);
assert_spin_locked(&oi->ip_lock); assert_spin_locked(&oi->ip_lock);
/* Be careful to initialize the tree members *first* because /* Be careful to initialize the tree members *first* because
...@@ -316,8 +317,8 @@ static void ocfs2_expand_cache(struct ocfs2_inode_info *oi, ...@@ -316,8 +317,8 @@ static void ocfs2_expand_cache(struct ocfs2_inode_info *oi,
tree[i] = NULL; tree[i] = NULL;
} }
mlog(0, "Expanded %"MLFu64" to a tree cache: flags 0x%x, num = %u\n", mlog(0, "Expanded %llu to a tree cache: flags 0x%x, num = %u\n",
oi->ip_blkno, oi->ip_flags, ci->ci_num_cached); (unsigned long long)oi->ip_blkno, oi->ip_flags, ci->ci_num_cached);
} }
/* Slow path function - memory allocation is necessary. See the /* Slow path function - memory allocation is necessary. See the
...@@ -332,8 +333,9 @@ static void __ocfs2_set_buffer_uptodate(struct ocfs2_inode_info *oi, ...@@ -332,8 +333,9 @@ static void __ocfs2_set_buffer_uptodate(struct ocfs2_inode_info *oi,
struct ocfs2_meta_cache_item *tree[OCFS2_INODE_MAX_CACHE_ARRAY] = struct ocfs2_meta_cache_item *tree[OCFS2_INODE_MAX_CACHE_ARRAY] =
{ NULL, }; { NULL, };
mlog(0, "Inode %"MLFu64", block %llu, expand = %d\n", mlog(0, "Inode %llu, block %llu, expand = %d\n",
oi->ip_blkno, (unsigned long long) block, expand_tree); (unsigned long long)oi->ip_blkno,
(unsigned long long)block, expand_tree);
new = kmem_cache_alloc(ocfs2_uptodate_cachep, GFP_KERNEL); new = kmem_cache_alloc(ocfs2_uptodate_cachep, GFP_KERNEL);
if (!new) { if (!new) {
...@@ -414,8 +416,9 @@ void ocfs2_set_buffer_uptodate(struct inode *inode, ...@@ -414,8 +416,9 @@ void ocfs2_set_buffer_uptodate(struct inode *inode,
if (ocfs2_buffer_cached(oi, bh)) if (ocfs2_buffer_cached(oi, bh))
return; return;
mlog(0, "Inode %"MLFu64", inserting block %llu\n", oi->ip_blkno, mlog(0, "Inode %llu, inserting block %llu\n",
(unsigned long long) bh->b_blocknr); (unsigned long long)oi->ip_blkno,
(unsigned long long)bh->b_blocknr);
/* No need to recheck under spinlock - insertion is guarded by /* No need to recheck under spinlock - insertion is guarded by
* ip_io_mutex */ * ip_io_mutex */
...@@ -504,8 +507,9 @@ void ocfs2_remove_from_cache(struct inode *inode, ...@@ -504,8 +507,9 @@ void ocfs2_remove_from_cache(struct inode *inode,
struct ocfs2_caching_info *ci = &oi->ip_metadata_cache; struct ocfs2_caching_info *ci = &oi->ip_metadata_cache;
spin_lock(&oi->ip_lock); spin_lock(&oi->ip_lock);
mlog(0, "Inode %"MLFu64", remove %llu, items = %u, array = %u\n", mlog(0, "Inode %llu, remove %llu, items = %u, array = %u\n",
oi->ip_blkno, (unsigned long long) block, ci->ci_num_cached, (unsigned long long)oi->ip_blkno,
(unsigned long long) block, ci->ci_num_cached,
oi->ip_flags & OCFS2_INODE_CACHE_INLINE); oi->ip_flags & OCFS2_INODE_CACHE_INLINE);
if (oi->ip_flags & OCFS2_INODE_CACHE_INLINE) { if (oi->ip_flags & OCFS2_INODE_CACHE_INLINE) {
......
...@@ -190,20 +190,21 @@ static int ocfs2_process_delete_request(struct inode *inode, ...@@ -190,20 +190,21 @@ static int ocfs2_process_delete_request(struct inode *inode,
OCFS2_INVALID_SLOT && OCFS2_INVALID_SLOT &&
OCFS2_I(inode)->ip_orphaned_slot != OCFS2_I(inode)->ip_orphaned_slot !=
(*orphaned_slot), (*orphaned_slot),
"Inode %"MLFu64": This node thinks it's " "Inode %llu: This node thinks it's "
"orphaned in slot %d, messaged it's in %d\n", "orphaned in slot %d, messaged it's in %d\n",
OCFS2_I(inode)->ip_blkno, (unsigned long long)OCFS2_I(inode)->ip_blkno,
OCFS2_I(inode)->ip_orphaned_slot, OCFS2_I(inode)->ip_orphaned_slot,
*orphaned_slot); *orphaned_slot);
mlog(0, "Setting orphaned slot for inode %"MLFu64" to %d\n", mlog(0, "Setting orphaned slot for inode %llu to %d\n",
OCFS2_I(inode)->ip_blkno, *orphaned_slot); (unsigned long long)OCFS2_I(inode)->ip_blkno,
*orphaned_slot);
OCFS2_I(inode)->ip_orphaned_slot = *orphaned_slot; OCFS2_I(inode)->ip_orphaned_slot = *orphaned_slot;
} else { } else {
mlog(0, "Sending back orphaned slot %d for inode %"MLFu64"\n", mlog(0, "Sending back orphaned slot %d for inode %llu\n",
OCFS2_I(inode)->ip_orphaned_slot, OCFS2_I(inode)->ip_orphaned_slot,
OCFS2_I(inode)->ip_blkno); (unsigned long long)OCFS2_I(inode)->ip_blkno);
*orphaned_slot = OCFS2_I(inode)->ip_orphaned_slot; *orphaned_slot = OCFS2_I(inode)->ip_orphaned_slot;
} }
...@@ -226,8 +227,8 @@ static int ocfs2_process_delete_request(struct inode *inode, ...@@ -226,8 +227,8 @@ static int ocfs2_process_delete_request(struct inode *inode,
} }
if (filemap_fdatawrite(inode->i_mapping)) { if (filemap_fdatawrite(inode->i_mapping)) {
mlog(ML_ERROR, "Could not sync inode %"MLFu64" for delete!\n", mlog(ML_ERROR, "Could not sync inode %llu for delete!\n",
OCFS2_I(inode)->ip_blkno); (unsigned long long)OCFS2_I(inode)->ip_blkno);
goto done; goto done;
} }
sync_mapping_buffers(inode->i_mapping); sync_mapping_buffers(inode->i_mapping);
...@@ -302,8 +303,8 @@ static void ocfs2_process_dentry_request(struct inode *inode, ...@@ -302,8 +303,8 @@ static void ocfs2_process_dentry_request(struct inode *inode,
struct list_head *p; struct list_head *p;
struct ocfs2_inode_info *oi = OCFS2_I(inode); struct ocfs2_inode_info *oi = OCFS2_I(inode);
mlog(0, "parent %"MLFu64", namelen = %u, name = %.*s\n", parent_blkno, mlog(0, "parent %llu, namelen = %u, name = %.*s\n",
namelen, namelen, name); (unsigned long long)parent_blkno, namelen, namelen, name);
spin_lock(&dcache_lock); spin_lock(&dcache_lock);
...@@ -370,9 +371,10 @@ static void ocfs2_process_vote(struct ocfs2_super *osb, ...@@ -370,9 +371,10 @@ static void ocfs2_process_vote(struct ocfs2_super *osb,
if (request == OCFS2_VOTE_REQ_DELETE) if (request == OCFS2_VOTE_REQ_DELETE)
orphaned_slot = be32_to_cpu(msg->md1.v_orphaned_slot); orphaned_slot = be32_to_cpu(msg->md1.v_orphaned_slot);
mlog(0, "processing vote: request = %u, blkno = %"MLFu64", " mlog(0, "processing vote: request = %u, blkno = %llu, "
"generation = %u, node_num = %u, priv1 = %u\n", request, "generation = %u, node_num = %u, priv1 = %u\n", request,
blkno, generation, node_num, be32_to_cpu(msg->md1.v_generic1)); (unsigned long long)blkno, generation, node_num,
be32_to_cpu(msg->md1.v_generic1));
if (!ocfs2_is_valid_vote_request(request)) { if (!ocfs2_is_valid_vote_request(request)) {
mlog(ML_ERROR, "Invalid vote request %d from node %u\n", mlog(ML_ERROR, "Invalid vote request %d from node %u\n",
...@@ -419,11 +421,12 @@ static void ocfs2_process_vote(struct ocfs2_super *osb, ...@@ -419,11 +421,12 @@ static void ocfs2_process_vote(struct ocfs2_super *osb,
* we had not found an inode in the first place. */ * we had not found an inode in the first place. */
if (inode->i_generation != generation) { if (inode->i_generation != generation) {
mlog(0, "generation passed %u != inode generation = %u, " mlog(0, "generation passed %u != inode generation = %u, "
"ip_flags = %x, ip_blkno = %"MLFu64", msg %"MLFu64", " "ip_flags = %x, ip_blkno = %llu, msg %llu, i_count = %u, "
"i_count = %u, message type = %u\n", "message type = %u\n", generation, inode->i_generation,
generation, inode->i_generation, OCFS2_I(inode)->ip_flags, OCFS2_I(inode)->ip_flags,
OCFS2_I(inode)->ip_blkno, blkno, (unsigned long long)OCFS2_I(inode)->ip_blkno,
atomic_read(&inode->i_count), request); (unsigned long long)blkno, atomic_read(&inode->i_count),
request);
iput(inode); iput(inode);
inode = NULL; inode = NULL;
goto respond; goto respond;
...@@ -830,8 +833,9 @@ static void ocfs2_delete_response_cb(void *priv, ...@@ -830,8 +833,9 @@ static void ocfs2_delete_response_cb(void *priv,
orphaned_slot = be32_to_cpu(resp->r_orphaned_slot); orphaned_slot = be32_to_cpu(resp->r_orphaned_slot);
node = be32_to_cpu(resp->r_hdr.h_node_num); node = be32_to_cpu(resp->r_hdr.h_node_num);
mlog(0, "node %d tells us that inode %"MLFu64" is orphaned in slot " mlog(0, "node %d tells us that inode %llu is orphaned in slot %d\n",
"%d\n", node, OCFS2_I(inode)->ip_blkno, orphaned_slot); node, (unsigned long long)OCFS2_I(inode)->ip_blkno,
orphaned_slot);
/* The other node may not actually know which slot the inode /* The other node may not actually know which slot the inode
* is orphaned in. */ * is orphaned in. */
...@@ -845,9 +849,9 @@ static void ocfs2_delete_response_cb(void *priv, ...@@ -845,9 +849,9 @@ static void ocfs2_delete_response_cb(void *priv,
spin_lock(&OCFS2_I(inode)->ip_lock); spin_lock(&OCFS2_I(inode)->ip_lock);
mlog_bug_on_msg(OCFS2_I(inode)->ip_orphaned_slot != orphaned_slot && mlog_bug_on_msg(OCFS2_I(inode)->ip_orphaned_slot != orphaned_slot &&
OCFS2_I(inode)->ip_orphaned_slot OCFS2_I(inode)->ip_orphaned_slot
!= OCFS2_INVALID_SLOT, "Inode %"MLFu64": Node %d " != OCFS2_INVALID_SLOT, "Inode %llu: Node %d says it's "
"says it's orphaned in slot %d, we think it's in %d\n", "orphaned in slot %d, we think it's in %d\n",
OCFS2_I(inode)->ip_blkno, (unsigned long long)OCFS2_I(inode)->ip_blkno,
be32_to_cpu(resp->r_hdr.h_node_num), be32_to_cpu(resp->r_hdr.h_node_num),
orphaned_slot, OCFS2_I(inode)->ip_orphaned_slot); orphaned_slot, OCFS2_I(inode)->ip_orphaned_slot);
...@@ -869,8 +873,8 @@ int ocfs2_request_delete_vote(struct inode *inode) ...@@ -869,8 +873,8 @@ int ocfs2_request_delete_vote(struct inode *inode)
delete_cb.rc_cb = ocfs2_delete_response_cb; delete_cb.rc_cb = ocfs2_delete_response_cb;
delete_cb.rc_priv = inode; delete_cb.rc_priv = inode;
mlog(0, "Inode %"MLFu64", we start thinking orphaned slot is %d\n", mlog(0, "Inode %llu, we start thinking orphaned slot is %d\n",
OCFS2_I(inode)->ip_blkno, orphaned_slot); (unsigned long long)OCFS2_I(inode)->ip_blkno, orphaned_slot);
status = -ENOMEM; status = -ENOMEM;
request = ocfs2_new_vote_request(osb, OCFS2_I(inode)->ip_blkno, request = ocfs2_new_vote_request(osb, OCFS2_I(inode)->ip_blkno,
...@@ -895,8 +899,8 @@ static void ocfs2_setup_unlink_vote(struct ocfs2_vote_msg *request, ...@@ -895,8 +899,8 @@ static void ocfs2_setup_unlink_vote(struct ocfs2_vote_msg *request,
* d_delete against it. Parent directory block and full name * d_delete against it. Parent directory block and full name
* should suffice. */ * should suffice. */
mlog(0, "unlink/rename request: parent: %"MLFu64" name: %.*s\n", mlog(0, "unlink/rename request: parent: %llu name: %.*s\n",
OCFS2_I(parent)->ip_blkno, dentry->d_name.len, (unsigned long long)OCFS2_I(parent)->ip_blkno, dentry->d_name.len,
dentry->d_name.name); dentry->d_name.name);
request->v_unlink_parent = cpu_to_be64(OCFS2_I(parent)->ip_blkno); request->v_unlink_parent = cpu_to_be64(OCFS2_I(parent)->ip_blkno);
...@@ -1082,7 +1086,8 @@ static int ocfs2_handle_response_message(struct o2net_msg *msg, ...@@ -1082,7 +1086,8 @@ static int ocfs2_handle_response_message(struct o2net_msg *msg,
mlog(0, "received response message:\n"); mlog(0, "received response message:\n");
mlog(0, "h_response_id = %u\n", response_id); mlog(0, "h_response_id = %u\n", response_id);
mlog(0, "h_request = %u\n", be32_to_cpu(resp->r_hdr.h_request)); mlog(0, "h_request = %u\n", be32_to_cpu(resp->r_hdr.h_request));
mlog(0, "h_blkno = %"MLFu64"\n", be64_to_cpu(resp->r_hdr.h_blkno)); mlog(0, "h_blkno = %llu\n",
(unsigned long long)be64_to_cpu(resp->r_hdr.h_blkno));
mlog(0, "h_generation = %u\n", be32_to_cpu(resp->r_hdr.h_generation)); mlog(0, "h_generation = %u\n", be32_to_cpu(resp->r_hdr.h_generation));
mlog(0, "h_node_num = %u\n", node_num); mlog(0, "h_node_num = %u\n", node_num);
mlog(0, "r_response = %d\n", response_status); mlog(0, "r_response = %d\n", response_status);
...@@ -1138,8 +1143,8 @@ static int ocfs2_handle_vote_message(struct o2net_msg *msg, ...@@ -1138,8 +1143,8 @@ static int ocfs2_handle_vote_message(struct o2net_msg *msg,
mlog(0, "h_response_id = %u\n", mlog(0, "h_response_id = %u\n",
be32_to_cpu(work->w_msg.v_hdr.h_response_id)); be32_to_cpu(work->w_msg.v_hdr.h_response_id));
mlog(0, "h_request = %u\n", be32_to_cpu(work->w_msg.v_hdr.h_request)); mlog(0, "h_request = %u\n", be32_to_cpu(work->w_msg.v_hdr.h_request));
mlog(0, "h_blkno = %"MLFu64"\n", mlog(0, "h_blkno = %llu\n",
be64_to_cpu(work->w_msg.v_hdr.h_blkno)); (unsigned long long)be64_to_cpu(work->w_msg.v_hdr.h_blkno));
mlog(0, "h_generation = %u\n", mlog(0, "h_generation = %u\n",
be32_to_cpu(work->w_msg.v_hdr.h_generation)); be32_to_cpu(work->w_msg.v_hdr.h_generation));
mlog(0, "h_node_num = %u\n", mlog(0, "h_node_num = %u\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment