linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / fs / ocfs2 / uptodate.c
index b8a00a7..300b5be 100644 (file)
@@ -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) {