Jan Kara
2008-Oct-24 22:05 UTC
[Ocfs2-devel] [PATCH 00/00] Implement quotas for OCFS2 (version 2)
Hello, the following patch series implements quotas for OCFS2. The patch series is based on: git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2.git linux-next I've adressed Joel's comments, also node recovery is now fully working and I've fixed a few issues I found during my testing. So I'm currently not aware of any bugs. Please review, test, comment. Thanks. Honza
Jan Kara
2008-Oct-24 22:07 UTC
[Ocfs2-devel] [PATCH 00/00] Implement quotas for OCFS2 (version 2)
Oops, and now really the patch series... Sorry for the bad post. Honza
Jan Kara
2008-Oct-24 22:07 UTC
[Ocfs2-devel] [PATCH 01/29] quota: Add callbacks for allocating and destroying dquot structures
Some filesystems would like to keep private information together with each dquot. Add callbacks alloc_dquot and destroy_dquot allowing filesystem to allocate larger dquots from their private slab in a similar fashion we currently allocate inodes. Signed-off-by: Jan Kara <jack at suse.cz> --- fs/dquot.c | 19 +++++++++++++++---- include/linux/quota.h | 2 ++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/fs/dquot.c b/fs/dquot.c index ad7e590..c228b31 100644 --- a/fs/dquot.c +++ b/fs/dquot.c @@ -417,6 +417,14 @@ out_dqlock: return ret; } +static void destroy_dquot(struct dquot *dquot) +{ + if (dquot->dq_sb->dq_op->destroy_dquot) + dquot->dq_sb->dq_op->destroy_dquot(dquot); + else + kmem_cache_free(dquot_cachep, dquot); +} + /* Invalidate all dquots on the list. Note that this function is called after * quota is disabled and pointers from inodes removed so there cannot be new * quota users. There can still be some users of quotas due to inodes being @@ -465,7 +473,7 @@ restart: remove_dquot_hash(dquot); remove_free_dquot(dquot); remove_inuse(dquot); - kmem_cache_free(dquot_cachep, dquot); + destroy_dquot(dquot); } spin_unlock(&dq_list_lock); } @@ -529,7 +537,7 @@ static void prune_dqcache(int count) remove_dquot_hash(dquot); remove_free_dquot(dquot); remove_inuse(dquot); - kmem_cache_free(dquot_cachep, dquot); + destroy_dquot(dquot); count--; head = free_dquots.prev; } @@ -631,7 +639,10 @@ static struct dquot *get_empty_dquot(struct super_block *sb, int type) { struct dquot *dquot; - dquot = kmem_cache_zalloc(dquot_cachep, GFP_NOFS); + if (sb->dq_op->alloc_dquot) + dquot = sb->dq_op->alloc_dquot(sb, type); + else + dquot = kmem_cache_zalloc(dquot_cachep, GFP_NOFS); if(!dquot) return NODQUOT; @@ -684,7 +695,7 @@ we_slept: dqstats.lookups++; spin_unlock(&dq_list_lock); if (empty) - kmem_cache_free(dquot_cachep, empty); + destroy_dquot(empty); } /* Wait for dq_lock - after this we know that either dquot_release() is already * finished or it will be canceled due to dq_count > 1 test */ diff --git a/include/linux/quota.h b/include/linux/quota.h index 376a050..eeae7a9 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h @@ -294,6 +294,8 @@ struct dquot_operations { int (*free_inode) (const struct inode *, unsigned long); int (*transfer) (struct inode *, struct iattr *); int (*write_dquot) (struct dquot *); /* Ordinary dquot write */ + struct dquot *(*alloc_dquot)(struct super_block *, int); /* Allocate memory for new dquot (can be NULL if no special entries dquot are needed) */ + void (*destroy_dquot)(struct dquot *); /* Free memory for dquot (can be NULL if alloc_dquot is NULL) */ int (*acquire_dquot) (struct dquot *); /* Quota is going to be created on disk */ int (*release_dquot) (struct dquot *); /* Quota is going to be deleted from disk */ int (*mark_dirty) (struct dquot *); /* Dquot is marked dirty */ -- 1.5.2.4
Jan Kara
2008-Oct-24 22:07 UTC
[Ocfs2-devel] [PATCH 02/29] quota: Increase size of variables for limits and inode usage
So far quota was fine with quota block limits and inode limits/numbers in a 32-bit type. Now with rapid increase in storage sizes there are coming requests to be able to handle quota limits above 4TB / more that 2^32 inodes. So bump up sizes of types in mem_dqblk structure to 64-bits to be able to handle this. Also update inode allocation / checking functions to use qsize_t and make global structure keep quota limits in bytes so that things are consistent. Signed-off-by: Jan Kara <jack at suse.cz> --- fs/dquot.c | 50 ++++++++++++++++++++++++++------------------- fs/quota_v1.c | 25 +++++++++++++++++----- fs/quota_v2.c | 21 +++++++++++++++--- include/linux/quota.h | 28 +++++++++++-------------- include/linux/quotaops.h | 4 +- 5 files changed, 79 insertions(+), 49 deletions(-) diff --git a/fs/dquot.c b/fs/dquot.c index c228b31..413e71d 100644 --- a/fs/dquot.c +++ b/fs/dquot.c @@ -833,7 +833,7 @@ static void drop_dquot_ref(struct super_block *sb, int type) } } -static inline void dquot_incr_inodes(struct dquot *dquot, unsigned long number) +static inline void dquot_incr_inodes(struct dquot *dquot, qsize_t number) { dquot->dq_dqb.dqb_curinodes += number; } @@ -843,7 +843,7 @@ static inline void dquot_incr_space(struct dquot *dquot, qsize_t number) dquot->dq_dqb.dqb_curspace += number; } -static inline void dquot_decr_inodes(struct dquot *dquot, unsigned long number) +static inline void dquot_decr_inodes(struct dquot *dquot, qsize_t number) { if (dquot->dq_dqb.dqb_curinodes > number) dquot->dq_dqb.dqb_curinodes -= number; @@ -860,7 +860,7 @@ static inline void dquot_decr_space(struct dquot *dquot, qsize_t number) dquot->dq_dqb.dqb_curspace -= number; else dquot->dq_dqb.dqb_curspace = 0; - if (toqb(dquot->dq_dqb.dqb_curspace) <= dquot->dq_dqb.dqb_bsoftlimit) + if (dquot->dq_dqb.dqb_curspace <= dquot->dq_dqb.dqb_bsoftlimit) dquot->dq_dqb.dqb_btime = (time_t) 0; clear_bit(DQ_BLKS_B, &dquot->dq_flags); } @@ -1036,7 +1036,7 @@ static inline char ignore_hardlimit(struct dquot *dquot) } /* needs dq_data_lock */ -static int check_idq(struct dquot *dquot, ulong inodes, char *warntype) +static int check_idq(struct dquot *dquot, qsize_t inodes, char *warntype) { *warntype = QUOTA_NL_NOWARN; if (inodes <= 0 || test_bit(DQ_FAKE_B, &dquot->dq_flags)) @@ -1075,7 +1075,7 @@ static int check_bdq(struct dquot *dquot, qsize_t space, int prealloc, char *war return QUOTA_OK; if (dquot->dq_dqb.dqb_bhardlimit && - toqb(dquot->dq_dqb.dqb_curspace + space) > dquot->dq_dqb.dqb_bhardlimit && + dquot->dq_dqb.dqb_curspace + space > dquot->dq_dqb.dqb_bhardlimit && !ignore_hardlimit(dquot)) { if (!prealloc) *warntype = QUOTA_NL_BHARDWARN; @@ -1083,7 +1083,7 @@ static int check_bdq(struct dquot *dquot, qsize_t space, int prealloc, char *war } if (dquot->dq_dqb.dqb_bsoftlimit && - toqb(dquot->dq_dqb.dqb_curspace + space) > dquot->dq_dqb.dqb_bsoftlimit && + dquot->dq_dqb.dqb_curspace + space > dquot->dq_dqb.dqb_bsoftlimit && dquot->dq_dqb.dqb_btime && get_seconds() >= dquot->dq_dqb.dqb_btime && !ignore_hardlimit(dquot)) { if (!prealloc) @@ -1092,7 +1092,7 @@ static int check_bdq(struct dquot *dquot, qsize_t space, int prealloc, char *war } if (dquot->dq_dqb.dqb_bsoftlimit && - toqb(dquot->dq_dqb.dqb_curspace + space) > dquot->dq_dqb.dqb_bsoftlimit && + dquot->dq_dqb.dqb_curspace + space > dquot->dq_dqb.dqb_bsoftlimit && dquot->dq_dqb.dqb_btime == 0) { if (!prealloc) { *warntype = QUOTA_NL_BSOFTWARN; @@ -1109,7 +1109,7 @@ static int check_bdq(struct dquot *dquot, qsize_t space, int prealloc, char *war return QUOTA_OK; } -static int info_idq_free(struct dquot *dquot, ulong inodes) +static int info_idq_free(struct dquot *dquot, qsize_t inodes) { if (test_bit(DQ_FAKE_B, &dquot->dq_flags) || dquot->dq_dqb.dqb_curinodes <= dquot->dq_dqb.dqb_isoftlimit) @@ -1126,15 +1126,13 @@ static int info_idq_free(struct dquot *dquot, ulong inodes) static int info_bdq_free(struct dquot *dquot, qsize_t space) { if (test_bit(DQ_FAKE_B, &dquot->dq_flags) || - toqb(dquot->dq_dqb.dqb_curspace) <= dquot->dq_dqb.dqb_bsoftlimit) + dquot->dq_dqb.dqb_curspace <= dquot->dq_dqb.dqb_bsoftlimit) return QUOTA_NL_NOWARN; - if (toqb(dquot->dq_dqb.dqb_curspace - space) <- dquot->dq_dqb.dqb_bsoftlimit) + if (dquot->dq_dqb.dqb_curspace - space <= dquot->dq_dqb.dqb_bsoftlimit) return QUOTA_NL_BSOFTBELOW; - if (toqb(dquot->dq_dqb.dqb_curspace) >= dquot->dq_dqb.dqb_bhardlimit && - toqb(dquot->dq_dqb.dqb_curspace - space) < - dquot->dq_dqb.dqb_bhardlimit) + if (dquot->dq_dqb.dqb_curspace >= dquot->dq_dqb.dqb_bhardlimit && + dquot->dq_dqb.dqb_curspace - space < dquot->dq_dqb.dqb_bhardlimit) return QUOTA_NL_BHARDBELOW; return QUOTA_NL_NOWARN; } @@ -1277,7 +1275,7 @@ warn_put_all: /* * This operation can block, but only after everything is updated */ -int dquot_alloc_inode(const struct inode *inode, unsigned long number) +int dquot_alloc_inode(const struct inode *inode, qsize_t number) { int cnt, ret = NO_QUOTA; char warntype[MAXQUOTAS]; @@ -1362,7 +1360,7 @@ out_sub: /* * This operation can block, but only after everything is updated */ -int dquot_free_inode(const struct inode *inode, unsigned long number) +int dquot_free_inode(const struct inode *inode, qsize_t number) { unsigned int cnt; char warntype[MAXQUOTAS]; @@ -1879,14 +1877,24 @@ int vfs_dq_quota_on_remount(struct super_block *sb) return ret; } +static inline qsize_t qbtos(qsize_t blocks) +{ + return blocks << QIF_DQBLKSIZE_BITS; +} + +static inline qsize_t stoqb(qsize_t space) +{ + return (space + QIF_DQBLKSIZE - 1) >> QIF_DQBLKSIZE_BITS; +} + /* Generic routine for getting common part of quota structure */ static void do_get_dqblk(struct dquot *dquot, struct if_dqblk *di) { struct mem_dqblk *dm = &dquot->dq_dqb; spin_lock(&dq_data_lock); - di->dqb_bhardlimit = dm->dqb_bhardlimit; - di->dqb_bsoftlimit = dm->dqb_bsoftlimit; + di->dqb_bhardlimit = stoqb(dm->dqb_bhardlimit); + di->dqb_bsoftlimit = stoqb(dm->dqb_bsoftlimit); di->dqb_curspace = dm->dqb_curspace; di->dqb_ihardlimit = dm->dqb_ihardlimit; di->dqb_isoftlimit = dm->dqb_isoftlimit; @@ -1933,8 +1941,8 @@ static int do_set_dqblk(struct dquot *dquot, struct if_dqblk *di) check_blim = 1; } if (di->dqb_valid & QIF_BLIMITS) { - dm->dqb_bsoftlimit = di->dqb_bsoftlimit; - dm->dqb_bhardlimit = di->dqb_bhardlimit; + dm->dqb_bsoftlimit = qbtos(di->dqb_bsoftlimit); + dm->dqb_bhardlimit = qbtos(di->dqb_bhardlimit); check_blim = 1; } if (di->dqb_valid & QIF_INODES) { @@ -1952,7 +1960,7 @@ static int do_set_dqblk(struct dquot *dquot, struct if_dqblk *di) dm->dqb_itime = di->dqb_itime; if (check_blim) { - if (!dm->dqb_bsoftlimit || toqb(dm->dqb_curspace) < dm->dqb_bsoftlimit) { + if (!dm->dqb_bsoftlimit || dm->dqb_curspace < dm->dqb_bsoftlimit) { dm->dqb_btime = 0; clear_bit(DQ_BLKS_B, &dquot->dq_flags); } diff --git a/fs/quota_v1.c b/fs/quota_v1.c index 5ae15b1..3e078ee 100644 --- a/fs/quota_v1.c +++ b/fs/quota_v1.c @@ -14,14 +14,27 @@ MODULE_AUTHOR("Jan Kara"); MODULE_DESCRIPTION("Old quota format support"); MODULE_LICENSE("GPL"); +#define QUOTABLOCK_BITS 10 +#define QUOTABLOCK_SIZE (1 << QUOTABLOCK_BITS) + +static inline qsize_t v1_stoqb(qsize_t space) +{ + return (space + QUOTABLOCK_SIZE - 1) >> QUOTABLOCK_BITS; +} + +static inline qsize_t v1_qbtos(qsize_t blocks) +{ + return blocks << QUOTABLOCK_BITS; +} + static void v1_disk2mem_dqblk(struct mem_dqblk *m, struct v1_disk_dqblk *d) { m->dqb_ihardlimit = d->dqb_ihardlimit; m->dqb_isoftlimit = d->dqb_isoftlimit; m->dqb_curinodes = d->dqb_curinodes; - m->dqb_bhardlimit = d->dqb_bhardlimit; - m->dqb_bsoftlimit = d->dqb_bsoftlimit; - m->dqb_curspace = ((qsize_t)d->dqb_curblocks) << QUOTABLOCK_BITS; + m->dqb_bhardlimit = v1_qbtos(d->dqb_bhardlimit); + m->dqb_bsoftlimit = v1_qbtos(d->dqb_bsoftlimit); + m->dqb_curspace = v1_qbtos(d->dqb_curblocks); m->dqb_itime = d->dqb_itime; m->dqb_btime = d->dqb_btime; } @@ -31,9 +44,9 @@ static void v1_mem2disk_dqblk(struct v1_disk_dqblk *d, struct mem_dqblk *m) d->dqb_ihardlimit = m->dqb_ihardlimit; d->dqb_isoftlimit = m->dqb_isoftlimit; d->dqb_curinodes = m->dqb_curinodes; - d->dqb_bhardlimit = m->dqb_bhardlimit; - d->dqb_bsoftlimit = m->dqb_bsoftlimit; - d->dqb_curblocks = toqb(m->dqb_curspace); + d->dqb_bhardlimit = v1_stoqb(m->dqb_bhardlimit); + d->dqb_bsoftlimit = v1_stoqb(m->dqb_bsoftlimit); + d->dqb_curblocks = v1_stoqb(m->dqb_curspace); d->dqb_itime = m->dqb_itime; d->dqb_btime = m->dqb_btime; } diff --git a/fs/quota_v2.c b/fs/quota_v2.c index b53827d..51c4717 100644 --- a/fs/quota_v2.c +++ b/fs/quota_v2.c @@ -26,6 +26,19 @@ typedef char *dqbuf_t; #define GETIDINDEX(id, depth) (((id) >> ((V2_DQTREEDEPTH-(depth)-1)*8)) & 0xff) #define GETENTRIES(buf) ((struct v2_disk_dqblk *)(((char *)buf)+sizeof(struct v2_disk_dqdbheader))) +#define QUOTABLOCK_BITS 10 +#define QUOTABLOCK_SIZE (1 << QUOTABLOCK_BITS) + +static inline qsize_t v2_stoqb(qsize_t space) +{ + return (space + QUOTABLOCK_SIZE - 1) >> QUOTABLOCK_BITS; +} + +static inline qsize_t v2_qbtos(qsize_t blocks) +{ + return blocks << QUOTABLOCK_BITS; +} + /* Check whether given file is really vfsv0 quotafile */ static int v2_check_quota_file(struct super_block *sb, int type) { @@ -104,8 +117,8 @@ static void disk2memdqb(struct mem_dqblk *m, struct v2_disk_dqblk *d) m->dqb_isoftlimit = le32_to_cpu(d->dqb_isoftlimit); m->dqb_curinodes = le32_to_cpu(d->dqb_curinodes); m->dqb_itime = le64_to_cpu(d->dqb_itime); - m->dqb_bhardlimit = le32_to_cpu(d->dqb_bhardlimit); - m->dqb_bsoftlimit = le32_to_cpu(d->dqb_bsoftlimit); + m->dqb_bhardlimit = v2_qbtos(le32_to_cpu(d->dqb_bhardlimit)); + m->dqb_bsoftlimit = v2_qbtos(le32_to_cpu(d->dqb_bsoftlimit)); m->dqb_curspace = le64_to_cpu(d->dqb_curspace); m->dqb_btime = le64_to_cpu(d->dqb_btime); } @@ -116,8 +129,8 @@ static void mem2diskdqb(struct v2_disk_dqblk *d, struct mem_dqblk *m, qid_t id) d->dqb_isoftlimit = cpu_to_le32(m->dqb_isoftlimit); d->dqb_curinodes = cpu_to_le32(m->dqb_curinodes); d->dqb_itime = cpu_to_le64(m->dqb_itime); - d->dqb_bhardlimit = cpu_to_le32(m->dqb_bhardlimit); - d->dqb_bsoftlimit = cpu_to_le32(m->dqb_bsoftlimit); + d->dqb_bhardlimit = cpu_to_le32(v2_qbtos(m->dqb_bhardlimit)); + d->dqb_bsoftlimit = cpu_to_le32(v2_qbtos(m->dqb_bsoftlimit)); d->dqb_curspace = cpu_to_le64(m->dqb_curspace); d->dqb_btime = cpu_to_le64(m->dqb_btime); d->dqb_id = cpu_to_le32(id); diff --git a/include/linux/quota.h b/include/linux/quota.h index eeae7a9..5167786 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h @@ -41,15 +41,6 @@ #define __DQUOT_VERSION__ "dquot_6.5.1" #define __DQUOT_NUM_VERSION__ 6*10000+5*100+1 -/* Size of blocks in which are counted size limits */ -#define QUOTABLOCK_BITS 10 -#define QUOTABLOCK_SIZE (1 << QUOTABLOCK_BITS) - -/* Conversion routines from and to quota blocks */ -#define qb2kb(x) ((x) << (QUOTABLOCK_BITS-10)) -#define kb2qb(x) ((x) >> (QUOTABLOCK_BITS-10)) -#define toqb(x) (((x) + QUOTABLOCK_SIZE - 1) >> QUOTABLOCK_BITS) - #define MAXQUOTAS 2 #define USRQUOTA 0 /* element used for user quotas */ #define GRPQUOTA 1 /* element used for group quotas */ @@ -82,6 +73,11 @@ #define Q_GETQUOTA 0x800007 /* get user quota structure */ #define Q_SETQUOTA 0x800008 /* set user quota structure */ +/* Size of block in which space limits are passed through the quota + * interface */ +#define QIF_DQBLKSIZE_BITS 10 +#define QIF_DQBLKSIZE (1 << QIF_DQBLKSIZE_BITS) + /* * Quota structure used for communication with userspace via quotactl * Following flags are used to specify which fields are valid @@ -189,12 +185,12 @@ extern spinlock_t dq_data_lock; * Data for one user/group kept in memory */ struct mem_dqblk { - __u32 dqb_bhardlimit; /* absolute limit on disk blks alloc */ - __u32 dqb_bsoftlimit; /* preferred limit on disk blks */ + qsize_t dqb_bhardlimit; /* absolute limit on disk blks alloc */ + qsize_t dqb_bsoftlimit; /* preferred limit on disk blks */ qsize_t dqb_curspace; /* current used space */ - __u32 dqb_ihardlimit; /* absolute limit on allocated inodes */ - __u32 dqb_isoftlimit; /* preferred inode limit */ - __u32 dqb_curinodes; /* current # allocated inodes */ + qsize_t dqb_ihardlimit; /* absolute limit on allocated inodes */ + qsize_t dqb_isoftlimit; /* preferred inode limit */ + qsize_t dqb_curinodes; /* current # allocated inodes */ time_t dqb_btime; /* time limit for excessive disk use */ time_t dqb_itime; /* time limit for excessive inode use */ }; @@ -289,9 +285,9 @@ struct dquot_operations { int (*initialize) (struct inode *, int); int (*drop) (struct inode *); int (*alloc_space) (struct inode *, qsize_t, int); - int (*alloc_inode) (const struct inode *, unsigned long); + int (*alloc_inode) (const struct inode *, qsize_t); int (*free_space) (struct inode *, qsize_t); - int (*free_inode) (const struct inode *, unsigned long); + int (*free_inode) (const struct inode *, qsize_t); int (*transfer) (struct inode *, struct iattr *); int (*write_dquot) (struct dquot *); /* Ordinary dquot write */ struct dquot *(*alloc_dquot)(struct super_block *, int); /* Allocate memory for new dquot (can be NULL if no special entries dquot are needed) */ diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index ca6b9b5..9e7bc4b 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h @@ -29,10 +29,10 @@ int dquot_initialize(struct inode *inode, int type); int dquot_drop(struct inode *inode); int dquot_alloc_space(struct inode *inode, qsize_t number, int prealloc); -int dquot_alloc_inode(const struct inode *inode, unsigned long number); +int dquot_alloc_inode(const struct inode *inode, qsize_t number); int dquot_free_space(struct inode *inode, qsize_t number); -int dquot_free_inode(const struct inode *inode, unsigned long number); +int dquot_free_inode(const struct inode *inode, qsize_t number); int dquot_transfer(struct inode *inode, struct iattr *iattr); int dquot_commit(struct dquot *dquot); -- 1.5.2.4
Jan Kara
2008-Oct-24 22:07 UTC
[Ocfs2-devel] [PATCH 04/29] quota: Make _SUSPENDED just a flag
Upto now, DQUOT_USR_SUSPENDED behaved like a state - i.e., either quota was enabled or suspended or none. Now allowed states are 0, ENABLED, ENABLED | SUSPENDED. This will be useful later when we implement separate enabling of quota usage tracking and limits enforcement because we need to keep track of a state which has been suspended. Signed-off-by: Jan Kara <jack at suse.cz> --- fs/dquot.c | 10 ++++++---- include/linux/quotaops.h | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/fs/dquot.c b/fs/dquot.c index 9eda830..46d46df 100644 --- a/fs/dquot.c +++ b/fs/dquot.c @@ -1566,18 +1566,20 @@ static inline void reset_enable_flags(struct quota_info *dqopt, int type, { switch (type) { case USRQUOTA: - dqopt->flags &= ~DQUOT_USR_ENABLED; if (remount) dqopt->flags |= DQUOT_USR_SUSPENDED; - else + else { + dqopt->flags &= ~DQUOT_USR_ENABLED; dqopt->flags &= ~DQUOT_USR_SUSPENDED; + } break; case GRPQUOTA: - dqopt->flags &= ~DQUOT_GRP_ENABLED; if (remount) dqopt->flags |= DQUOT_GRP_SUSPENDED; - else + else { + dqopt->flags &= ~DQUOT_GRP_ENABLED; dqopt->flags &= ~DQUOT_GRP_SUSPENDED; + } break; } } diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index 9e7bc4b..12363cc 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h @@ -70,8 +70,10 @@ static inline struct mem_dqinfo *sb_dqinfo(struct super_block *sb, int type) static inline int sb_has_quota_enabled(struct super_block *sb, int type) { if (type == USRQUOTA) - return sb_dqopt(sb)->flags & DQUOT_USR_ENABLED; - return sb_dqopt(sb)->flags & DQUOT_GRP_ENABLED; + return (sb_dqopt(sb)->flags & DQUOT_USR_ENABLED) + && !(sb_dqopt(sb)->flags & DQUOT_USR_SUSPENDED); + return (sb_dqopt(sb)->flags & DQUOT_GRP_ENABLED) + && !(sb_dqopt(sb)->flags & DQUOT_GROUP_SUSPENDED); } static inline int sb_any_quota_enabled(struct super_block *sb) -- 1.5.2.4
Jan Kara
2008-Oct-24 22:07 UTC
[Ocfs2-devel] [PATCH 06/29] ext3: Use sb_any_quota_loaded() instead of sb_any_quota_enabled()
Signed-off-by: Jan Kara <jack at suse.cz> --- fs/ext3/super.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 399a96a..12c2e22 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c @@ -1018,8 +1018,7 @@ static int parse_options (char *options, struct super_block *sb, case Opt_grpjquota: qtype = GRPQUOTA; set_qf_name: - if ((sb_any_quota_enabled(sb) || - sb_any_quota_suspended(sb)) && + if (sb_any_quota_loaded(sb) && !sbi->s_qf_names[qtype]) { printk(KERN_ERR "EXT3-fs: Cannot change journaled " @@ -1058,8 +1057,7 @@ set_qf_name: case Opt_offgrpjquota: qtype = GRPQUOTA; clear_qf_name: - if ((sb_any_quota_enabled(sb) || - sb_any_quota_suspended(sb)) && + if (sb_any_quota_loaded(sb) && sbi->s_qf_names[qtype]) { printk(KERN_ERR "EXT3-fs: Cannot change " "journaled quota options when " @@ -1078,8 +1076,7 @@ clear_qf_name: case Opt_jqfmt_vfsv0: qfmt = QFMT_VFS_V0; set_qf_format: - if ((sb_any_quota_enabled(sb) || - sb_any_quota_suspended(sb)) && + if (sb_any_quota_loaded(sb) && sbi->s_jquota_fmt != qfmt) { printk(KERN_ERR "EXT3-fs: Cannot change " "journaled quota options when " @@ -1098,8 +1095,7 @@ set_qf_format: set_opt(sbi->s_mount_opt, GRPQUOTA); break; case Opt_noquota: - if (sb_any_quota_enabled(sb) || - sb_any_quota_suspended(sb)) { + if (sb_any_quota_loaded(sb)) { printk(KERN_ERR "EXT3-fs: Cannot change quota " "options when quota turned on.\n"); return 0; -- 1.5.2.4
Jan Kara
2008-Oct-24 22:08 UTC
[Ocfs2-devel] [PATCH 07/29] ext4: Use sb_any_quota_loaded() instead of sb_any_quota_enabled()
Signed-off-by: Jan Kara <jack at suse.cz> --- fs/ext4/super.c | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index dea8f13..ab8b8a1 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1206,8 +1206,7 @@ static int parse_options(char *options, struct super_block *sb, case Opt_grpjquota: qtype = GRPQUOTA; set_qf_name: - if ((sb_any_quota_enabled(sb) || - sb_any_quota_suspended(sb)) && + if (sb_any_quota_loaded(sb) && !sbi->s_qf_names[qtype]) { printk(KERN_ERR "EXT4-fs: Cannot change journaled " @@ -1246,8 +1245,7 @@ set_qf_name: case Opt_offgrpjquota: qtype = GRPQUOTA; clear_qf_name: - if ((sb_any_quota_enabled(sb) || - sb_any_quota_suspended(sb)) && + if (sb_any_quota_loaded(sb) && sbi->s_qf_names[qtype]) { printk(KERN_ERR "EXT4-fs: Cannot change " "journaled quota options when " @@ -1266,8 +1264,7 @@ clear_qf_name: case Opt_jqfmt_vfsv0: qfmt = QFMT_VFS_V0; set_qf_format: - if ((sb_any_quota_enabled(sb) || - sb_any_quota_suspended(sb)) && + if (sb_any_quota_loaded(sb) && sbi->s_jquota_fmt != qfmt) { printk(KERN_ERR "EXT4-fs: Cannot change " "journaled quota options when " @@ -1286,7 +1283,7 @@ set_qf_format: set_opt(sbi->s_mount_opt, GRPQUOTA); break; case Opt_noquota: - if (sb_any_quota_enabled(sb)) { + if (sb_any_quota_loaded(sb)) { printk(KERN_ERR "EXT4-fs: Cannot change quota " "options when quota turned on.\n"); return 0; -- 1.5.2.4
Jan Kara
2008-Oct-24 22:08 UTC
[Ocfs2-devel] [PATCH 09/29] quota: Remove compatibility function sb_any_quota_enabled()
Signed-off-by: Jan Kara <jack at suse.cz> --- include/linux/quotaops.h | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index f7dcc30..94f00ec 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h @@ -119,9 +119,6 @@ static inline int sb_any_quota_active(struct super_block *sb) sb_has_quota_active(sb, GRPQUOTA); } -/* For backward compatibility until we remove all users */ -#define sb_any_quota_enabled(sb) sb_any_quota_active(sb) - /* * Operations supported for diskquotas. */ @@ -265,9 +262,6 @@ static inline int sb_any_quota_active(struct super_block *sb) return 0; } -/* For backward compatibility until we remove all users */ -#define sb_any_quota_enabled(sb) sb_any_quota_active(sb) - /* * NO-OP when quota not configured. */ -- 1.5.2.4
Jan Kara
2008-Oct-24 22:08 UTC
[Ocfs2-devel] [PATCH 15/29] quota: Keep which entries were set by SETQUOTA quotactl
Quota in a clustered environment needs to synchronize quota information among cluster nodes. This means we have to occasionally update some information in dquot from disk / network. On the other hand we have to be careful not to overwrite changes administrator did via SETQUOTA. So indicate in dquot->dq_flags which entries have been set by SETQUOTA and quota format can clear these flags when it properly propagated the changes. Signed-off-by: Jan Kara <jack at suse.cz> --- fs/dquot.c | 12 ++++++++++-- include/linux/quota.h | 26 ++++++++++++++++++++------ 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/fs/dquot.c b/fs/dquot.c index 9d2a1f0..124a20a 100644 --- a/fs/dquot.c +++ b/fs/dquot.c @@ -2006,25 +2006,33 @@ static int do_set_dqblk(struct dquot *dquot, struct if_dqblk *di) if (di->dqb_valid & QIF_SPACE) { dm->dqb_curspace = di->dqb_curspace; check_blim = 1; + __set_bit(DQ_LASTSET_B + QIF_SPACE_B, &dquot->dq_flags); } if (di->dqb_valid & QIF_BLIMITS) { dm->dqb_bsoftlimit = qbtos(di->dqb_bsoftlimit); dm->dqb_bhardlimit = qbtos(di->dqb_bhardlimit); check_blim = 1; + __set_bit(DQ_LASTSET_B + QIF_BLIMITS_B, &dquot->dq_flags); } if (di->dqb_valid & QIF_INODES) { dm->dqb_curinodes = di->dqb_curinodes; check_ilim = 1; + __set_bit(DQ_LASTSET_B + QIF_INODES_B, &dquot->dq_flags); } if (di->dqb_valid & QIF_ILIMITS) { dm->dqb_isoftlimit = di->dqb_isoftlimit; dm->dqb_ihardlimit = di->dqb_ihardlimit; check_ilim = 1; + __set_bit(DQ_LASTSET_B + QIF_ILIMITS_B, &dquot->dq_flags); } - if (di->dqb_valid & QIF_BTIME) + if (di->dqb_valid & QIF_BTIME) { dm->dqb_btime = di->dqb_btime; - if (di->dqb_valid & QIF_ITIME) + __set_bit(DQ_LASTSET_B + QIF_BTIME_B, &dquot->dq_flags); + } + if (di->dqb_valid & QIF_ITIME) { dm->dqb_itime = di->dqb_itime; + __set_bit(DQ_LASTSET_B + QIF_ITIME_B, &dquot->dq_flags); + } if (check_blim) { if (!dm->dqb_bsoftlimit || dm->dqb_curspace < dm->dqb_bsoftlimit) { diff --git a/include/linux/quota.h b/include/linux/quota.h index 0ee2a55..f81e80c 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h @@ -82,12 +82,21 @@ * Quota structure used for communication with userspace via quotactl * Following flags are used to specify which fields are valid */ -#define QIF_BLIMITS 1 -#define QIF_SPACE 2 -#define QIF_ILIMITS 4 -#define QIF_INODES 8 -#define QIF_BTIME 16 -#define QIF_ITIME 32 +enum { + QIF_BLIMITS_B = 0, + QIF_SPACE_B, + QIF_ILIMITS_B, + QIF_INODES_B, + QIF_BTIME_B, + QIF_ITIME_B, +}; + +#define QIF_BLIMITS (1 << QIF_BLIMITS_B) +#define QIF_SPACE (1 << QIF_SPACE_B) +#define QIF_ILIMITS (1 << QIF_ILIMITS_B) +#define QIF_INODES (1 << QIF_INODES_B) +#define QIF_BTIME (1 << QIF_BTIME_B) +#define QIF_ITIME (1 << QIF_ITIME_B) #define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS) #define QIF_USAGE (QIF_SPACE | QIF_INODES) #define QIF_TIMES (QIF_BTIME | QIF_ITIME) @@ -244,6 +253,11 @@ extern struct dqstats dqstats; #define DQ_FAKE_B 3 /* no limits only usage */ #define DQ_READ_B 4 /* dquot was read into memory */ #define DQ_ACTIVE_B 5 /* dquot is active (dquot_release not called) */ +#define DQ_LASTSET_B 6 /* Following 6 bits (see QIF_) are reserved\ + * for the mask of entries set via SETQUOTA\ + * quotactl. They are set under dq_data_lock\ + * and the quota format handling dquot can\ + * clear them when it sees fit. */ struct dquot { struct hlist_node dq_hash; /* Hash list in memory */ -- 1.5.2.4
Jan Kara
2008-Oct-24 22:08 UTC
[Ocfs2-devel] [PATCH 16/29] quota: Add helpers to allow ocfs2 specific quota initialization, freeing and recovery
OCFS2 needs to peek whether quota structure is already in memory so that it can avoid expensive cluster locking in that case. Similarly when freeing dquots, it checks whether it is the last quota structure user or not. Finally, it needs to get reference to dquot structure for specified id and quota type when recovering quota file after crash. Signed-off-by: Jan Kara <jack at suse.cz> --- fs/dquot.c | 38 ++++++++++++++++++++++++++++++++------ include/linux/quotaops.h | 4 ++++ 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/fs/dquot.c b/fs/dquot.c index 124a20a..f6bcacd 100644 --- a/fs/dquot.c +++ b/fs/dquot.c @@ -213,8 +213,6 @@ static struct hlist_head *dquot_hash; struct dqstats dqstats; -static void dqput(struct dquot *dquot); - static inline unsigned int hashfn(const struct super_block *sb, unsigned int id, int type) { @@ -568,7 +566,7 @@ static struct shrinker dqcache_shrinker = { * NOTE: If you change this function please check whether dqput_blocks() works right... * MUST be called with either dqptr_sem or dqonoff_mutex held */ -static void dqput(struct dquot *dquot) +void dqput(struct dquot *dquot) { int ret; @@ -660,10 +658,28 @@ static struct dquot *get_empty_dquot(struct super_block *sb, int type) } /* + * Check whether dquot is in memory. + * MUST be called with either dqptr_sem or dqonoff_mutex held + */ +int dquot_is_cached(struct super_block *sb, unsigned int id, int type) +{ + unsigned int hashent = hashfn(sb, id, type); + int ret = 0; + + if (!sb_has_quota_active(sb, type)) + return 0; + spin_lock(&dq_list_lock); + if (find_dquot(hashent, sb, id, type) != NODQUOT) + ret = 1; + spin_unlock(&dq_list_lock); + return ret; +} + +/* * Get reference to dquot * MUST be called with either dqptr_sem or dqonoff_mutex held */ -static struct dquot *dqget(struct super_block *sb, unsigned int id, int type) +struct dquot *dqget(struct super_block *sb, unsigned int id, int type) { unsigned int hashent = hashfn(sb, id, type); struct dquot *dquot, *empty = NODQUOT; @@ -1182,17 +1198,23 @@ out_err: * Release all quotas referenced by inode * Transaction must be started at an entry */ -int dquot_drop(struct inode *inode) +int dquot_drop_locked(struct inode *inode) { int cnt; - down_write(&sb_dqopt(inode->i_sb)->dqptr_sem); for (cnt = 0; cnt < MAXQUOTAS; cnt++) { if (inode->i_dquot[cnt] != NODQUOT) { dqput(inode->i_dquot[cnt]); inode->i_dquot[cnt] = NODQUOT; } } + return 0; +} + +int dquot_drop(struct inode *inode) +{ + down_write(&sb_dqopt(inode->i_sb)->dqptr_sem); + dquot_drop_locked(inode); up_write(&sb_dqopt(inode->i_sb)->dqptr_sem); return 0; } @@ -2304,7 +2326,11 @@ EXPORT_SYMBOL(dquot_release); EXPORT_SYMBOL(dquot_mark_dquot_dirty); EXPORT_SYMBOL(dquot_initialize); EXPORT_SYMBOL(dquot_drop); +EXPORT_SYMBOL(dquot_drop_locked); EXPORT_SYMBOL(vfs_dq_drop); +EXPORT_SYMBOL(dqget); +EXPORT_SYMBOL(dqput); +EXPORT_SYMBOL(dquot_is_cached); EXPORT_SYMBOL(dquot_alloc_space); EXPORT_SYMBOL(dquot_alloc_inode); EXPORT_SYMBOL(dquot_free_space); diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index 94f00ec..1f990f2 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h @@ -27,6 +27,10 @@ void sync_dquots(struct super_block *sb, int type); int dquot_initialize(struct inode *inode, int type); int dquot_drop(struct inode *inode); +int dquot_drop_locked(struct inode *inode); +struct dquot *dqget(struct super_block *sb, unsigned int id, int type); +void dqput(struct dquot *dquot); +int dquot_is_cached(struct super_block *sb, unsigned int id, int type); int dquot_alloc_space(struct inode *inode, qsize_t number, int prealloc); int dquot_alloc_inode(const struct inode *inode, qsize_t number); -- 1.5.2.4
Jan Kara
2008-Oct-24 22:08 UTC
[Ocfs2-devel] [PATCH 17/29] quota: Implement function for scanning active dquots
OCFS2 needs to scan all active dquots once in a while and sync quota information among cluster nodes. Provide a helper function for it so that it does not have to reimplement internally a list which VFS already has. Moreover this function is probably going to be useful for other clustered filesystems if they decide to use VFS quotas. Signed-off-by: Jan Kara <jack at suse.cz> --- fs/dquot.c | 36 ++++++++++++++++++++++++++++++++++++ include/linux/quotaops.h | 3 +++ 2 files changed, 39 insertions(+), 0 deletions(-) diff --git a/fs/dquot.c b/fs/dquot.c index f6bcacd..7be2a01 100644 --- a/fs/dquot.c +++ b/fs/dquot.c @@ -476,6 +476,41 @@ restart: spin_unlock(&dq_list_lock); } +/* Call callback for every active dquot on given filesystem */ +int dquot_scan_active(struct super_block *sb, + int (*fn)(struct dquot *dquot, unsigned long priv), + unsigned long priv) +{ + struct dquot *dquot, *old_dquot = NULL; + int ret = 0; + + mutex_lock(&sb_dqopt(sb)->dqonoff_mutex); + spin_lock(&dq_list_lock); + list_for_each_entry(dquot, &inuse_list, dq_inuse) { + if (!test_bit(DQ_ACTIVE_B, &dquot->dq_flags)) + continue; + if (dquot->dq_sb != sb) + continue; + /* Now we have active dquot so we can just increase use count */ + atomic_inc(&dquot->dq_count); + dqstats.lookups++; + spin_unlock(&dq_list_lock); + dqput(old_dquot); + old_dquot = dquot; + ret = fn(dquot, priv); + if (ret < 0) + goto out; + spin_lock(&dq_list_lock); + /* We are safe to continue now because our dquot could not + * be moved out of the inuse list while we hold the reference */ + } + spin_unlock(&dq_list_lock); +out: + dqput(old_dquot); + mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex); + return ret; +} + int vfs_quota_sync(struct super_block *sb, int type) { struct list_head *dirty; @@ -2314,6 +2349,7 @@ EXPORT_SYMBOL(vfs_quota_on_path); EXPORT_SYMBOL(vfs_quota_on_mount); EXPORT_SYMBOL(vfs_quota_disable); EXPORT_SYMBOL(vfs_quota_off); +EXPORT_SYMBOL(dquot_scan_active); EXPORT_SYMBOL(vfs_quota_sync); EXPORT_SYMBOL(vfs_get_dqinfo); EXPORT_SYMBOL(vfs_set_dqinfo); diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index 1f990f2..f2147eb 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h @@ -31,6 +31,9 @@ int dquot_drop_locked(struct inode *inode); struct dquot *dqget(struct super_block *sb, unsigned int id, int type); void dqput(struct dquot *dquot); int dquot_is_cached(struct super_block *sb, unsigned int id, int type); +int dquot_scan_active(struct super_block *sb, + int (*fn)(struct dquot *dquot, unsigned long priv), + unsigned long priv); int dquot_alloc_space(struct inode *inode, qsize_t number, int prealloc); int dquot_alloc_inode(const struct inode *inode, qsize_t number); -- 1.5.2.4
Jan Kara
2008-Oct-24 22:08 UTC
[Ocfs2-devel] [PATCH 19/29] ocfs2: Fix check of return value of ocfs2_start_trans()
On failure, ocfs2_start_trans() returns values like ERR_PTR(-ENOMEM). Thus checks for !handle are wrong. Fix them to use IS_ERR(). Signed-off-by: Jan Kara <jack at suse.cz> --- fs/ocfs2/file.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 8d3225a..e135da1 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -247,8 +247,8 @@ int ocfs2_update_inode_atime(struct inode *inode, mlog_entry_void(); handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); - if (handle == NULL) { - ret = -ENOMEM; + if (IS_ERR(handle)) { + ret = PTR_ERR(handle); mlog_errno(ret); goto out; } @@ -312,8 +312,8 @@ static int ocfs2_simple_size_update(struct inode *inode, handle_t *handle = NULL; handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); - if (handle == NULL) { - ret = -ENOMEM; + if (IS_ERR(handle)) { + ret = PTR_ERR(handle); mlog_errno(ret); goto out; } @@ -1056,8 +1056,8 @@ static int __ocfs2_write_remove_suid(struct inode *inode, (unsigned long long)OCFS2_I(inode)->ip_blkno, inode->i_mode); handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); - if (handle == NULL) { - ret = -ENOMEM; + if (IS_ERR(handle)) { + ret = PTR_ERR(handle); mlog_errno(ret); goto out; } @@ -1260,8 +1260,8 @@ static int __ocfs2_remove_inode_range(struct inode *inode, } handle = ocfs2_start_trans(osb, OCFS2_REMOVE_EXTENT_CREDITS); - if (handle == NULL) { - ret = -ENOMEM; + if (IS_ERR(handle)) { + ret = PTR_ERR(handle); mlog_errno(ret); goto out; } @@ -1353,8 +1353,8 @@ static int ocfs2_zero_partial_clusters(struct inode *inode, goto out; handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); - if (handle == NULL) { - ret = -ENOMEM; + if (IS_ERR(handle)) { + ret = PTR_ERR(handle); mlog_errno(ret); goto out; } -- 1.5.2.4
Jan Kara
2008-Oct-24 22:08 UTC
[Ocfs2-devel] [PATCH 21/29] ocfs2: Fix checking of return value of new_inode()
new_inode() does not return ERR_PTR() but NULL in case of failure. Correct checking of the return value. Signed-off-by: Jan Kara <jack at suse.cz> --- fs/ocfs2/namei.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 485a6aa..f594f30 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c @@ -378,8 +378,8 @@ static int ocfs2_mknod_locked(struct ocfs2_super *osb, } inode = new_inode(dir->i_sb); - if (IS_ERR(inode)) { - status = PTR_ERR(inode); + if (!inode) { + status = -ENOMEM; mlog(ML_ERROR, "new_inode failed!\n"); goto leave; } -- 1.5.2.4
Jan Kara
2008-Oct-24 22:08 UTC
[Ocfs2-devel] [PATCH 22/29] ocfs2: Let inode be really deleted when ocfs2_mknod_locked() fails
We forgot to set i_nlink to 0 when returning due to error from ocfs2_mknod_locked() and thus inode was not properly released via ocfs2_delete_inode() (e.g. claimed space was not released). Fix it. Signed-off-by: Jan Kara <jack at suse.cz> --- fs/ocfs2/namei.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index f594f30..f4967e6 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c @@ -491,8 +491,10 @@ leave: brelse(*new_fe_bh); *new_fe_bh = NULL; } - if (inode) + if (inode) { + clear_nlink(inode); iput(inode); + } } mlog_exit(status); -- 1.5.2.4
Jan Kara
2008-Oct-24 22:08 UTC
[Ocfs2-devel] [PATCH 24/29] ocfs2: Mark system files as not subject to quota accounting
Mark system files as not subject to quota accounting. This prevents possible recursions into quota code and thus deadlocks. Signed-off-by: Jan Kara <jack at suse.cz> --- fs/ocfs2/inode.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index da3a360..738b63f 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c @@ -284,8 +284,10 @@ int ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe, inode->i_nlink = le16_to_cpu(fe->i_links_count); - if (fe->i_flags & cpu_to_le32(OCFS2_SYSTEM_FL)) + if (fe->i_flags & cpu_to_le32(OCFS2_SYSTEM_FL)) { OCFS2_I(inode)->ip_flags |= OCFS2_INODE_SYSTEM_FILE; + inode->i_flags |= S_NOQUOTA; + } if (fe->i_flags & cpu_to_le32(OCFS2_LOCAL_ALLOC_FL)) { OCFS2_I(inode)->ip_flags |= OCFS2_INODE_BITMAP; -- 1.5.2.4
tristan.ye
2008-Oct-27 07:22 UTC
[Ocfs2-devel] [PATCH 00/00] Implement quotas for OCFS2 (version 2)
On Sat, 2008-10-25 at 00:05 +0200, Jan Kara wrote:> Hello, > > the following patch series implements quotas for OCFS2. The patch > series is based on: > git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2.git linux-nextJan, I was working on the latest pulled ocfs2.git you mentioned above,seems the new patches series you've sent still can be applied correctly there,hit following errors when applying the patches, [root at ocfs2-test6 linux-next]# for i in $(seq 29);do echo "****Applying patch #${i}****";patch -p1</work/quota-patches/quota-patch${i};done ****Applying patch #1**** patching file fs/dquot.c patching file include/linux/quota.h ****Applying patch #2**** patching file fs/dquot.c patching file fs/quota_v1.c patching file fs/quota_v2.c patching file include/linux/quota.h patching file include/linux/quotaops.h ****Applying patch #3**** patching file fs/dquot.c ****Applying patch #4**** patching file fs/dquot.c patching file include/linux/quotaops.h ****Applying patch #5**** patching file fs/dquot.c patching file fs/quota.c patching file include/linux/quota.h patching file include/linux/quotaops.h ****Applying patch #6**** patching file fs/ext3/super.c ****Applying patch #7**** patching file fs/ext4/super.c ****Applying patch #8**** patching file fs/reiserfs/super.c ****Applying patch #9**** patching file include/linux/quotaops.h ****Applying patch #10**** patching file fs/dquot.c patching file fs/quota.c patching file include/linux/quota.h ****Applying patch #11**** patching file fs/quota_v1.c patching file fs/quota_v2.c patching file fs/quotaio_v1.h patching file fs/quotaio_v2.h patching file include/linux/quotaio_v1.h patching file include/linux/quotaio_v2.h ****Applying patch #12**** patching file fs/Kconfig Hunk #1 succeeded at 583 (offset -18 lines). patching file fs/Makefile Hunk #1 succeeded at 53 (offset -1 lines). patching file fs/quota_tree.c patching file fs/quota_tree.h patching file fs/quota_v2.c patching file fs/quotaio_v2.h patching file include/linux/dqblk_qtree.h patching file include/linux/dqblk_v2.h ****Applying patch #13**** patching file fs/quota_v2.c patching file include/linux/dqblk_v1.h patching file include/linux/dqblk_v2.h patching file include/linux/quota.h ****Applying patch #14**** patching file fs/dquot.c patching file include/linux/quota.h ****Applying patch #15**** patching file fs/dquot.c patching file include/linux/quota.h ****Applying patch #16**** patching file fs/dquot.c patching file include/linux/quotaops.h ****Applying patch #17**** patching file fs/dquot.c patching file include/linux/quotaops.h ****Applying patch #18**** patching file mm/pdflush.c ****Applying patch #19**** patching file fs/ocfs2/file.c Hunk #1 succeeded at 246 (offset -1 lines). Hunk #3 succeeded at 1209 (offset 153 lines). Hunk #4 succeeded at 1259 (offset -1 lines). Hunk #5 succeeded at 1506 (offset 153 lines). ****Applying patch #20**** patching file fs/ocfs2/journal.c Hunk #2 FAILED at 283. 1 out of 2 hunks FAILED -- saving rejects to file fs/ocfs2/journal.c.rej ****Applying patch #21**** patching file fs/ocfs2/namei.c Hunk #1 succeeded at 382 (offset 4 lines). ****Applying patch #22**** patching file fs/ocfs2/namei.c Hunk #1 succeeded at 495 (offset 4 lines). ****Applying patch #23**** patching file fs/ocfs2/inode.c Hunk #1 succeeded at 286 (offset -6 lines). patching file fs/ocfs2/ocfs2_fs.h Hunk #1 FAILED at 93. Hunk #2 succeeded at 155 (offset -4 lines). Hunk #4 succeeded at 322 (offset -10 lines). Hunk #6 succeeded at 355 (offset -10 lines). 1 out of 6 hunks FAILED -- saving rejects to file fs/ocfs2/ocfs2_fs.h.rej patching file fs/ocfs2/super.c Hunk #1 succeeded at 213 (offset -8 lines). Hunk #3 succeeded at 284 (offset -8 lines). ****Applying patch #24**** patching file fs/ocfs2/inode.c Hunk #1 succeeded at 278 (offset -6 lines). ****Applying patch #25**** patching file fs/ocfs2/Makefile Hunk #1 FAILED at 35. 1 out of 1 hunk FAILED -- saving rejects to file fs/ocfs2/Makefile.rej patching file fs/ocfs2/cluster/masklog.h Hunk #1 FAILED at 113. 1 out of 1 hunk FAILED -- saving rejects to file fs/ocfs2/cluster/masklog.h.rej patching file fs/ocfs2/dir.c Hunk #1 FAILED at 82. 1 out of 1 hunk FAILED -- saving rejects to file fs/ocfs2/dir.c.rej patching file fs/ocfs2/dlmglue.c Hunk #9 succeeded at 3490 (offset 5 lines). patching file fs/ocfs2/dlmglue.h patching file fs/ocfs2/file.c Hunk #1 succeeded at 302 (offset -1 lines). patching file fs/ocfs2/file.h Hunk #1 FAILED at 51. 1 out of 1 hunk FAILED -- saving rejects to file fs/ocfs2/file.h.rej patching file fs/ocfs2/inode.h Hunk #1 succeeded at 140 (offset -2 lines). patching file fs/ocfs2/ocfs2_fs.h Hunk #1 succeeded at 730 with fuzz 2 (offset -148 lines). patching file fs/ocfs2/ocfs2_lockid.h patching file fs/ocfs2/quota.h patching file fs/ocfs2/quota_global.c patching file fs/ocfs2/quota_local.c patching file fs/ocfs2/super.c Hunk #1 FAILED at 65. Hunk #2 succeeded at 139 (offset -1 lines). Hunk #3 succeeded at 1040 (offset -36 lines). Hunk #4 succeeded at 1099 (offset -1 lines). Hunk #5 succeeded at 1180 (offset -37 lines). Hunk #6 succeeded at 1245 (offset -1 lines). 1 out of 6 hunks FAILED -- saving rejects to file fs/ocfs2/super.c.rej ****Applying patch #26**** patching file fs/ocfs2/alloc.c Hunk #2 succeeded at 5946 (offset -405 lines). Hunk #3 FAILED at 6261. Hunk #4 succeeded at 6681 (offset -5 lines). Hunk #5 succeeded at 6301 (offset -405 lines). Hunk #6 succeeded at 6780 (offset -6 lines). 1 out of 6 hunks FAILED -- saving rejects to file fs/ocfs2/alloc.c.rej patching file fs/ocfs2/aops.c Hunk #2 succeeded at 1737 (offset -14 lines). Hunk #4 succeeded at 1763 (offset -14 lines). patching file fs/ocfs2/dir.c Hunk #2 succeeded at 1183 (offset -34 lines). Hunk #3 FAILED at 1194. Hunk #4 succeeded at 1263 (offset -3 lines). Hunk #5 succeeded at 1360 (offset -34 lines). Hunk #6 succeeded at 1418 (offset -3 lines). Hunk #7 FAILED at 1428. Hunk #8 succeeded at 1429 (offset -34 lines). 2 out of 8 hunks FAILED -- saving rejects to file fs/ocfs2/dir.c.rej patching file fs/ocfs2/file.c Hunk #2 FAILED at 57. Hunk #3 FAILED at 538. Hunk #4 succeeded at 744 (offset 156 lines). Hunk #6 succeeded at 1057 (offset 158 lines). Hunk #7 succeeded at 966 (offset -6 lines). Hunk #8 succeeded at 1193 (offset 158 lines). Hunk #9 succeeded at 1311 (offset -6 lines). 2 out of 9 hunks FAILED -- saving rejects to file fs/ocfs2/file.c.rej patching file fs/ocfs2/inode.c Hunk #2 succeeded at 602 (offset -18 lines). Hunk #4 succeeded at 911 (offset -25 lines). patching file fs/ocfs2/journal.h Hunk #1 succeeded at 283 with fuzz 2 (offset -10 lines). Hunk #3 succeeded at 337 (offset -10 lines). Hunk #5 succeeded at 386 with fuzz 2 (offset -10 lines). Hunk #6 FAILED at 427. Hunk #7 succeeded at 474 (offset -12 lines). 1 out of 7 hunks FAILED -- saving rejects to file fs/ocfs2/journal.h.rej patching file fs/ocfs2/namei.c Hunk #2 succeeded at 66 (offset -1 lines). Hunk #4 succeeded at 230 (offset -1 lines). Hunk #6 succeeded at 305 (offset -1 lines). Hunk #8 succeeded at 385 with fuzz 2 (offset 4 lines). Hunk #10 succeeded at 416 (offset 4 lines). Hunk #12 succeeded at 462 (offset 4 lines). Hunk #14 succeeded at 519 (offset 4 lines). Hunk #16 succeeded at 808 (offset 7 lines). Hunk #17 succeeded at 1214 (offset 7 lines). Hunk #18 succeeded at 1539 (offset 17 lines). Hunk #19 succeeded at 1586 (offset 7 lines). Hunk #20 succeeded at 1611 (offset 17 lines). Hunk #21 FAILED at 1635. Hunk #22 succeeded at 1687 (offset 7 lines). Hunk #23 succeeded at 1717 (offset 20 lines). 1 out of 23 hunks FAILED -- saving rejects to file fs/ocfs2/namei.c.rej can't find file to patch at input line 945 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c |index 802c414..d4bc0ab 100644 |--- a/fs/ocfs2/xattr.c |+++ b/fs/ocfs2/xattr.c -------------------------- File to patch: ==============end====================== So i turn to the latest 2.6.27 mainline kernel(git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git) for another attempt,it succeeded:) However,the testing for quota on ocfs2 still being blocked by the mkfs tools patch,which did not work for me(missing quota.c file in patch?):( Regards, Tristan.> > I've adressed Joel's comments, also node recovery is now fully working > and I've fixed a few issues I found during my testing. So I'm currently > not aware of any bugs. Please review, test, comment. Thanks. > > Honza
tristan.ye
2008-Oct-27 09:08 UTC
[Ocfs2-devel] [PATCH 00/00] Implement quotas for OCFS2 (version 2)
On Sat, 2008-10-25 at 00:05 +0200, Jan Kara wrote:> Hello, > > the following patch series implements quotas for OCFS2. The patch > series is based on: > git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2.git linux-nextJan, Try with linux-next branch on mark's tree this time,still hit a failure at patch 25 [root at ocfs2-test5 linux-next]# patch -p1</kernel/quota-patches/quota-patch25 patching file fs/ocfs2/Makefile Hunk #1 FAILED at 35. 1 out of 1 hunk FAILED -- saving rejects to file fs/ocfs2/Makefile.rej patching file fs/ocfs2/cluster/masklog.h patching file fs/ocfs2/dir.c Hunk #1 FAILED at 82. 1 out of 1 hunk FAILED -- saving rejects to file fs/ocfs2/dir.c.rej patching file fs/ocfs2/dlmglue.c Hunk #9 succeeded at 3490 (offset 5 lines). patching file fs/ocfs2/dlmglue.h patching file fs/ocfs2/file.c patching file fs/ocfs2/file.h patching file fs/ocfs2/inode.h Hunk #1 succeeded at 144 (offset 2 lines). patching file fs/ocfs2/ocfs2_fs.h patching file fs/ocfs2/ocfs2_lockid.h patching file fs/ocfs2/quota.h patching file fs/ocfs2/quota_global.c patching file fs/ocfs2/quota_local.c patching file fs/ocfs2/super.c Hunk #3 succeeded at 1077 (offset 1 line). Hunk #5 succeeded at 1218 (offset 1 line). Anyway,i do succeeded to apply these patches with linus's latest mainline 2.6.27 master branch. the tools patch for mkfs also works:), for current testing,seems all POSIX quota tools(including quotaon,quotaoff and setquota.) failed to be applied on ocfs2-quota? right? the failure may due to the fact that tools can not find 2 hidden quota files? After mkfs with --fs-feature=usrquota,grpquota.... and also mount it with usrquota and grpquota options explicitly specified,seems still failed to enable the quota by quotaon even i did saw these options showed up in /etc/mtab. the errors was somewhat like i never specified the options when mounting, [root at ocfs2-test6 quota_examples-0.0.21]# quotaon -vugf /quota/ quotaon: Mountpoint (or device) /quota not found. When i check this quota-supported ocfs2 volume by debufs.ocfs2,do find the 2 quota files under system folder.so,ocfs2 defaultly generate the quota files without a quotacheck like extN did? so how can I refresh/check the files by force?should wait the fsck.ocfs2 to have it come true? Thus,for current testing, i should expect the quoctl POSXI api to do all things for me? since we can not do any test manually without the help of quota tools. am I understanding the things in a right way? Regards, Tristan.> > I've adressed Joel's comments, also node recovery is now fully working > and I've fixed a few issues I found during my testing. So I'm currently > not aware of any bugs. Please review, test, comment. Thanks. > > Honza
tristan.ye
2008-Oct-28 11:23 UTC
[Ocfs2-devel] [PATCH 00/00] Implement quotas for OCFS2 (version 2)
On Tue, 2008-10-28 at 10:09 +0800, tristan.ye wrote:> On Mon, 2008-10-27 at 12:23 +0100, Jan Kara wrote: > > On Mon 27-10-08 17:08:54, tristan.ye wrote: > > > On Sat, 2008-10-25 at 00:05 +0200, Jan Kara wrote: > > > > Hello, > > > > > > > > the following patch series implements quotas for OCFS2. The patch > > > > series is based on: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2.git linux-next > > > > > > Jan, > > > > > > Try with linux-next branch on mark's tree this time,still hit a failure > > > at patch 25 > > > > > > [root at ocfs2-test5 linux-next]# patch > > > -p1</kernel/quota-patches/quota-patch25 > > > patching file fs/ocfs2/Makefile > > > Hunk #1 FAILED at 35. > > > 1 out of 1 hunk FAILED -- saving rejects to file fs/ocfs2/Makefile.rej > > > patching file fs/ocfs2/cluster/masklog.h > > > patching file fs/ocfs2/dir.c > > > Hunk #1 FAILED at 82. > > > 1 out of 1 hunk FAILED -- saving rejects to file fs/ocfs2/dir.c.rej > > > patching file fs/ocfs2/dlmglue.c > > > Hunk #9 succeeded at 3490 (offset 5 lines). > > > patching file fs/ocfs2/dlmglue.h > > > patching file fs/ocfs2/file.c > > > patching file fs/ocfs2/file.h > > > patching file fs/ocfs2/inode.h > > > Hunk #1 succeeded at 144 (offset 2 lines). > > > patching file fs/ocfs2/ocfs2_fs.h > > > patching file fs/ocfs2/ocfs2_lockid.h > > > patching file fs/ocfs2/quota.h > > > patching file fs/ocfs2/quota_global.c > > > patching file fs/ocfs2/quota_local.c > > > patching file fs/ocfs2/super.c > > > Hunk #3 succeeded at 1077 (offset 1 line). > > > Hunk #5 succeeded at 1218 (offset 1 line). > > > > > > Anyway,i do succeeded to apply these patches with linus's latest > > > mainline 2.6.27 master branch. the tools patch for mkfs also works:), > > Hmm, that's a bit strange. I've just rebased my set of patches on top of > > linux-next branch in Mark's tree and I got two rejects but in a different > > patch... Also my latest patch set probably wouldn't work against 2.6.27 > > because it's already based on xattr and acl changes which aren't in 2.6.27. > > I'm attaching tarball of the patches just for reference. > > I'm also hitting rejects by using the newly attached patch set on > linux-next branch of mark's tree, > 3 patches hit the reject failure,they were patch #5,#22 #23,following > output will tell the detail, > > ============message output when applying the patches=============> patch > -p1<../ocfs2-patches/0005-quota-Allow-to-separately-enable-quota-accounting-a.patch > patching file fs/dquot.c > Hunk #1 succeeded at 489 (offset 2 lines). > Hunk #3 succeeded at 594 (offset 2 lines). > Hunk #5 succeeded at 1041 (offset 4 lines). > Hunk #7 succeeded at 1116 (offset 4 lines). > Hunk #9 succeeded at 1552 (offset 4 lines). > Hunk #11 succeeded at 1584 (offset 4 lines). > Hunk #13 succeeded at 1644 (offset 4 lines). > Hunk #15 succeeded at 1670 (offset 4 lines). > Hunk #17 succeeded at 1720 (offset 4 lines). > Hunk #19 succeeded at 1785 (offset 4 lines). > Hunk #20 FAILED at 1817. > Hunk #22 succeeded at 1905 (offset 4 lines). > Hunk #24 succeeded at 2061 (offset 4 lines). > Hunk #26 succeeded at 2099 (offset 4 lines). > 1 out of 27 hunks FAILED -- saving rejects to file fs/dquot.c.rej > > > patch > -p1<../ocfs2-patches/0022-ocfs2-Implementation-of-local-and-global-quota-file.patch > patching file fs/ocfs2/Makefile > Hunk #1 FAILED at 35. > 1 out of 1 hunk FAILED -- saving rejects to file fs/ocfs2/Makefile.rej > patching file fs/ocfs2/cluster/masklog.h > patching file fs/ocfs2/dir.c > Hunk #1 FAILED at 82. > 1 out of 1 hunk FAILED -- saving rejects to file fs/ocfs2/dir.c.rej > patching file fs/ocfs2/dlmglue.c > Hunk #9 succeeded at 3490 (offset 5 lines). > patching file fs/ocfs2/dlmglue.h > patching file fs/ocfs2/file.c > patching file fs/ocfs2/file.h > patching file fs/ocfs2/inode.h > Hunk #1 succeeded at 144 (offset 2 lines). > patching file fs/ocfs2/ocfs2_fs.h > Hunk #1 succeeded at 878 (offset -1 lines). > patching file fs/ocfs2/ocfs2_lockid.h > patching file fs/ocfs2/quota.h > patching file fs/ocfs2/quota_global.c > patching file fs/ocfs2/quota_local.c > patching file fs/ocfs2/super.c > Hunk #3 succeeded at 1077 (offset 1 line). > Hunk #5 succeeded at 1218 (offset 1 line). > > patch > -p1<../ocfs2-patches/0023-ocfs2-Add-quota-calls-for-allocation-and-freeing-of.patch > patching file fs/ocfs2/alloc.c > Hunk #2 succeeded at 6377 (offset 26 lines). > Hunk #4 succeeded at 6712 (offset 26 lines). > Hunk #6 succeeded at 6812 (offset 26 lines). > patching file fs/ocfs2/aops.c > Hunk #2 succeeded at 1756 (offset 5 lines). > Hunk #4 succeeded at 1782 (offset 5 lines). > patching file fs/ocfs2/dir.c > Hunk #2 succeeded at 1183 (offset -34 lines). > Hunk #4 succeeded at 1232 (offset -34 lines). > Hunk #6 succeeded at 1387 (offset -34 lines). > Hunk #8 succeeded at 1429 (offset -34 lines). > patching file fs/ocfs2/file.c > Hunk #4 succeeded at 589 (offset 1 line). > Hunk #6 succeeded at 902 (offset 3 lines). > Hunk #8 succeeded at 1038 (offset 3 lines). > Hunk #9 FAILED at 1320. > 1 out of 9 hunks FAILED -- saving rejects to file fs/ocfs2/file.c.rej > patching file fs/ocfs2/inode.c > Hunk #2 succeeded at 617 (offset -3 lines). > Hunk #4 succeeded at 933 (offset -3 lines). > patching file fs/ocfs2/journal.h > patching file fs/ocfs2/namei.c > Hunk #8 succeeded at 386 with fuzz 2 (offset 5 lines). > Hunk #10 succeeded at 417 (offset 5 lines). > Hunk #11 FAILED at 431. > Hunk #13 succeeded at 482 (offset 5 lines). > Hunk #14 FAILED at 520. > Hunk #15 succeeded at 612 (offset -2 lines). > Hunk #16 succeeded at 809 (offset 8 lines). > Hunk #17 succeeded at 1212 (offset 5 lines). > Hunk #18 succeeded at 1540 (offset 18 lines). > Hunk #19 succeeded at 1584 (offset 5 lines). > Hunk #20 succeeded at 1612 (offset 18 lines). > Hunk #21 succeeded at 1623 (offset 5 lines). > Hunk #22 succeeded at 1698 (offset 18 lines). > Hunk #23 succeeded at 1705 (offset 8 lines). > 2 out of 23 hunks FAILED -- saving rejects to file fs/ocfs2/namei.c.rej > patching file fs/ocfs2/xattr.c > Hunk #1 succeeded at 358 (offset 9 lines). > Hunk #2 FAILED at 4267. > 1 out of 2 hunks FAILED -- saving rejects to file fs/ocfs2/xattr.c.rej > ==========3 patches(#5,#22,#23) hit reject failure======> > Due to above failure, i definitely hit a compiling error when building > the krenel for testing. > fs/dquot.c: In function ?vfs_quota_on_path?: > fs/dquot.c:1894: error: implicit declaration of function > ?vfs_quota_on_inode? > make[1]: *** [fs/dquot.o] Error 1 > make: *** [fs] Error 2 > > Will you check on your environment? or you will tell me the exact env > you use to make things comfortably successful?Jan, Sorry for making the noise again:) I'm just curious about one thing, as you said we choose quotaon to enforce the quota limitation on ocfs2 to keep the consistency with other fs, and the quotaon finally call the quoctl with the cmd word 'Q_QUOTAON', here i found the quoctl() need a agrumnet to point to the path name of file containing the quotas for the filesystem,but unfortunately these files were hidden from userspace on ocfs2. so this quotactl call for turning on the quota will definitely fail, is that the case? Since the existing POSIX quota tools did not work under ocfs2 currently, i've written a simple version of the quota tools(just including getquota,setquotas and quotactl) by the help of quotactl() API. All of its binaries and src attached. As what i said above, my version of quotaon(invoked by 'quotactl -o') also did not work here ,and fortunately, we really do succeed to set/get the quota for usr/group. you can have a check in your env if you wish. Thanks and regards, Tristan.> > Yesterday,i really succeeded with your first patch set(0-29 patches > totally) on linus's mainline kernel 2.6.27, will it be OK for testing? > > > > Thanks and regards, > > Tristan. > > > > > > > for current testing,seems all POSIX quota tools(including > > > quotaon,quotaoff and setquota.) failed to be applied on ocfs2-quota? > > > right? the failure may due to the fact that tools can not find 2 hidden > > > quota files? > > Yes, tools should print some message that filesystem does not support > > quotas or something like that. > > > > > After mkfs with --fs-feature=usrquota,grpquota.... and also mount it > > > with usrquota and grpquota options explicitly specified,seems still > > > failed to enable the quota by quotaon even i did saw these options > > > showed up in /etc/mtab. the errors was somewhat like i never specified > > > the options when mounting, > > > [root at ocfs2-test6 quota_examples-0.0.21]# quotaon -vugf /quota/ > > > quotaon: Mountpoint (or device) /quota not found. > > Well, the -f option is definitely wrong (that means turn quotas off). > > Something like: quotaon -avug > > should do the work for you - it will find the filesystem in the /etc/mtab > > automatically. > > > > > When i check this quota-supported ocfs2 volume by debufs.ocfs2,do find > > > the 2 quota files under system folder.so,ocfs2 defaultly generate the > > > quota files without a quotacheck like extN did? so how can I > > > refresh/check the files by force?should wait the fsck.ocfs2 to have it > > > come true? > > Mkfs creates these two system files (and also node local system files > > called aquota0001.user etc). For checking / fixing these files, you have > > to wait for fsck.ocfs2 support. But I think you can test quite a lot even > > without it - most of the bugs would not probably result in the corruption > > of quota file anyway. > > > > > Thus,for current testing, i should expect the quoctl POSXI api to do all > > > things for me? since we can not do any test manually without the help of > > > quota tools. am I understanding the things in a right way? > > Yes, quotactl() is the only interface you can use (it is used by quota-tools > > as well). > > Honza-------------- next part -------------- A non-text attachment was scrubbed... Name: myquota_tools.tgz Type: application/x-compressed-tar Size: 14427 bytes Desc: not available Url : http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20081028/1c6a6dcb/attachment-0001.bin
Mark Fasheh
2008-Oct-29 22:58 UTC
[Ocfs2-devel] [PATCH 00/00] Implement quotas for OCFS2 (version 2)
On Sat, Oct 25, 2008 at 12:05:04AM +0200, Jan Kara wrote:> Hello, > > the following patch series implements quotas for OCFS2. The patch > series is based on: > git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2.git linux-nextGreat, thanks for posting these again.> I've adressed Joel's comments, also node recovery is now fully working > and I've fixed a few issues I found during my testing. So I'm currently > not aware of any bugs. Please review, test, comment. Thanks.How are we going to handle the vfs patches? I think realistically, they should just all go into the merge_window branch of ocfs2.git along with the Ocfs2 patches to add quoata support (and make use of the VFS features you added). The VFS patches at least though, should probably get posted to linux-fsdevel before I pick them up. --Mark -- Mark Fasheh
Mark Fasheh
2008-Nov-06 01:09 UTC
[Ocfs2-devel] [PATCH 00/00] Implement quotas for OCFS2 (version 2)
On Sat, Oct 25, 2008 at 12:05:04AM +0200, Jan Kara wrote:> Hello, > > the following patch series implements quotas for OCFS2. The patch > series is based on: > git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2.git linux-next > > I've adressed Joel's comments, also node recovery is now fully working > and I've fixed a few issues I found during my testing. So I'm currently > not aware of any bugs. Please review, test, comment. Thanks.Ok, so these patches look pretty good. I've made comments via e-mail and for the most part, I'm done reviewing. There's always the chance I see something later (especially once I have it in front of me in the form of a git branch). None of the comments I had so far though were so critical that we'd need to wait on inclusion in ocfs2.git for at least preliminary testing. I'd like your opinion on that first though, before I proceed. --Mark -- Mark Fasheh
Possibly Parallel Threads
- [git patches] Ocfs2 patches for merge window, batch 2/3
- Dovecot >=2.2.29 + Filesystem quota = incorrect storage information
- Dovecot >=2.2.29 + Filesystem quota = incorrect storage information
- [PATCH 0/9] Quota support for ocfs2-tools (version 3)
- Re: SAMBA compile errors at XFS kernel.. (fwd)