X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Focfs2%2Fuptodate.c;h=300b5bedfb21d8b168a6b94d5304618479ff7236;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=b8a00a79332676dd8956a10180926a2b580a7213;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/fs/ocfs2/uptodate.c b/fs/ocfs2/uptodate.c index b8a00a793..300b5bedf 100644 --- a/fs/ocfs2/uptodate.c +++ b/fs/ocfs2/uptodate.c @@ -119,8 +119,8 @@ void ocfs2_metadata_cache_purge(struct inode *inode) tree = !(oi->ip_flags & OCFS2_INODE_CACHE_INLINE); to_purge = ci->ci_num_cached; - mlog(0, "Purge %u %s items from Inode %llu\n", to_purge, - tree ? "array" : "tree", (unsigned long long)oi->ip_blkno); + mlog(0, "Purge %u %s items from Inode %"MLFu64"\n", to_purge, + tree ? "array" : "tree", oi->ip_blkno); /* 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 @@ -136,8 +136,8 @@ void ocfs2_metadata_cache_purge(struct inode *inode) * easily detect counting errors. Unfortunately, this is only * meaningful for trees. */ if (tree && purged != to_purge) - mlog(ML_ERROR, "Inode %llu, count = %u, purged = %u\n", - (unsigned long long)oi->ip_blkno, to_purge, purged); + mlog(ML_ERROR, "Inode %"MLFu64", count = %u, purged = %u\n", + oi->ip_blkno, to_purge, purged); } /* Returns the index in the cache array, -1 if not found. @@ -186,9 +186,8 @@ static int ocfs2_buffer_cached(struct ocfs2_inode_info *oi, spin_lock(&oi->ip_lock); - mlog(0, "Inode %llu, query block %llu (inline = %u)\n", - (unsigned long long)oi->ip_blkno, - (unsigned long long) bh->b_blocknr, + mlog(0, "Inode %"MLFu64", query block %llu (inline = %u)\n", + oi->ip_blkno, (unsigned long long) bh->b_blocknr, !!(oi->ip_flags & OCFS2_INODE_CACHE_INLINE)); if (oi->ip_flags & OCFS2_INODE_CACHE_INLINE) @@ -294,12 +293,12 @@ static void ocfs2_expand_cache(struct ocfs2_inode_info *oi, struct ocfs2_caching_info *ci = &oi->ip_metadata_cache; mlog_bug_on_msg(ci->ci_num_cached != OCFS2_INODE_MAX_CACHE_ARRAY, - "Inode %llu, num cached = %u, should be %u\n", - (unsigned long long)oi->ip_blkno, ci->ci_num_cached, + "Inode %"MLFu64", num cached = %u, should be %u\n", + oi->ip_blkno, ci->ci_num_cached, OCFS2_INODE_MAX_CACHE_ARRAY); mlog_bug_on_msg(!(oi->ip_flags & OCFS2_INODE_CACHE_INLINE), - "Inode %llu not marked as inline anymore!\n", - (unsigned long long)oi->ip_blkno); + "Inode %"MLFu64" not marked as inline anymore!\n", + oi->ip_blkno); assert_spin_locked(&oi->ip_lock); /* Be careful to initialize the tree members *first* because @@ -317,8 +316,8 @@ static void ocfs2_expand_cache(struct ocfs2_inode_info *oi, tree[i] = NULL; } - mlog(0, "Expanded %llu to a tree cache: flags 0x%x, num = %u\n", - (unsigned long long)oi->ip_blkno, oi->ip_flags, ci->ci_num_cached); + mlog(0, "Expanded %"MLFu64" to a tree cache: flags 0x%x, num = %u\n", + oi->ip_blkno, oi->ip_flags, ci->ci_num_cached); } /* Slow path function - memory allocation is necessary. See the @@ -333,11 +332,10 @@ static void __ocfs2_set_buffer_uptodate(struct ocfs2_inode_info *oi, struct ocfs2_meta_cache_item *tree[OCFS2_INODE_MAX_CACHE_ARRAY] = { NULL, }; - mlog(0, "Inode %llu, block %llu, expand = %d\n", - (unsigned long long)oi->ip_blkno, - (unsigned long long)block, expand_tree); + mlog(0, "Inode %"MLFu64", block %llu, expand = %d\n", + oi->ip_blkno, (unsigned long long) block, expand_tree); - new = kmem_cache_alloc(ocfs2_uptodate_cachep, GFP_NOFS); + new = kmem_cache_alloc(ocfs2_uptodate_cachep, GFP_KERNEL); if (!new) { mlog_errno(-ENOMEM); return; @@ -349,7 +347,7 @@ static void __ocfs2_set_buffer_uptodate(struct ocfs2_inode_info *oi, * has no way of tracking that. */ for(i = 0; i < OCFS2_INODE_MAX_CACHE_ARRAY; i++) { tree[i] = kmem_cache_alloc(ocfs2_uptodate_cachep, - GFP_NOFS); + GFP_KERNEL); if (!tree[i]) { mlog_errno(-ENOMEM); goto out_free; @@ -416,9 +414,8 @@ void ocfs2_set_buffer_uptodate(struct inode *inode, if (ocfs2_buffer_cached(oi, bh)) return; - mlog(0, "Inode %llu, inserting block %llu\n", - (unsigned long long)oi->ip_blkno, - (unsigned long long)bh->b_blocknr); + mlog(0, "Inode %"MLFu64", inserting block %llu\n", oi->ip_blkno, + (unsigned long long) bh->b_blocknr); /* No need to recheck under spinlock - insertion is guarded by * ip_io_mutex */ @@ -507,9 +504,8 @@ void ocfs2_remove_from_cache(struct inode *inode, struct ocfs2_caching_info *ci = &oi->ip_metadata_cache; spin_lock(&oi->ip_lock); - mlog(0, "Inode %llu, remove %llu, items = %u, array = %u\n", - (unsigned long long)oi->ip_blkno, - (unsigned long long) block, ci->ci_num_cached, + mlog(0, "Inode %"MLFu64", remove %llu, items = %u, array = %u\n", + oi->ip_blkno, (unsigned long long) block, ci->ci_num_cached, oi->ip_flags & OCFS2_INODE_CACHE_INLINE); if (oi->ip_flags & OCFS2_INODE_CACHE_INLINE) {