diff --git a/lustre/kernel_patches/patches/dev_read_only-2.6-suse.patch b/lustre/kernel_patches/patches/dev_read_only-2.6-suse.patch index 406e155928f0ddcb6fe92e84c22c86df47576ab4..e486944af29f73c3addde200132feb35e5bfd357 100644 --- a/lustre/kernel_patches/patches/dev_read_only-2.6-suse.patch +++ b/lustre/kernel_patches/patches/dev_read_only-2.6-suse.patch @@ -1,7 +1,8 @@ -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; } @@ -10,9 +11,9 @@ diff -rup linux-2.6.5-7.283.orig/drivers/block/ll_rw_blk.c linux-2.6.5-7.283/dri /** * 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 && @@ -22,10 +23,10 @@ diff -rup linux-2.6.5-7.283.orig/drivers/block/ll_rw_blk.c linux-2.6.5-7.283/dri + } + /* - * 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 @@ -117,9 +118,10 @@ diff -rup linux-2.6.5-7.283.orig/drivers/block/ll_rw_blk.c linux-2.6.5-7.283/dri * 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); @@ -128,12 +130,13 @@ diff -rup linux-2.6.5-7.283.orig/fs/block_dev.c linux-2.6.5-7.283/fs/block_dev.c } 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);