Whamcloud - gitweb
LU-12477 ldiskfs: remove obsolete ext4 patches
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / rhel6.3 / ext4-max-dir-size.patch
diff --git a/ldiskfs/kernel_patches/patches/rhel6.3/ext4-max-dir-size.patch b/ldiskfs/kernel_patches/patches/rhel6.3/ext4-max-dir-size.patch
deleted file mode 100644 (file)
index 1820d69..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-Index: linux-stage/fs/ext4/namei.c
-===================================================================
---- linux-stage.orig/fs/ext4/namei.c
-+++ linux-stage/fs/ext4/namei.c
-@@ -60,6 +60,15 @@ struct buffer_head *ext4_append(handle_t
-       * have to be serialized -bzzz */
-       down(&ei->i_append_sem);
-+      if (unlikely(S_ISDIR(inode->i_mode) &&
-+                   EXT4_SB(inode->i_sb)->s_max_dir_size &&
-+                   (inode->i_size >=
-+                   EXT4_SB(inode->i_sb)->s_max_dir_size))) {
-+              *err = -ENOSPC;
-+              up(&ei->i_append_sem);
-+              return NULL;
-+      }
-+
-       *block = inode->i_size >> inode->i_sb->s_blocksize_bits;
-       bh = ext4_bread(handle, inode, *block, 1, err);
-Index: linux-2.6.32-el6-beta/fs/ext4/super.c
-===================================================================
---- linux-2.6.32-el6-beta.orig/fs/ext4/super.c
-+++ linux-2.6.32-el6-beta/fs/ext4/super.c
-@@ -999,6 +999,9 @@ static int ext4_show_options(struct seq_
-               seq_printf(seq, ",init_itable=%u",
-                          (unsigned) sbi->s_li_wait_mult);
-+      if (sbi->s_max_dir_size)
-+              seq_printf(seq, "max_dir_size=%lu", sbi->s_max_dir_size);
-+
-       ext4_show_quota_options(seq, sb);
-       return 0;
-@@ -2373,6 +2384,7 @@ EXT4_RO_ATTR(lifetime_write_kbytes);
- EXT4_ATTR_OFFSET(inode_readahead_blks, 0644, sbi_ui_show,
-                inode_readahead_blks_store, s_inode_readahead_blks);
- EXT4_RW_ATTR_SBI_UI(inode_goal, s_inode_goal);
-+EXT4_RW_ATTR_SBI_UI(max_dir_size, s_max_dir_size);
- EXT4_RW_ATTR_SBI_UI(mb_stats, s_mb_stats);
- EXT4_RW_ATTR_SBI_UI(mb_max_to_scan, s_mb_max_to_scan);
- EXT4_RW_ATTR_SBI_UI(mb_min_to_scan, s_mb_min_to_scan);
-@@ -2388,6 +2400,7 @@ static struct attribute *ext4_attrs[] = 
-       ATTR_LIST(lifetime_write_kbytes),
-       ATTR_LIST(inode_readahead_blks),
-       ATTR_LIST(inode_goal),
-+      ATTR_LIST(max_dir_size),
-       ATTR_LIST(mb_stats),
-       ATTR_LIST(mb_max_to_scan),
-       ATTR_LIST(mb_min_to_scan),
-@@ -2877,6 +2890,7 @@ static int ext4_fill_super(struct super_
-       }
-       sb->s_fs_info = sbi;
-       sbi->s_mount_opt = 0;
-+      sbi->s_max_dir_size = 0;
-       sbi->s_resuid = EXT4_DEF_RESUID;
-       sbi->s_resgid = EXT4_DEF_RESGID;
-       sbi->s_inode_readahead_blks = EXT4_DEF_INODE_READAHEAD_BLKS;
-Index: linux-2.6.32-el6-beta/fs/ext4/ext4.h
-===================================================================
---- linux-2.6.32-el6-beta.orig/fs/ext4/ext4.h
-+++ linux-2.6.32-el6-beta/fs/ext4/ext4.h
-@@ -1113,6 +1113,7 @@ struct ext4_sb_info {
-       unsigned long s_mb_prealloc_table_size;
-       unsigned int s_mb_group_prealloc;
-       unsigned int s_max_writeback_mb_bump;
-+      unsigned long s_max_dir_size;
-       /* where last allocation was done - for stream allocation */
-       unsigned long s_mb_last_group;
-       unsigned long s_mb_last_start;