of blkdev_put().
- revome ext3-wantedi-misc-2.6-suse.patch from fc5/fc3 series.
b=11971
i=adilger
i=nathan
Details : in some rare cases, the cat log bitmap is set too early. and it
should be set only after create log success.
+Severity : major
+Bugzilla : 11971
+Description: Accessing a block bevice can re-enable I/O when Lustre is
+ tearing down a device.
+Details : dev_clear_rdonly(bdev) must be called in kill_bdev() instead of
+ blkdev_put().
+
--------------------------------------------------------------------------------
2007-05-03 Cluster File Systems, Inc. <info@clusterfs.com>
-Index: linux-2.6.16.i686/fs/block_dev.c
-===================================================================
---- linux-2.6.16.i686.orig/fs/block_dev.c 2006-03-20 13:53:29.000000000 +0800
-+++ linux-2.6.16.i686/fs/block_dev.c 2006-05-30 21:15:22.000000000 +0800
-@@ -747,6 +747,7 @@
- }
- unlock_kernel();
- up(&bdev->bd_sem);
-+ dev_clear_rdonly(bdev);
- bdput(bdev);
- return ret;
- }
-Index: linux-2.6.16.i686/block/ll_rw_blk.c
-===================================================================
---- linux-2.6.16.i686.orig/block/ll_rw_blk.c 2006-05-30 15:47:03.000000000 +0800
-+++ linux-2.6.16.i686/block/ll_rw_blk.c 2006-05-30 21:18:49.000000000 +0800
-@@ -2940,6 +2940,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
set_bit(BIO_EOF, &bio->bi_flags);
}
/**
* 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 @@
+@@ -3020,6 +3022,12 @@ end_io:
if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags)))
goto end_io;
/*
* If this device has partitions, remap block n
-@@ -3593,6 +3601,91 @@
+@@ -3593,6 +3601,91 @@ void swap_io_context(struct io_context *
*ioc2 = temp;
}
EXPORT_SYMBOL(swap_io_context);
/*
* sysfs parts below
-Index: linux-2.6.16.i686/include/linux/fs.h
-===================================================================
---- linux-2.6.16.i686.orig/include/linux/fs.h 2006-05-30 21:12:27.000000000 +0800
-+++ linux-2.6.16.i686/include/linux/fs.h 2006-05-30 21:15:22.000000000 +0800
-@@ -1558,6 +1558,10 @@
+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);
struct bio;
extern void submit_bio(int, struct bio *);
extern int bdev_read_only(struct block_device *);
extern int set_blocksize(struct block_device *, int);
extern int sb_set_blocksize(struct super_block *, int);
extern int sb_min_blocksize(struct super_block *, int);
+diff -rup linux-2.6.16.i686.orig/include/linux/fs.h.orig linux-2.6.16.i686/include/linux/fs.h.orig
+--- linux-2.6.16.i686.orig/include/linux/fs.h.orig 2007-05-29 15:24:37.000000000 +0300
++++ linux-2.6.16.i686/include/linux/fs.h.orig 2007-05-29 15:24:38.000000000 +0300
+@@ -1568,7 +1568,7 @@ ssize_t generic_file_write_nolock(struct
+ extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void *);
+ extern void do_generic_mapping_read(struct address_space *mapping,
+ struct file_ra_state *, struct file *,
+- loff_t *, read_descriptor_t *, read_actor_t);
++ loff_t *, read_descriptor_t *, read_actor_t, int);
+ extern void
+ file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
+ extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov,
+@@ -1600,14 +1600,15 @@ static inline int xip_truncate_page(stru
+
+ static inline void do_generic_file_read(struct file * filp, loff_t *ppos,
+ read_descriptor_t * desc,
+- read_actor_t actor)
++ read_actor_t actor, int nonblock)
+ {
+ do_generic_mapping_read(filp->f_mapping,
+ &filp->f_ra,
+ filp,
+ ppos,
+ desc,
+- actor);
++ actor,
++ nonblock);
+ }
+
+ ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
-diff -ur linux-2.6.5-lnxi.orig/drivers/block/ll_rw_blk.c linux-2.6.5-lnxi/drivers/block/ll_rw_blk.c
---- linux-2.6.5-lnxi.orig/drivers/block/ll_rw_blk.c 2005-04-11 10:16:14.278505679 -0700
-+++ linux-2.6.5-lnxi/drivers/block/ll_rw_blk.c 2005-04-11 09:42:22.750936924 -0700
-@@ -2458,6 +2458,8 @@ static inline void blk_partition_remap(s
- }
+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
+ return 0;
}
+int dev_check_rdonly(struct block_device *bdev);
+
/**
- * 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.
-@@ -2546,6 +2548,13 @@ end_io:
- if (test_bit(QUEUE_FLAG_DEAD, &q->queue_flags))
- goto end_io;
+ * 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;
+ /* this is cfs's dev_rdonly check */
+ if (bio->bi_rw == WRITE &&
+ }
+
/*
- * If this device has partitions, remap block n
- * of partition p to block n+start(p) of the disk.
-@@ -3078,6 +3087,92 @@ void swap_io_context(struct io_context *
- }
+ * elevator says don't/can't merge. get new request
+ */
+@@ -3445,6 +3454,92 @@ EXPORT_SYMBOL(dev_clear_rdonly);
+ EXPORT_SYMBOL(dev_check_rdonly);
/*
+ * Debug code for turning block devices "read-only" (will discard writes
* sysfs parts below
*/
struct queue_sysfs_entry {
-diff -ur linux-2.6.5-lnxi.orig/fs/block_dev.c linux-2.6.5-lnxi/fs/block_dev.c
---- linux-2.6.5-lnxi.orig/fs/block_dev.c 2004-11-11 07:28:30.000000000 -0800
-+++ linux-2.6.5-lnxi/fs/block_dev.c 2005-04-11 09:49:01.891407856 -0700
-@@ -739,6 +739,7 @@ int blkdev_put(struct block_device *bdev
- }
- unlock_kernel();
- up(&bdev->bd_sem);
+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
+@@ -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);
- bdput(bdev);
- return ret;
- }
-diff -ur linux-2.6.5-lnxi.orig/include/linux/fs.h linux-2.6.5-lnxi/include/linux/fs.h
---- linux-2.6.5-lnxi.orig/include/linux/fs.h 2004-11-11 07:28:45.000000000 -0800
-+++ linux-2.6.5-lnxi/include/linux/fs.h 2005-04-11 09:43:27.423116140 -0700
-@@ -1385,6 +1385,10 @@ extern void file_kill(struct file *f);
+ }
+
+ 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);
struct bio;
extern int submit_bio(int, struct bio *);
extern int bdev_read_only(struct block_device *);
-Index: linux-2.6/fs/block_dev.c
-===================================================================
---- linux-2.6.orig/fs/block_dev.c 2006-07-06 23:41:48.000000000 +0800
-+++ linux-2.6/fs/block_dev.c 2006-07-15 16:20:25.000000000 +0800
-@@ -1118,6 +1118,7 @@ static int __blkdev_put(struct block_dev
- }
- unlock_kernel();
- mutex_unlock(&bdev->bd_mutex);
-+ dev_clear_rdonly(bdev);
- bdput(bdev);
- return ret;
- }
-Index: linux-2.6/block/ll_rw_blk.c
-===================================================================
---- linux-2.6.orig/block/ll_rw_blk.c 2006-07-10 22:30:08.000000000 +0800
-+++ linux-2.6/block/ll_rw_blk.c 2006-07-15 16:15:14.000000000 +0800
+diff -urp linux-2.6.18.1.orig/block/ll_rw_blk.c linux-2.6.18.1/block/ll_rw_blk.c
+--- linux-2.6.18.1.orig/block/ll_rw_blk.c 2006-10-14 06:34:03.000000000 +0300
++++ linux-2.6.18.1/block/ll_rw_blk.c 2007-05-29 14:50:46.000000000 +0300
@@ -2993,6 +2993,8 @@ static void handle_bad_sector(struct bio
set_bit(BIO_EOF, &bio->bi_flags);
}
/*
* If this device has partitions, remap block n
-@@ -3673,6 +3681,91 @@ void swap_io_context(struct io_context *
+@@ -3675,6 +3683,91 @@ void swap_io_context(struct io_context *
*ioc2 = temp;
}
EXPORT_SYMBOL(swap_io_context);
/*
* sysfs parts below
-Index: linux-2.6/include/linux/fs.h
-===================================================================
---- linux-2.6.orig/include/linux/fs.h 2006-07-15 16:14:58.000000000 +0800
-+++ linux-2.6/include/linux/fs.h 2006-07-15 16:15:14.000000000 +0800
-@@ -1648,6 +1648,10 @@ extern void file_kill(struct file *f);
+diff -urp linux-2.6.18.1.orig/fs/block_dev.c linux-2.6.18.1/fs/block_dev.c
+--- linux-2.6.18.1.orig/fs/block_dev.c 2006-10-14 06:34:03.000000000 +0300
++++ linux-2.6.18.1/fs/block_dev.c 2007-05-29 14:53:38.000000000 +0300
+@@ -58,6 +58,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 -urp linux-2.6.18.1.orig/include/linux/fs.h linux-2.6.18.1/include/linux/fs.h
+--- linux-2.6.18.1.orig/include/linux/fs.h 2006-10-14 06:34:03.000000000 +0300
++++ linux-2.6.18.1/include/linux/fs.h 2007-05-29 14:50:46.000000000 +0300
+@@ -1632,6 +1632,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 *);
vfs_intent-2.6-fc3.patch
vfs_nointent-2.6-rhel4.patch
vfs_races-2.6-fc3.patch
-ext3-wantedi-misc-2.6-suse.patch
nfs-cifs-intent-2.6-fc3.patch
iopen-misc-2.6-fc3.patch
export-truncate-2.6-suse.patch
vfs_intent-2.6-fc5.patch
vfs_nointent-2.6-fc5.patch
vfs_races-2.6.12.patch
-ext3-wantedi-misc-2.6-suse.patch
jbd-2.6.10-jcberr.patch
nfs-cifs-intent-2.6-fc5.patch
iopen-misc-2.6.12.patch