Whamcloud - gitweb
LU-506 kernel: FC15 - small changes
[fs/lustre-release.git] / lustre / kernel_patches / patches / quota-large-limits-rhel5.patch
index 4f3a3bc..e53d871 100644 (file)
@@ -1,7 +1,8 @@
-diff -rNpu linux-2.6.16.54-0.2.5/fs/dquot.c linux-2.6.16.54-0.2.5-quota/fs/dquot.c
---- linux-2.6.16.54-0.2.5/fs/dquot.c   2008-03-18 15:48:26.000000000 +0300
-+++ linux-2.6.16.54-0.2.5-quota/fs/dquot.c     2008-03-17 22:43:11.000000000 +0300
-@@ -1588,10 +1588,19 @@ int vfs_get_dqblk(struct super_block *sb
+Index: linux-2.6.18-128.1.6/fs/dquot.c
+===================================================================
+--- linux-2.6.18-128.1.6.orig/fs/dquot.c       2009-04-14 21:04:50.000000000 -0600
++++ linux-2.6.18-128.1.6/fs/dquot.c    2009-06-02 23:26:36.000000000 -0600
+@@ -1592,10 +1592,19 @@
  }
  
  /* Generic routine for setting common part of quota structure */
@@ -22,7 +23,7 @@ diff -rNpu linux-2.6.16.54-0.2.5/fs/dquot.c linux-2.6.16.54-0.2.5-quota/fs/dquot
  
        spin_lock(&dq_data_lock);
        if (di->dqb_valid & QIF_SPACE) {
-@@ -1623,7 +1632,7 @@ static void do_set_dqblk(struct dquot *d
+@@ -1627,7 +1636,7 @@
                        clear_bit(DQ_BLKS_B, &dquot->dq_flags);
                }
                else if (!(di->dqb_valid & QIF_BTIME))  /* Set grace only if user hasn't provided his own... */
@@ -31,7 +32,7 @@ diff -rNpu linux-2.6.16.54-0.2.5/fs/dquot.c linux-2.6.16.54-0.2.5-quota/fs/dquot
        }
        if (check_ilim) {
                if (!dm->dqb_isoftlimit || dm->dqb_curinodes < dm->dqb_isoftlimit) {
-@@ -1631,7 +1640,7 @@ static void do_set_dqblk(struct dquot *d
+@@ -1635,7 +1644,7 @@
                        clear_bit(DQ_INODES_B, &dquot->dq_flags);
                }
                else if (!(di->dqb_valid & QIF_ITIME))  /* Set grace only if user hasn't provided his own... */
@@ -40,7 +41,7 @@ diff -rNpu linux-2.6.16.54-0.2.5/fs/dquot.c linux-2.6.16.54-0.2.5-quota/fs/dquot
        }
        if (dm->dqb_bhardlimit || dm->dqb_bsoftlimit || dm->dqb_ihardlimit || dm->dqb_isoftlimit)
                clear_bit(DQ_FAKE_B, &dquot->dq_flags);
-@@ -1639,21 +1648,24 @@ static void do_set_dqblk(struct dquot *d
+@@ -1643,21 +1652,24 @@
                set_bit(DQ_FAKE_B, &dquot->dq_flags);
        spin_unlock(&dq_data_lock);
        mark_dquot_dirty(dquot);
@@ -67,10 +68,11 @@ diff -rNpu linux-2.6.16.54-0.2.5/fs/dquot.c linux-2.6.16.54-0.2.5-quota/fs/dquot
  }
  
  /* Generic routine for getting common part of quota file information */
-diff -rNpu linux-2.6.16.54-0.2.5/fs/quota_v1.c linux-2.6.16.54-0.2.5-quota/fs/quota_v1.c
---- linux-2.6.16.54-0.2.5/fs/quota_v1.c        2006-03-20 08:53:29.000000000 +0300
-+++ linux-2.6.16.54-0.2.5-quota/fs/quota_v1.c  2008-03-17 22:42:47.000000000 +0300
-@@ -139,6 +139,9 @@ static int v1_read_file_info(struct supe
+Index: linux-2.6.18-128.1.6/fs/quota_v1.c
+===================================================================
+--- linux-2.6.18-128.1.6.orig/fs/quota_v1.c    2006-09-19 21:42:06.000000000 -0600
++++ linux-2.6.18-128.1.6/fs/quota_v1.c 2009-06-02 23:26:36.000000000 -0600
+@@ -139,6 +139,9 @@
                goto out;
        }
        ret = 0;
@@ -80,10 +82,11 @@ diff -rNpu linux-2.6.16.54-0.2.5/fs/quota_v1.c linux-2.6.16.54-0.2.5-quota/fs/qu
        dqopt->info[type].dqi_igrace = dqblk.dqb_itime ? dqblk.dqb_itime : MAX_IQ_TIME;
        dqopt->info[type].dqi_bgrace = dqblk.dqb_btime ? dqblk.dqb_btime : MAX_DQ_TIME;
  out:
-diff -rNpu linux-2.6.16.54-0.2.5/fs/quota_v2.c linux-2.6.16.54-0.2.5-quota/fs/quota_v2.c
---- linux-2.6.16.54-0.2.5/fs/quota_v2.c        2006-03-20 08:53:29.000000000 +0300
-+++ linux-2.6.16.54-0.2.5-quota/fs/quota_v2.c  2008-03-18 11:58:02.000000000 +0300
-@@ -23,26 +23,64 @@ MODULE_LICENSE("GPL");
+Index: linux-2.6.18-128.1.6/fs/quota_v2.c
+===================================================================
+--- linux-2.6.18-128.1.6.orig/fs/quota_v2.c    2006-09-19 21:42:06.000000000 -0600
++++ linux-2.6.18-128.1.6/fs/quota_v2.c 2009-06-02 23:26:36.000000000 -0600
+@@ -23,26 +23,64 @@
  typedef char *dqbuf_t;
  
  #define GETIDINDEX(id, depth) (((id) >> ((V2_DQTREEDEPTH-(depth)-1)*8)) & 0xff)
@@ -157,7 +160,7 @@ diff -rNpu linux-2.6.16.54-0.2.5/fs/quota_v2.c linux-2.6.16.54-0.2.5-quota/fs/qu
  }
  
  /* Read information header from quota file */
-@@ -51,6 +89,13 @@ static int v2_read_file_info(struct supe
+@@ -51,6 +89,13 @@
        struct v2_disk_dqinfo dinfo;
        struct mem_dqinfo *info = sb_dqopt(sb)->info+type;
        ssize_t size;
@@ -171,7 +174,7 @@ diff -rNpu linux-2.6.16.54-0.2.5/fs/quota_v2.c linux-2.6.16.54-0.2.5-quota/fs/qu
  
        size = sb->s_op->quota_read(sb, type, (char *)&dinfo,
               sizeof(struct v2_disk_dqinfo), V2_DQINFOOFF);
-@@ -65,6 +110,16 @@ static int v2_read_file_info(struct supe
+@@ -65,6 +110,16 @@
        info->u.v2_i.dqi_blocks = le32_to_cpu(dinfo.dqi_blocks);
        info->u.v2_i.dqi_free_blk = le32_to_cpu(dinfo.dqi_free_blk);
        info->u.v2_i.dqi_free_entry = le32_to_cpu(dinfo.dqi_free_entry);
@@ -188,7 +191,7 @@ diff -rNpu linux-2.6.16.54-0.2.5/fs/quota_v2.c linux-2.6.16.54-0.2.5-quota/fs/qu
        return 0;
  }
  
-@@ -94,29 +149,61 @@ static int v2_write_file_info(struct sup
+@@ -94,29 +149,61 @@
        return 0;
  }
  
@@ -272,7 +275,7 @@ diff -rNpu linux-2.6.16.54-0.2.5/fs/quota_v2.c linux-2.6.16.54-0.2.5-quota/fs/qu
  }
  
  static dqbuf_t getdqbuf(void)
-@@ -268,10 +355,10 @@ static uint find_free_dqentry(struct dqu
+@@ -268,10 +355,10 @@
  {
        struct super_block *sb = dquot->dq_sb;
        struct mem_dqinfo *info = sb_dqopt(sb)->info+dquot->dq_type;
@@ -286,7 +289,7 @@ diff -rNpu linux-2.6.16.54-0.2.5/fs/quota_v2.c linux-2.6.16.54-0.2.5-quota/fs/qu
        dqbuf_t buf;
  
        *err = 0;
-@@ -298,17 +385,18 @@ static uint find_free_dqentry(struct dqu
+@@ -298,17 +385,18 @@
                info->u.v2_i.dqi_free_entry = blk;
                mark_info_dirty(sb, dquot->dq_type);
        }
@@ -309,7 +312,7 @@ diff -rNpu linux-2.6.16.54-0.2.5/fs/quota_v2.c linux-2.6.16.54-0.2.5-quota/fs/qu
                printk(KERN_ERR "VFS: find_free_dqentry(): Data block full but it shouldn't.\n");
                *err = -EIO;
                goto out_buf;
-@@ -318,7 +406,8 @@ static uint find_free_dqentry(struct dqu
+@@ -318,7 +406,8 @@
                printk(KERN_ERR "VFS: find_free_dqentry(): Can't write quota data block %u.\n", blk);
                goto out_buf;
        }
@@ -319,7 +322,7 @@ diff -rNpu linux-2.6.16.54-0.2.5/fs/quota_v2.c linux-2.6.16.54-0.2.5-quota/fs/qu
        freedqbuf(buf);
        return blk;
  out_buf:
-@@ -392,7 +481,9 @@ static int v2_write_dquot(struct dquot *
+@@ -392,7 +481,9 @@
  {
        int type = dquot->dq_type;
        ssize_t ret;
@@ -328,9 +331,9 @@ diff -rNpu linux-2.6.16.54-0.2.5/fs/quota_v2.c linux-2.6.16.54-0.2.5-quota/fs/qu
 +      uint rev = sb_dqopt(dquot->dq_sb)->info[type].u.v2_i.dqi_revision;
 +      uint dqblksz = v2_dqblksz(rev);
  
-       /* dq_off is guarded by dqio_sem */
+       /* dq_off is guarded by dqio_mutex */
        if (!dquot->dq_off)
-@@ -401,18 +492,22 @@ static int v2_write_dquot(struct dquot *
+@@ -401,18 +492,22 @@
                        return ret;
                }
        spin_lock(&dq_data_lock);
@@ -360,7 +363,7 @@ diff -rNpu linux-2.6.16.54-0.2.5/fs/quota_v2.c linux-2.6.16.54-0.2.5-quota/fs/qu
                if (ret >= 0)
                        ret = -ENOSPC;
        }
-@@ -431,6 +526,7 @@ static int free_dqentry(struct dquot *dq
+@@ -431,6 +526,7 @@
        struct v2_disk_dqdbheader *dh;
        dqbuf_t buf = getdqbuf();
        int ret = 0;
@@ -368,7 +371,7 @@ diff -rNpu linux-2.6.16.54-0.2.5/fs/quota_v2.c linux-2.6.16.54-0.2.5-quota/fs/qu
  
        if (!buf)
                return -ENOMEM;
-@@ -456,8 +552,8 @@ static int free_dqentry(struct dquot *dq
+@@ -456,8 +552,8 @@
        }
        else {
                memset(buf+(dquot->dq_off & ((1 << V2_DQBLKSIZE_BITS)-1)), 0,
@@ -379,7 +382,7 @@ diff -rNpu linux-2.6.16.54-0.2.5/fs/quota_v2.c linux-2.6.16.54-0.2.5-quota/fs/qu
                        /* Insert will write block itself */
                        if ((ret = insert_free_dqentry(sb, type, buf, blk)) < 0) {
                                printk(KERN_ERR "VFS: Can't insert quota data block (%u) to free entry list.\n", blk);
-@@ -529,41 +625,56 @@ static int v2_delete_dquot(struct dquot 
+@@ -529,41 +625,56 @@
        return remove_tree(dquot, &tmp, 0);
  }
  
@@ -449,7 +452,7 @@ diff -rNpu linux-2.6.16.54-0.2.5/fs/quota_v2.c linux-2.6.16.54-0.2.5-quota/fs/qu
  out_buf:
        freedqbuf(buf);
        return ret;
-@@ -605,7 +716,7 @@ static int v2_read_dquot(struct dquot *d
+@@ -605,7 +716,7 @@
  {
        int type = dquot->dq_type;
        loff_t offset;
@@ -458,7 +461,7 @@ diff -rNpu linux-2.6.16.54-0.2.5/fs/quota_v2.c linux-2.6.16.54-0.2.5-quota/fs/qu
        int ret = 0;
  
  #ifdef __QUOTA_V2_PARANOIA
-@@ -626,25 +737,30 @@ static int v2_read_dquot(struct dquot *d
+@@ -626,25 +737,30 @@
                ret = offset;
        }
        else {
@@ -498,10 +501,11 @@ diff -rNpu linux-2.6.16.54-0.2.5/fs/quota_v2.c linux-2.6.16.54-0.2.5-quota/fs/qu
                if (!dquot->dq_dqb.dqb_bhardlimit &&
                        !dquot->dq_dqb.dqb_bsoftlimit &&
                        !dquot->dq_dqb.dqb_ihardlimit &&
-diff -rNpu linux-2.6.16.54-0.2.5/include/linux/dqblk_v2.h linux-2.6.16.54-0.2.5-quota/include/linux/dqblk_v2.h
---- linux-2.6.16.54-0.2.5/include/linux/dqblk_v2.h     2006-03-20 08:53:29.000000000 +0300
-+++ linux-2.6.16.54-0.2.5-quota/include/linux/dqblk_v2.h       2008-03-17 23:39:54.000000000 +0300
-@@ -21,6 +21,7 @@ struct v2_mem_dqinfo {
+Index: linux-2.6.18-128.1.6/include/linux/dqblk_v2.h
+===================================================================
+--- linux-2.6.18-128.1.6.orig/include/linux/dqblk_v2.h 2006-09-19 21:42:06.000000000 -0600
++++ linux-2.6.18-128.1.6/include/linux/dqblk_v2.h      2009-06-02 23:26:36.000000000 -0600
+@@ -21,6 +21,7 @@
        unsigned int dqi_blocks;
        unsigned int dqi_free_blk;
        unsigned int dqi_free_entry;
@@ -509,10 +513,11 @@ diff -rNpu linux-2.6.16.54-0.2.5/include/linux/dqblk_v2.h linux-2.6.16.54-0.2.5-
  };
  
  #endif /* _LINUX_DQBLK_V2_H */
-diff -rNpu linux-2.6.16.54-0.2.5/include/linux/quota.h linux-2.6.16.54-0.2.5-quota/include/linux/quota.h
---- linux-2.6.16.54-0.2.5/include/linux/quota.h        2006-03-20 08:53:29.000000000 +0300
-+++ linux-2.6.16.54-0.2.5-quota/include/linux/quota.h  2008-03-17 23:39:54.000000000 +0300
-@@ -148,12 +148,12 @@ struct if_dqinfo {
+Index: linux-2.6.18-128.1.6/include/linux/quota.h
+===================================================================
+--- linux-2.6.18-128.1.6.orig/include/linux/quota.h    2006-09-19 21:42:06.000000000 -0600
++++ linux-2.6.18-128.1.6/include/linux/quota.h 2009-06-02 23:26:36.000000000 -0600
+@@ -149,12 +149,12 @@
   * Data for one user/group kept in memory
   */
  struct mem_dqblk {
@@ -530,7 +535,7 @@ diff -rNpu linux-2.6.16.54-0.2.5/include/linux/quota.h linux-2.6.16.54-0.2.5-quo
        time_t dqb_btime;       /* time limit for excessive disk use */
        time_t dqb_itime;       /* time limit for excessive inode use */
  };
-@@ -169,6 +169,8 @@ struct mem_dqinfo {
+@@ -170,6 +170,8 @@
        unsigned long dqi_flags;
        unsigned int dqi_bgrace;
        unsigned int dqi_igrace;
@@ -539,9 +544,10 @@ diff -rNpu linux-2.6.16.54-0.2.5/include/linux/quota.h linux-2.6.16.54-0.2.5-quo
        union {
                struct v1_mem_dqinfo v1_i;
                struct v2_mem_dqinfo v2_i;
-diff -rNpu linux-2.6.16.54-0.2.5/include/linux/quotaio_v2.h linux-2.6.16.54-0.2.5-quota/include/linux/quotaio_v2.h
---- linux-2.6.16.54-0.2.5/include/linux/quotaio_v2.h   2006-03-20 08:53:29.000000000 +0300
-+++ linux-2.6.16.54-0.2.5-quota/include/linux/quotaio_v2.h     2008-03-17 23:39:54.000000000 +0300
+Index: linux-2.6.18-128.1.6/include/linux/quotaio_v2.h
+===================================================================
+--- linux-2.6.18-128.1.6.orig/include/linux/quotaio_v2.h       2006-09-19 21:42:06.000000000 -0600
++++ linux-2.6.18-128.1.6/include/linux/quotaio_v2.h    2009-06-02 23:26:36.000000000 -0600
 @@ -16,28 +16,51 @@
        0xd9c01927      /* GRPQUOTA */\
  }
@@ -598,7 +604,7 @@ diff -rNpu linux-2.6.16.54-0.2.5/include/linux/quotaio_v2.h linux-2.6.16.54-0.2.
  /*
   * Here are header structures as written on disk and their in-memory copies
   */
-@@ -59,7 +82,7 @@ struct v2_disk_dqinfo {
+@@ -59,7 +82,7 @@
  
  /*
   *  Structure of header of block with quota structures. It is padded to 16 bytes so
@@ -607,7 +613,7 @@ diff -rNpu linux-2.6.16.54-0.2.5/include/linux/quotaio_v2.h linux-2.6.16.54-0.2.
   */
  struct v2_disk_dqdbheader {
        __le32 dqdh_next_free;  /* Number of next block with free entry */
-@@ -74,6 +97,5 @@ struct v2_disk_dqdbheader {
+@@ -74,6 +97,5 @@
  #define V2_DQBLKSIZE  (1 << V2_DQBLKSIZE_BITS)        /* Size of block with quota structures */
  #define V2_DQTREEOFF  1               /* Offset of tree in file in blocks */
  #define V2_DQTREEDEPTH        4               /* Depth of quota tree */