-diff -rup linux-2.6.5-7.283.orig/drivers/block/ll_rw_blk.c linux-2.6.5-7.283/drivers/block/ll_rw_blk.c
---- linux-2.6.5-7.283.orig/drivers/block/ll_rw_blk.c 2006-12-01 17:41:03.000000000 +0200
-+++ linux-2.6.5-7.283/drivers/block/ll_rw_blk.c 2007-05-29 15:03:34.000000000 +0300
-@@ -2494,6 +2494,8 @@ static inline int attempt_front_merge(re
+Index: linux-2.6.9/drivers/block/ll_rw_blk.c
+===================================================================
+--- linux-2.6.9.orig/drivers/block/ll_rw_blk.c
++++ linux-2.6.9/drivers/block/ll_rw_blk.c
+@@ -2326,6 +2326,8 @@ static inline int attempt_front_merge(re
return 0;
}
/**
* blk_attempt_remerge - attempt to remerge active head with next request
* @q: The &request_queue_t belonging to the device
-@@ -2607,6 +2609,13 @@ again:
- elv_merged_request(q, req);
- goto out;
+@@ -2631,6 +2633,13 @@ end_io:
+ if (test_bit(QUEUE_FLAG_DEAD, &q->queue_flags))
+ goto end_io;
+ /* this is cfs's dev_rdonly check */
+ if (bio->bi_rw == WRITE &&
+ }
+
/*
- * elevator says don't/can't merge. get new request
- */
-@@ -3445,6 +3454,92 @@ EXPORT_SYMBOL(dev_clear_rdonly);
- EXPORT_SYMBOL(dev_check_rdonly);
+ * If this device has partitions, remap block n
+ * of partition p to block n+start(p) of the disk.
+@@ -3180,6 +3189,92 @@ void swap_io_context(struct io_context *
+
/*
+ * Debug code for turning block devices "read-only" (will discard writes
* sysfs parts below
*/
struct queue_sysfs_entry {
-diff -rup linux-2.6.5-7.283.orig/fs/block_dev.c linux-2.6.5-7.283/fs/block_dev.c
---- linux-2.6.5-7.283.orig/fs/block_dev.c 2006-12-01 17:39:59.000000000 +0200
-+++ linux-2.6.5-7.283/fs/block_dev.c 2007-05-29 15:04:56.000000000 +0300
+Index: linux-2.6.9/fs/block_dev.c
+===================================================================
+--- linux-2.6.9.orig/fs/block_dev.c
++++ linux-2.6.9/fs/block_dev.c
@@ -60,6 +60,7 @@ static void kill_bdev(struct block_devic
{
invalidate_bdev(bdev, 1);
}
int set_blocksize(struct block_device *bdev, int size)
-diff -rup linux-2.6.5-7.283.orig/include/linux/fs.h linux-2.6.5-7.283/include/linux/fs.h
---- linux-2.6.5-7.283.orig/include/linux/fs.h 2006-12-01 17:40:58.000000000 +0200
-+++ linux-2.6.5-7.283/include/linux/fs.h 2007-05-29 15:03:34.000000000 +0300
-@@ -1422,6 +1422,10 @@ extern void file_kill(struct file *f);
+Index: linux-2.6.9/include/linux/fs.h
+===================================================================
+--- linux-2.6.9.orig/include/linux/fs.h
++++ linux-2.6.9/include/linux/fs.h
+@@ -1492,6 +1492,10 @@ extern void file_kill(struct file *f);
struct bio;
- extern int submit_bio(int, struct bio *);
+ extern void submit_bio(int, struct bio *);
extern int bdev_read_only(struct block_device *);
+#define HAVE_CLEAR_RDONLY_ON_PUT
+void dev_set_rdonly(struct block_device *bdev);