Index: linux-stage/fs/ext4/ext4.h
===================================================================
---- linux-stage.orig/fs/ext4/ext4.h 2011-03-14 15:57:13.613674482 +0800
-+++ linux-stage/fs/ext4/ext4.h 2011-03-14 15:57:22.031906980 +0800
-@@ -780,6 +780,7 @@
+--- linux-stage.orig/fs/ext4/ext4.h 2011-05-20 11:01:37.000000000 +0300
++++ linux-stage/fs/ext4/ext4.h 2011-05-20 11:01:44.000000000 +0300
+@@ -859,6 +859,7 @@ struct ext4_inode_info {
#define EXT4_MOUNT_QUOTA 0x80000 /* Some quota option set */
#define EXT4_MOUNT_USRQUOTA 0x100000 /* "old" user quota */
#define EXT4_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */
#define EXT4_MOUNT_I_VERSION 0x2000000 /* i_version support */
Index: linux-stage/fs/ext4/ext4_jbd2.h
===================================================================
---- linux-stage.orig/fs/ext4/ext4_jbd2.h 2011-03-14 15:57:12.000000000 +0800
-+++ linux-stage/fs/ext4/ext4_jbd2.h 2011-03-14 15:58:55.957499110 +0800
+--- linux-stage.orig/fs/ext4/ext4_jbd2.h 2011-05-20 11:00:01.000000000 +0300
++++ linux-stage/fs/ext4/ext4_jbd2.h 2011-05-20 11:01:44.000000000 +0300
@@ -33,7 +33,7 @@
#define EXT4_SINGLEDATA_TRANS_BLOCKS(sb) \
+ || test_opt(sb, EXTENTS) ? 27U : 8U)
#define ext4_journal_dirty_metadata(handle, bh) \
- ext4_handle_dirty_metadata(handle, NULL, bh)
+ ext4_handle_dirty_metadata(handle, NULL, bh)
Index: linux-stage/fs/ext4/extents.c
===================================================================
---- linux-stage.orig/fs/ext4/extents.c 2011-03-14 15:57:12.000000000 +0800
-+++ linux-stage/fs/ext4/extents.c 2011-03-14 16:14:14.246265207 +0800
-@@ -2553,7 +2553,7 @@
+--- linux-stage.orig/fs/ext4/extents.c 2011-05-20 11:00:01.000000000 +0300
++++ linux-stage/fs/ext4/extents.c 2011-05-20 11:01:44.000000000 +0300
+@@ -2555,7 +2555,7 @@ void ext4_ext_init(struct super_block *s
* possible initialization would be here
*/
#if defined(AGGRESSIVE_TEST) || defined(CHECK_BINSEARCH) || defined(EXTENTS_STATS)
printk(KERN_INFO "EXT4-fs: file extents enabled");
#ifdef AGGRESSIVE_TEST
-@@ -2580,7 +2580,7 @@
+@@ -2582,7 +2582,7 @@ void ext4_ext_init(struct super_block *s
*/
void ext4_ext_release(struct super_block *sb)
{
#ifdef EXTENTS_STATS
Index: linux-stage/fs/ext4/ialloc.c
===================================================================
---- linux-stage.orig/fs/ext4/ialloc.c 2011-03-14 15:57:13.000000000 +0800
-+++ linux-stage/fs/ext4/ialloc.c 2011-03-14 16:02:03.334308846 +0800
-@@ -1049,7 +1049,7 @@
+--- linux-stage.orig/fs/ext4/ialloc.c 2011-05-20 11:01:36.000000000 +0300
++++ linux-stage/fs/ext4/ialloc.c 2011-05-20 11:01:44.000000000 +0300
+@@ -1049,7 +1049,7 @@ got:
if (err)
goto fail_free_drop;
+ if (test_opt(sb, EXTENTS)) {
/* set extent flag only for directory, file and normal symlink*/
if (S_ISDIR(mode) || S_ISREG(mode) || S_ISLNK(mode)) {
- EXT4_I(inode)->i_flags |= EXT4_EXTENTS_FL;
+ ext4_set_inode_flag(inode, EXT4_INODE_EXTENTS);
Index: linux-stage/fs/ext4/migrate.c
===================================================================
---- linux-stage.orig/fs/ext4/migrate.c 2011-03-14 15:36:15.000000000 +0800
-+++ linux-stage/fs/ext4/migrate.c 2011-03-14 16:05:39.083369164 +0800
-@@ -459,13 +459,13 @@
+--- linux-stage.orig/fs/ext4/migrate.c 2011-05-20 10:59:29.000000000 +0300
++++ linux-stage/fs/ext4/migrate.c 2011-05-20 11:03:22.000000000 +0300
+@@ -459,13 +459,10 @@ int ext4_ext_migrate(struct inode *inode
unsigned long max_entries;
__u32 goal;
- */
- if (!EXT4_HAS_INCOMPAT_FEATURE(inode->i_sb,
- EXT4_FEATURE_INCOMPAT_EXTENTS) ||
-- (EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL))
+- (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)))
+ if (!test_opt(inode->i_sb, EXTENTS))
+ /*
+ * if mounted with noextents we don't allow the migrate
+ */
-+ return -EINVAL;
-+
-+ if ((EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL))
return -EINVAL;
if (S_ISLNK(inode->i_mode) && inode->i_blocks == 0)
Index: linux-stage/fs/ext4/super.c
===================================================================
---- linux-stage.orig/fs/ext4/super.c 2011-03-14 15:57:18.000000000 +0800
-+++ linux-stage/fs/ext4/super.c 2011-03-14 16:11:58.234626200 +0800
-@@ -942,6 +942,8 @@
+--- linux-stage.orig/fs/ext4/super.c 2011-05-20 11:01:37.000000000 +0300
++++ linux-stage/fs/ext4/super.c 2011-05-20 11:01:44.000000000 +0300
+@@ -945,6 +945,8 @@ static int ext4_show_options(struct seq_
seq_puts(seq, ",journal_async_commit");
if (test_opt(sb, NOBH))
seq_puts(seq, ",nobh");
if (test_opt(sb, I_VERSION))
seq_puts(seq, ",i_version");
if (!test_opt(sb, DELALLOC))
-@@ -1500,6 +1502,7 @@
+@@ -1515,6 +1517,7 @@ enum {
Opt_inode_readahead_blks, Opt_journal_ioprio,
Opt_discard, Opt_nodiscard,
Opt_mballoc, Opt_bigendian_extents, Opt_force_over_16tb,
};
static const match_table_t tokens = {
-@@ -1571,6 +1574,8 @@
+@@ -1589,6 +1592,8 @@ static const match_table_t tokens = {
{Opt_mballoc, "mballoc"},
{Opt_discard, "discard"},
{Opt_nodiscard, "nodiscard"},
{Opt_err, NULL},
};
-@@ -1613,6 +1618,7 @@
+@@ -1631,6 +1636,7 @@ static int parse_options(char *options,
int qtype, qfmt;
char *qname;
#endif
if (!options)
return 1;
-@@ -2017,6 +2023,32 @@
+@@ -2039,6 +2045,32 @@ set_qf_format:
case Opt_force_over_16tb:
force_over_16tb = 1;
break;
default:
ext4_msg(sb, KERN_ERR,
"Unrecognized mount option \"%s\" "
-@@ -2879,6 +2911,17 @@
+@@ -2901,6 +2933,17 @@ static int ext4_fill_super(struct super_
set_opt(sbi->s_mount_opt, BARRIER);
/*
-Index: linux-stage/fs/ext4/ext4_jbd2.h
+Index: linux-stage/fs/ext4/ext4.h
===================================================================
---- linux-stage.orig/fs/ext4/ext4_jbd2.h
-+++ linux-stage/fs/ext4/ext4_jbd2.h
-@@ -35,6 +35,8 @@
- (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS) \
- ? 27U : 8U)
+--- linux-stage.orig/fs/ext4/ext4.h 2011-05-20 10:59:32.000000000 +0300
++++ linux-stage/fs/ext4/ext4.h 2011-05-20 11:01:06.000000000 +0300
+@@ -1191,6 +1191,9 @@ EXT4_INODE_BIT_FNS(state, state_flags)
-+#define ext4_journal_dirty_metadata(handle, bh) \
-+ ext4_handle_dirty_metadata(handle, NULL, bh)
- /* Extended attribute operations touch at most two data buffers,
- * two bitmap buffers, and two group summaries, in addition to the inode
- * and the superblock, which are already accounted for. */
+ #define NEXT_ORPHAN(inode) EXT4_I(inode)->i_dtime
+
++/* Has been moved to linux/magic.h but we need it for Lustre */
++#define EXT4_SUPER_MAGIC 0xEF53
++
+ /*
+ * Codes for operating systems
+ */
+@@ -1630,6 +1633,9 @@ extern void ext4_mb_put_buddy_cache_lock
+ ext4_group_t, int);
+ extern int ext4_trim_fs(struct super_block *, struct fstrim_range *);
+
++extern void ext4_mb_discard_inode_preallocations(struct inode *);
++
++
+ /* inode.c */
+ int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode,
+ struct buffer_head *bh, ext4_fsblk_t blocknr);
Index: linux-stage/fs/ext4/ext4_extents.h
===================================================================
---- linux-stage.orig/fs/ext4/ext4_extents.h
-+++ linux-stage/fs/ext4/ext4_extents.h
+--- linux-stage.orig/fs/ext4/ext4_extents.h 2011-05-20 10:59:30.000000000 +0300
++++ linux-stage/fs/ext4/ext4_extents.h 2011-05-20 11:00:01.000000000 +0300
@@ -58,6 +58,12 @@
*/
#define EXT_STATS_
extern int ext4_can_extents_be_merged(struct inode *inode,
struct ext4_extent *ex1,
struct ext4_extent *ex2);
-Index: linux-stage/fs/ext4/mballoc.c
-===================================================================
---- linux-stage.orig/fs/ext4/mballoc.c
-+++ linux-stage/fs/ext4/mballoc.c
-@@ -4039,6 +4039,7 @@ repeat:
- if (ac)
- kmem_cache_free(ext4_ac_cachep, ac);
- }
-+EXPORT_SYMBOL(ext4_discard_preallocations);
-
- /*
- * finds all preallocated spaces and return blocks being freed to them
-@@ -4831,3 +4832,6 @@ error_return:
- kmem_cache_free(ext4_ac_cachep, ac);
- return;
- }
-+
-+EXPORT_SYMBOL(ext4_free_blocks);
-+
-Index: linux-stage/fs/ext4/super.c
-===================================================================
---- linux-stage.orig/fs/ext4/super.c
-+++ linux-stage/fs/ext4/super.c
-@@ -127,6 +127,7 @@ __u32 ext4_itable_unused_count(struct su
- (EXT4_DESC_SIZE(sb) >= EXT4_MIN_DESC_SIZE_64BIT ?
- (__u32)le16_to_cpu(bg->bg_itable_unused_hi) << 16 : 0);
- }
-+EXPORT_SYMBOL(ext4_itable_unused_count);
-
- void ext4_block_bitmap_set(struct super_block *sb,
- struct ext4_group_desc *bg, ext4_fsblk_t blk)
-@@ -1497,11 +1498,13 @@ enum {
- Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
- Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_jqfmt_vfsv1, Opt_quota,
- Opt_noquota, Opt_ignore, Opt_barrier, Opt_nobarrier, Opt_err,
-+ Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
- Opt_resize, Opt_usrquota, Opt_grpquota, Opt_i_version,
- Opt_stripe, Opt_delalloc, Opt_nodelalloc,
- Opt_block_validity, Opt_noblock_validity,
- Opt_inode_readahead_blks, Opt_journal_ioprio,
- Opt_discard, Opt_nodiscard,
-+ Opt_mballoc,
- };
-
- static const match_table_t tokens = {
-@@ -1553,6 +1556,9 @@ static const match_table_t tokens = {
- {Opt_noquota, "noquota"},
- {Opt_quota, "quota"},
- {Opt_usrquota, "usrquota"},
-+ {Opt_iopen, "iopen"},
-+ {Opt_noiopen, "noiopen"},
-+ {Opt_iopen_nopriv, "iopen_nopriv"},
- {Opt_barrier, "barrier=%u"},
- {Opt_barrier, "barrier"},
- {Opt_nobarrier, "nobarrier"},
-@@ -1568,6 +1574,7 @@ static const match_table_t tokens = {
- {Opt_auto_da_alloc, "auto_da_alloc=%u"},
- {Opt_auto_da_alloc, "auto_da_alloc"},
- {Opt_noauto_da_alloc, "noauto_da_alloc"},
-+ {Opt_mballoc, "mballoc"},
- {Opt_discard, "discard"},
- {Opt_nodiscard, "nodiscard"},
- {Opt_err, NULL},
-@@ -1925,6 +1932,10 @@ set_qf_format:
- else
- clear_opt(sbi->s_mount_opt, BARRIER);
- break;
-+ case Opt_iopen:
-+ case Opt_noiopen:
-+ case Opt_iopen_nopriv:
-+ break;
- case Opt_ignore:
- break;
- case Opt_resize:
-@@ -2008,6 +2019,8 @@ set_qf_format:
- case Opt_nodiscard:
- clear_opt(sbi->s_mount_opt, DISCARD);
- break;
-+ case Opt_mballoc:
-+ break;
- default:
- ext4_msg(sb, KERN_ERR,
- "Unrecognized mount option \"%s\" "
Index: linux-stage/fs/ext4/ext4_jbd2.c
===================================================================
---- linux-stage.orig/fs/ext4/ext4_jbd2.c
-+++ linux-stage/fs/ext4/ext4_jbd2.c
+--- linux-stage.orig/fs/ext4/ext4_jbd2.c 2011-05-20 10:59:29.000000000 +0300
++++ linux-stage/fs/ext4/ext4_jbd2.c 2011-05-20 11:00:01.000000000 +0300
@@ -31,6 +31,7 @@ int __ext4_journal_get_write_access(cons
}
return err;
return err;
}
+EXPORT_SYMBOL(__ext4_handle_dirty_metadata);
-Index: linux-stage/fs/ext4/ext4.h
-===================================================================
---- linux-stage.orig/fs/ext4/ext4.h
-+++ linux-stage/fs/ext4/ext4.h
-@@ -1110,6 +1110,9 @@ static inline void ext4_clear_inode_stat
-
- #define NEXT_ORPHAN(inode) EXT4_I(inode)->i_dtime
-
-+/* Has been moved to linux/magic.h but we need it for Lustre */
-+#define EXT4_SUPER_MAGIC 0xEF53
-+
- /*
- * Codes for operating systems
- */
-@@ -1539,6 +1542,8 @@ extern int ext4_mb_add_groupinfo(struct
- extern int ext4_mb_get_buddy_cache_lock(struct super_block *, ext4_group_t);
- extern void ext4_mb_put_buddy_cache_lock(struct super_block *,
- ext4_group_t, int);
-+extern void ext4_mb_discard_inode_preallocations(struct inode *);
-+
- /* inode.c */
- int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode,
- struct buffer_head *bh, ext4_fsblk_t blocknr);
-Index: linux-stage/fs/ext4/inode.c
+Index: linux-stage/fs/ext4/ext4_jbd2.h
===================================================================
---- linux-stage.orig/fs/ext4/inode.c
-+++ linux-stage/fs/ext4/inode.c
-@@ -5204,6 +5204,7 @@ bad_inode:
- iget_failed(inode);
- return ERR_PTR(ret);
- }
-+EXPORT_SYMBOL(ext4_iget);
+--- linux-stage.orig/fs/ext4/ext4_jbd2.h 2011-05-20 10:59:29.000000000 +0300
++++ linux-stage/fs/ext4/ext4_jbd2.h 2011-05-20 11:00:01.000000000 +0300
+@@ -35,6 +35,8 @@
+ (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS) \
+ ? 27U : 8U)
- static int ext4_inode_blocks_set(handle_t *handle,
- struct ext4_inode *raw_inode,
++#define ext4_journal_dirty_metadata(handle, bh) \
++ ext4_handle_dirty_metadata(handle, NULL, bh)
+ /* Extended attribute operations touch at most two data buffers,
+ * two bitmap buffers, and two group summaries, in addition to the inode
+ * and the superblock, which are already accounted for. */
Index: linux-stage/fs/ext4/extents.c
===================================================================
--- linux-stage.orig/fs/ext4/extents.c
* How many index/leaf blocks need to change/allocate to modify nrblocks?
*
* if nrblocks are fit in a single extent (chunk flag is 1), then
-@@ -3941,3 +3990,14 @@ int ext4_fiemap(struct inode *inode, str
+@@ -4029,3 +4079,14 @@ int ext4_fiemap(struct inode *inode, str
return error;
}
+EXPORT_SYMBOL(ext4_ext_walk_space);
+EXPORT_SYMBOL(ext4_ext_find_extent);
+EXPORT_SYMBOL(ext4_ext_drop_refs);
++
+Index: linux-stage/fs/ext4/inode.c
+===================================================================
+--- linux-stage.orig/fs/ext4/inode.c 2011-05-20 10:59:31.000000000 +0300
++++ linux-stage/fs/ext4/inode.c 2011-05-20 11:00:01.000000000 +0300
+@@ -5249,6 +5249,7 @@ bad_inode:
+ iget_failed(inode);
+ return ERR_PTR(ret);
+ }
++EXPORT_SYMBOL(ext4_iget);
+
+ static int ext4_inode_blocks_set(handle_t *handle,
+ struct ext4_inode *raw_inode,
+Index: linux-stage/fs/ext4/mballoc.c
+===================================================================
+--- linux-stage.orig/fs/ext4/mballoc.c 2011-05-20 10:59:32.000000000 +0300
++++ linux-stage/fs/ext4/mballoc.c 2011-05-20 11:00:01.000000000 +0300
+@@ -4044,6 +4044,7 @@ repeat:
+ if (ac)
+ kmem_cache_free(ext4_ac_cachep, ac);
+ }
++EXPORT_SYMBOL(ext4_discard_preallocations);
+
+ /*
+ * finds all preallocated spaces and return blocks being freed to them
+@@ -5029,3 +5030,6 @@ int ext4_trim_fs(struct super_block *sb,
+
+ return ret;
+ }
++
++EXPORT_SYMBOL(ext4_free_blocks);
++
+Index: linux-stage/fs/ext4/super.c
+===================================================================
+--- linux-stage.orig/fs/ext4/super.c 2011-05-20 10:59:31.000000000 +0300
++++ linux-stage/fs/ext4/super.c 2011-05-20 11:00:01.000000000 +0300
+@@ -128,6 +128,7 @@ __u32 ext4_itable_unused_count(struct su
+ (EXT4_DESC_SIZE(sb) >= EXT4_MIN_DESC_SIZE_64BIT ?
+ (__u32)le16_to_cpu(bg->bg_itable_unused_hi) << 16 : 0);
+ }
++EXPORT_SYMBOL(ext4_itable_unused_count);
+
+ void ext4_block_bitmap_set(struct super_block *sb,
+ struct ext4_group_desc *bg, ext4_fsblk_t blk)
+@@ -1500,11 +1501,13 @@ enum {
+ Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
+ Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_jqfmt_vfsv1, Opt_quota,
+ Opt_noquota, Opt_ignore, Opt_barrier, Opt_nobarrier, Opt_err,
++ Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
+ Opt_resize, Opt_usrquota, Opt_grpquota, Opt_i_version,
+ Opt_stripe, Opt_delalloc, Opt_nodelalloc,
+ Opt_block_validity, Opt_noblock_validity,
+ Opt_inode_readahead_blks, Opt_journal_ioprio,
+ Opt_discard, Opt_nodiscard,
++ Opt_mballoc,
+ };
+
+ static const match_table_t tokens = {
+@@ -1556,6 +1559,9 @@ static const match_table_t tokens = {
+ {Opt_noquota, "noquota"},
+ {Opt_quota, "quota"},
+ {Opt_usrquota, "usrquota"},
++ {Opt_iopen, "iopen"},
++ {Opt_noiopen, "noiopen"},
++ {Opt_iopen_nopriv, "iopen_nopriv"},
+ {Opt_barrier, "barrier=%u"},
+ {Opt_barrier, "barrier"},
+ {Opt_nobarrier, "nobarrier"},
+@@ -1571,6 +1577,7 @@ static const match_table_t tokens = {
+ {Opt_auto_da_alloc, "auto_da_alloc=%u"},
+ {Opt_auto_da_alloc, "auto_da_alloc"},
+ {Opt_noauto_da_alloc, "noauto_da_alloc"},
++ {Opt_mballoc, "mballoc"},
+ {Opt_discard, "discard"},
+ {Opt_nodiscard, "nodiscard"},
+ {Opt_err, NULL},
+@@ -1928,6 +1935,10 @@ set_qf_format:
+ else
+ clear_opt(sbi->s_mount_opt, BARRIER);
+ break;
++ case Opt_iopen:
++ case Opt_noiopen:
++ case Opt_iopen_nopriv:
++ break;
+ case Opt_ignore:
+ break;
+ case Opt_resize:
+@@ -2011,6 +2022,8 @@ set_qf_format:
+ case Opt_nodiscard:
+ clear_opt(sbi->s_mount_opt, DISCARD);
+ break;
++ case Opt_mballoc:
++ break;
+ default:
+ ext4_msg(sb, KERN_ERR,
+ "Unrecognized mount option \"%s\" "
Initial efforts to remove this patch are under way in bug 20776.
Once this work comes to fruition this patch can be dropped.
-Index: linux-2.6.32-71.18.1.el6-master/block/blk-core.c
+Index: linux-2.6.32-131.0.15.el6.x86_64/block/blk-core.c
===================================================================
---- linux-2.6.32-71.18.1.el6-master.orig/block/blk-core.c 2011-03-05 11:35:40.404043293 +0800
-+++ linux-2.6.32-71.18.1.el6-master/block/blk-core.c 2011-03-11 20:21:10.492302510 +0800
-@@ -1405,6 +1405,8 @@
+--- linux-2.6.32-131.0.15.el6.x86_64.orig/block/blk-core.c 2011-05-10 21:38:33.000000000 +0300
++++ linux-2.6.32-131.0.15.el6.x86_64/block/blk-core.c 2011-05-19 21:01:04.000000000 +0300
+@@ -1416,6 +1416,8 @@ static inline int should_fail_request(st
#endif /* CONFIG_FAIL_MAKE_REQUEST */
/*
* Check whether this bio extends beyond the end of the device.
*/
-@@ -1506,6 +1508,23 @@
+@@ -1517,6 +1519,23 @@ static inline void __generic_make_reques
if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags)))
goto end_io;
if (should_fail_request(bio))
goto end_io;
-@@ -2578,6 +2586,99 @@
+@@ -2628,6 +2647,99 @@ int kblockd_schedule_work(struct request
}
EXPORT_SYMBOL(kblockd_schedule_work);
int __init blk_dev_init(void)
{
BUILD_BUG_ON(__REQ_NR_BITS > 8 *
-Index: linux-2.6.32-71.18.1.el6-master/fs/block_dev.c
+Index: linux-2.6.32-131.0.15.el6.x86_64/fs/block_dev.c
===================================================================
---- linux-2.6.32-71.18.1.el6-master.orig/fs/block_dev.c 2011-03-05 11:35:40.486042782 +0800
-+++ linux-2.6.32-71.18.1.el6-master/fs/block_dev.c 2011-03-05 11:37:35.624324775 +0800
-@@ -1389,6 +1389,7 @@
+--- linux-2.6.32-131.0.15.el6.x86_64.orig/fs/block_dev.c 2011-05-10 21:38:29.000000000 +0300
++++ linux-2.6.32-131.0.15.el6.x86_64/fs/block_dev.c 2011-05-19 21:01:04.000000000 +0300
+@@ -1389,6 +1389,7 @@ static int __blkdev_put(struct block_dev
if (bdev != bdev->bd_contains)
victim = bdev->bd_contains;
bdev->bd_contains = NULL;
}
unlock_kernel();
mutex_unlock(&bdev->bd_mutex);
-Index: linux-2.6.32-71.18.1.el6-master/include/linux/fs.h
+Index: linux-2.6.32-131.0.15.el6.x86_64/include/linux/blk_types.h
===================================================================
---- linux-2.6.32-71.18.1.el6-master.orig/include/linux/fs.h 2011-03-05 11:35:40.445043037 +0800
-+++ linux-2.6.32-71.18.1.el6-master/include/linux/fs.h 2011-03-05 11:37:35.726324137 +0800
-@@ -2204,6 +2204,10 @@
+--- linux-2.6.32-131.0.15.el6.x86_64.orig/include/linux/blk_types.h 2011-05-10 21:37:58.000000000 +0300
++++ linux-2.6.32-131.0.15.el6.x86_64/include/linux/blk_types.h 2011-05-19 21:03:42.000000000 +0300
+@@ -24,6 +24,7 @@
+ #define BIO_NULL_MAPPED 9 /* contains invalid user pages */
+ #define BIO_FS_INTEGRITY 10 /* fs owns integrity data, not block layer */
+ #define BIO_QUIET 11 /* Make BIO Quiet */
++#define BIO_RDONLY 31 /* device is readonly */
+ #define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag)))
+
+ /*
+Index: linux-2.6.32-131.0.15.el6.x86_64/include/linux/fs.h
+===================================================================
+--- linux-2.6.32-131.0.15.el6.x86_64.orig/include/linux/fs.h 2011-05-10 21:38:29.000000000 +0300
++++ linux-2.6.32-131.0.15.el6.x86_64/include/linux/fs.h 2011-05-19 21:01:04.000000000 +0300
+@@ -2244,6 +2244,10 @@ struct bio;
extern void submit_bio(int, struct bio *);
extern int bdev_read_only(struct block_device *);
#endif
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);
-Index: linux+rh+chaos/include/linux/bio.h
-===================================================================
---- linux+rh+chaos.orig/include/linux/bio.h
-+++ linux+rh+chaos/include/linux/bio.h
-@@ -126,6 +126,7 @@ struct bio {
- #define BIO_NULL_MAPPED 9 /* contains invalid user pages */
- #define BIO_FS_INTEGRITY 10 /* fs owns integrity data, not block layer */
- #define BIO_QUIET 11 /* Make BIO Quiet */
-+#define BIO_RDONLY 31 /* device is readonly */
- #define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag)))
-
- /*