Whamcloud - gitweb
LU-883 ldiskfs: drop unused diagnostic information
authorFan Yong <yong.fan@whamcloud.com>
Tue, 31 Jan 2012 07:26:31 +0000 (15:26 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 16 Feb 2012 17:39:56 +0000 (12:39 -0500)
The debug informatin was introduced for diagnosing readonly
issues for bug 16680. It is unused any longer and makes the
console output some noisy. So drop.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: If950654d6517f317809bb0de1446e2377a524c77
Reviewed-on: http://review.whamcloud.com/2068
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
ldiskfs/kernel_patches/patches/ext4-mballoc-pa_free-mismatch-rhel6.patch
ldiskfs/kernel_patches/patches/ext4-mballoc-pa_free-mismatch.patch
lustre/kernel_patches/patches/dev_read_only-2.6.32-rhel6.patch

index faf7fce..243e1d1 100644 (file)
@@ -63,32 +63,7 @@ Index: linux-stage/fs/ext4/mballoc.c
        atomic_add(free, &sbi->s_mb_discarded);
  
        return err;
-@@ -4450,6 +4462,24 @@
-       trace_ext4_request_blocks(ar);
-+
-+      if (dev_check_rdonly(sb->s_bdev)) {
-+              struct block_device *bdev = sb->s_bdev;
-+
-+              printk(KERN_WARNING "Alloc from readonly device %s (%#x): "
-+                      "[inode %lu] [logic %llu] [goal %llu] [ll %llu] "
-+                      "[pl %llu] [lr %llu] [pr %llu] [len %u] [flags %u]\n",
-+                      bdev->bd_disk ? bdev->bd_disk->disk_name : "",
-+                      bdev->bd_dev, ar->inode->i_ino,
-+                      (unsigned long long)ar->logical,
-+                      (unsigned long long)ar->goal,
-+                      (unsigned long long)ar->lleft,
-+                      (unsigned long long)ar->pleft,
-+                      (unsigned long long)ar->lright,
-+                      (unsigned long long)ar->pright,
-+                      ar->len, ar->flags);
-+      }
-+
-       /*
-        * For delayed allocation, we could skip the ENOSPC and
-        * EDQUOT check, as blocks and quotas have been already
-@@ -4529,6 +4559,25 @@
+@@ -4511,6 +4541,25 @@
                        ac->ac_b_ex.fe_len = 0;
                        ar->len = 0;
                        ext4_mb_show_ac(ac);
@@ -114,22 +89,6 @@ Index: linux-stage/fs/ext4/mballoc.c
                } else {
                        block = ext4_grp_offs_to_block(sb, &ac->ac_b_ex);
                        ar->len = ac->ac_b_ex.fe_len;
-@@ -4691,6 +4740,15 @@
-               goto error_return;
-       }
-+      if (dev_check_rdonly(sb->s_bdev)) {
-+              struct block_device *bdev = sb->s_bdev;
-+
-+              printk(KERN_WARNING "Release to readonly device %s (%#x): "
-+                      "[inode %lu] [block %llu] [count %lu] [is_meta %d]\n",
-+                      bdev->bd_disk ? bdev->bd_disk->disk_name : "",
-+                      bdev->bd_dev, inode->i_ino, block, count, metadata);
-+      }
-+
-       ext4_debug("freeing block %llu\n", block);
-       trace_ext4_free_blocks(inode, block, count, metadata);
 Index: linux-stage/fs/ext4/mballoc.h
 ===================================================================
 --- linux-stage.orig/fs/ext4/mballoc.h 2011-03-14 16:32:50.859552482 +0800
index 9a93611..ff6ef5f 100644 (file)
@@ -60,32 +60,7 @@ Index: linux-stage/fs/ext4/mballoc.c
        atomic_add(free, &sbi->s_mb_discarded);
  
        return err;
-@@ -4800,6 +4813,24 @@
-               }
-       }
-+
-+        if (dev_check_rdonly(sb->s_bdev)) {
-+                struct block_device *bdev = sb->s_bdev;
-+
-+                printk(KERN_WARNING "Alloc from readonly device %s (%#x): "
-+                       "[inode %lu] [logic %llu] [goal %llu] [ll %llu] "
-+                     "[pl %llu] [lr %llu] [pr %llu] [len %u] [flags %u]\n",
-+                       bdev->bd_disk ? bdev->bd_disk->disk_name : "",
-+                       bdev->bd_dev, ar->inode->i_ino,
-+                     (unsigned long long)ar->logical, 
-+                     (unsigned long long)ar->goal,
-+                       (unsigned long long)ar->lleft,
-+                     (unsigned long long)ar->pleft,
-+                     (unsigned long long)ar->lright,
-+                     (unsigned long long)ar->pright,
-+                     ar->len, ar->flags);
-+        }
-+
-       ac = kmem_cache_alloc(ext4_ac_cachep, GFP_NOFS);
-       if (!ac) {
-               ar->len = 0;
-@@ -4850,6 +4881,25 @@
+@@ -4832,6 +4863,25 @@
                        ac->ac_b_ex.fe_len = 0;
                        ar->len = 0;
                        ext4_mb_show_ac(ac);
@@ -111,22 +86,6 @@ Index: linux-stage/fs/ext4/mballoc.c
                } else {
                        block = ext4_grp_offs_to_block(sb, &ac->ac_b_ex);
                        ar->len = ac->ac_b_ex.fe_len;
-@@ -5025,6 +5075,15 @@
-               goto error_return;
-       }
-+        if (dev_check_rdonly(sb->s_bdev)) {
-+                struct block_device *bdev = sb->s_bdev;
-+
-+                printk(KERN_WARNING "Release to readonly device %s (%#x): "
-+                       "[inode %lu] [block %lu] [count %lu] [is_meta %d]\n",
-+                       bdev->bd_disk ? bdev->bd_disk->disk_name : "",
-+                       bdev->bd_dev, inode->i_ino, (unsigned long)block, count, metadata);
-+        }
-+
-       ext4_debug("freeing block %llu\n", block);
-       trace_mark(ext4_free_blocks,
-                  "dev %s block %llu count %lu metadata %d ino %lu",
 Index: linux-stage/fs/ext4/mballoc.h
 ===================================================================
 --- linux-stage.orig/fs/ext4/mballoc.h 2010-01-26 22:50:36.000000000 +0800
index f6e7129..38aecf3 100644 (file)
@@ -30,29 +30,20 @@ Index: linux-2.6.32-131.0.15.el6.x86_64/block/blk-core.c
  /*
   * Check whether this bio extends beyond the end of the device.
   */
-@@ -1517,6 +1519,21 @@ static inline void __generic_make_reques
+@@ -1517,6 +1519,12 @@ static inline void __generic_make_reques
                if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags)))
                        goto end_io;
  
-+               /* this is cfs's dev_rdonly check */
-+               if (bio_rw(bio) == WRITE && dev_check_rdonly(bio->bi_bdev)) {
-+                       struct block_device *bdev = bio->bi_bdev;
-+
-+                       printk(KERN_WARNING "Write to readonly device %s (%#x) "
-+                              "bi_flags: %lx, bi_vcnt: %d, bi_idx: %d, "
-+                              "bi->size: %d, bi_cnt: %d, bi_private: %p\n",
-+                              bdev->bd_disk ? bdev->bd_disk->disk_name : "",
-+                              bdev->bd_dev, bio->bi_flags, bio->bi_vcnt,
-+                              bio->bi_idx, bio->bi_size,
-+                              atomic_read(&bio->bi_cnt), bio->bi_private);
-+                       err = 0;
-+                       goto end_io;
-+               }
++              /* this is cfs's dev_rdonly check */
++              if (bio_rw(bio) == WRITE && dev_check_rdonly(bio->bi_bdev)) {
++                      err = 0;
++                      goto end_io;
++              }
 +
                if (should_fail_request(bio))
                        goto end_io;
  
-@@ -2628,6 +2647,99 @@ int kblockd_schedule_work(struct request
+@@ -2619,6 +2638,99 @@ int kblockd_schedule_work(struct request
  }
  EXPORT_SYMBOL(kblockd_schedule_work);