On Wed, Dec 04, 2013 at 01:41:42PM +0100, Szőts Ákos wrote:
> Thank you for your answer.
> 
> Here are the "blocked states" logs. Since I had a plenty of time, I made 
> multiple of them. The last two are the longest of them.
> 
> - http://paste.opensuse.org/view/raw/51654551
> - http://paste.opensuse.org/view/raw/39005796
> - http://paste.opensuse.org/view/raw/38028651
> - http://paste.opensuse.org/view/raw/21592065
> - http://paste.opensuse.org/view/raw/46655344
> - http://paste.opensuse.org/view/raw/26821272
> 
> Ákos

Could you please try the following and show me the output of dmesg?

thanks,
-liubo


diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 057be95..8f7711e 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -2950,11 +2950,16 @@ int load_free_ino_cache(struct btrfs_fs_info *fs_info, 
struct btrfs_root *root)
                return 0;
 
        inode = lookup_free_ino_inode(root, path);
-       if (IS_ERR(inode))
+       if (IS_ERR(inode)) {
+               printk("%s: ino cache ino is NOT found\n", __func__);
                goto out;
+       }
 
-       if (root_gen != BTRFS_I(inode)->generation)
+       if (root_gen != BTRFS_I(inode)->generation) {
+               printk("%s: gen mismatch: root_gen_mem=%llu, root_gen=%llu, 
ino's gen=%llu\n",
+                       __func__, btrfs_root_generation(&root->root_item), 
root_gen, BTRFS_I(inode)->generation);
                goto out_put;
+       }
 
        ret = __load_free_space_cache(root, inode, ctl, path, 0);
 
diff --git a/fs/btrfs/inode-map.c b/fs/btrfs/inode-map.c
index ab485e5..6535139 100644
--- a/fs/btrfs/inode-map.c
+++ b/fs/btrfs/inode-map.c
@@ -473,7 +473,12 @@ again:
        }
 
        spin_lock(&root->cache_lock);
-       if (root->cached != BTRFS_CACHE_FINISHED) {
+
+       /* ino cache has 3 state:
+        * BTRFS_CACHE_NO, BTRFS_CACHE_START, BTRFS_CACHE_FINISHED
+        */
+       if (root->cached != BTRFS_CACHE_NO && root->cached != 
BTRFS_CACHE_FINISHED) {
+               printk("%s: bail out because it's not FINISHED, cached=%d\n", 
__func__, root->cached);
                ret = -1;
                spin_unlock(&root->cache_lock);
                goto out_put;
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to