Whamcloud - gitweb
Clear dev_rdonly flag for external journal devices (Andreas)
[fs/lustre-release.git] / lustre / kernel_patches / patches / dev_read_only-2.6-fc5.patch
index 5cab63e..51c7f66 100644 (file)
@@ -1,7 +1,8 @@
-diff -rup linux-2.6.16.i686.orig/block/ll_rw_blk.c linux-2.6.16.i686/block/ll_rw_blk.c
---- linux-2.6.16.i686.orig/block/ll_rw_blk.c   2007-05-29 15:24:36.000000000 +0300
-+++ linux-2.6.16.i686/block/ll_rw_blk.c        2007-05-29 15:33:50.000000000 +0300
-@@ -2940,6 +2940,8 @@ static void handle_bad_sector(struct bio
+Index: linux-2.6.16.i686/block/ll_rw_blk.c
+===================================================================
+--- linux-2.6.16.i686.orig/block/ll_rw_blk.c
++++ linux-2.6.16.i686/block/ll_rw_blk.c
+@@ -2989,6 +2989,8 @@ static void handle_bad_sector(struct bio
        set_bit(BIO_EOF, &bio->bi_flags);
  }
  
@@ -10,7 +11,7 @@ diff -rup linux-2.6.16.i686.orig/block/ll_rw_blk.c linux-2.6.16.i686/block/ll_rw
  /**
   * generic_make_request: hand a buffer to its device driver for I/O
   * @bio:  The bio describing the location in memory and on the device.
-@@ -3020,6 +3022,12 @@ end_io:
+@@ -3075,6 +3077,12 @@ end_io:
  
                if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags)))
                        goto end_io;
@@ -23,7 +24,7 @@ diff -rup linux-2.6.16.i686.orig/block/ll_rw_blk.c linux-2.6.16.i686/block/ll_rw
  
                /*
                 * If this device has partitions, remap block n
-@@ -3593,6 +3601,91 @@ void swap_io_context(struct io_context *
+@@ -3697,6 +3705,91 @@ void swap_io_context(struct io_context *
        *ioc2 = temp;
  }
  EXPORT_SYMBOL(swap_io_context);
@@ -115,21 +116,23 @@ diff -rup linux-2.6.16.i686.orig/block/ll_rw_blk.c linux-2.6.16.i686/block/ll_rw
  
  /*
   * sysfs parts below
-diff -rup linux-2.6.16.i686.orig/fs/block_dev.c linux-2.6.16.i686/fs/block_dev.c
---- linux-2.6.16.i686.orig/fs/block_dev.c      2006-03-20 07:53:29.000000000 +0200
-+++ linux-2.6.16.i686/fs/block_dev.c   2007-05-29 15:35:00.000000000 +0300
-@@ -60,6 +60,7 @@ static void kill_bdev(struct block_devic
- {
-       invalidate_bdev(bdev, 1);
-       truncate_inode_pages(bdev->bd_inode->i_mapping, 0);
-+      dev_clear_rdonly(bdev);
- }     
- int set_blocksize(struct block_device *bdev, int size)
-diff -rup linux-2.6.16.i686.orig/include/linux/fs.h linux-2.6.16.i686/include/linux/fs.h
---- linux-2.6.16.i686.orig/include/linux/fs.h  2007-05-29 15:24:38.000000000 +0300
-+++ linux-2.6.16.i686/include/linux/fs.h       2007-05-29 15:33:50.000000000 +0300
-@@ -1541,6 +1541,10 @@ extern void file_kill(struct file *f);
+Index: linux-2.6.16.i686/fs/block_dev.c
+===================================================================
+--- linux-2.6.16.i686.orig/fs/block_dev.c
++++ linux-2.6.16.i686/fs/block_dev.c
+@@ -763,6 +763,7 @@ int blkdev_put(struct block_device *bdev
+                       blkdev_put(bdev->bd_contains);
+               }
+               bdev->bd_contains = NULL;
++              dev_clear_rdonly(bdev);
+       }
+       unlock_kernel();
+       up(&bdev->bd_sem);
+Index: linux-2.6.16.i686/include/linux/fs.h
+===================================================================
+--- linux-2.6.16.i686.orig/include/linux/fs.h
++++ linux-2.6.16.i686/include/linux/fs.h
+@@ -1595,6 +1595,10 @@ extern void file_kill(struct file *f);
  struct bio;
  extern void submit_bio(int, struct bio *);
  extern int bdev_read_only(struct block_device *);