]> err.no Git - linux-2.6/blobdiff - fs/ocfs2/super.c
ocfs2: retry operations when a lock is marked in recovery
[linux-2.6] / fs / ocfs2 / super.c
index 44d8b524823603c4fcb47f4c7bbfc3a7df89a323..cdf73393f094ee95667bb25654c9697991e79de0 100644 (file)
@@ -100,7 +100,7 @@ static int ocfs2_initialize_mem_caches(void);
 static void ocfs2_free_mem_caches(void);
 static void ocfs2_delete_osb(struct ocfs2_super *osb);
 
-static int ocfs2_statfs(struct super_block *sb, struct kstatfs *buf);
+static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf);
 
 static int ocfs2_sync_fs(struct super_block *sb, int wait);
 
@@ -672,12 +672,14 @@ read_super_error:
        return status;
 }
 
-static struct super_block *ocfs2_get_sb(struct file_system_type *fs_type,
-                                       int flags,
-                                       const char *dev_name,
-                                       void *data)
+static int ocfs2_get_sb(struct file_system_type *fs_type,
+                       int flags,
+                       const char *dev_name,
+                       void *data,
+                       struct vfsmount *mnt)
 {
-       return get_sb_bdev(fs_type, flags, dev_name, data, ocfs2_fill_super);
+       return get_sb_bdev(fs_type, flags, dev_name, data, ocfs2_fill_super,
+                          mnt);
 }
 
 static struct file_system_type ocfs2_fs_type = {
@@ -855,7 +857,7 @@ static void ocfs2_put_super(struct super_block *sb)
        mlog_exit_void();
 }
 
-static int ocfs2_statfs(struct super_block *sb, struct kstatfs *buf)
+static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf)
 {
        struct ocfs2_super *osb;
        u32 numbits, freebits;
@@ -864,9 +866,9 @@ static int ocfs2_statfs(struct super_block *sb, struct kstatfs *buf)
        struct buffer_head *bh = NULL;
        struct inode *inode = NULL;
 
-       mlog_entry("(%p, %p)\n", sb, buf);
+       mlog_entry("(%p, %p)\n", dentry->d_sb, buf);
 
-       osb = OCFS2_SB(sb);
+       osb = OCFS2_SB(dentry->d_sb);
 
        inode = ocfs2_get_system_file_inode(osb,
                                            GLOBAL_BITMAP_SYSTEM_INODE,
@@ -889,7 +891,7 @@ static int ocfs2_statfs(struct super_block *sb, struct kstatfs *buf)
        freebits = numbits - le32_to_cpu(bm_lock->id1.bitmap1.i_used);
 
        buf->f_type = OCFS2_SUPER_MAGIC;
-       buf->f_bsize = sb->s_blocksize;
+       buf->f_bsize = dentry->d_sb->s_blocksize;
        buf->f_namelen = OCFS2_MAX_FILENAME_LEN;
        buf->f_blocks = ((sector_t) numbits) *
                        (osb->s_clustersize >> osb->sb->s_blocksize_bits);
@@ -1428,8 +1430,9 @@ static int ocfs2_initialize_super(struct super_block *sb,
        osb->fs_generation = le32_to_cpu(di->i_fs_generation);
        mlog(0, "vol_label: %s\n", osb->vol_label);
        mlog(0, "uuid: %s\n", osb->uuid_str);
-       mlog(0, "root_blkno=%"MLFu64", system_dir_blkno=%"MLFu64"\n",
-            osb->root_blkno, osb->system_dir_blkno);
+       mlog(0, "root_blkno=%llu, system_dir_blkno=%llu\n",
+            (unsigned long long)osb->root_blkno,
+            (unsigned long long)osb->system_dir_blkno);
 
        osb->osb_dlm_debug = ocfs2_new_dlm_debug();
        if (!osb->osb_dlm_debug) {
@@ -1472,8 +1475,8 @@ static int ocfs2_initialize_super(struct super_block *sb,
        osb->bitmap_cpg = le16_to_cpu(di->id2.i_chain.cl_cpg);
        osb->num_clusters = le32_to_cpu(di->id1.bitmap1.i_total);
        brelse(bitmap_bh);
-       mlog(0, "cluster bitmap inode: %"MLFu64", clusters per group: %u\n",
-            osb->bitmap_blkno, osb->bitmap_cpg);
+       mlog(0, "cluster bitmap inode: %llu, clusters per group: %u\n",
+            (unsigned long long)osb->bitmap_blkno, osb->bitmap_cpg);
 
        status = ocfs2_init_slot_info(osb);
        if (status < 0) {
@@ -1531,8 +1534,9 @@ static int ocfs2_verify_volume(struct ocfs2_dinode *di,
                             OCFS2_MINOR_REV_LEVEL);
                } else if (bh->b_blocknr != le64_to_cpu(di->i_blkno)) {
                        mlog(ML_ERROR, "bad block number on superblock: "
-                            "found %"MLFu64", should be %llu\n",
-                            di->i_blkno, (unsigned long long)bh->b_blocknr);
+                            "found %llu, should be %llu\n",
+                            (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 ||
                            le32_to_cpu(di->id2.i_super.s_clustersize_bits) > 20) {
                        mlog(ML_ERROR, "bad cluster size found: %u\n",