From: Joel Becker <Joel.Becker@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 3/5] Quota support for disabling inline-data feature
Date: Tue, 20 Oct 2009 12:08:52 -0700 [thread overview]
Message-ID: <20091020190852.GA15982@mail.oracle.com> (raw)
In-Reply-To: <1255543739-23844-4-git-send-email-jack@suse.cz>
On Wed, Oct 14, 2009 at 08:08:57PM +0200, Jan Kara wrote:
> When disabling inline-data feature, space occupied by files changes
> and thus we have to update quota information accordingly.
>
> Signed-off-by: Jan Kara <jack@suse.cz>
> ---
> tunefs.ocfs2/feature_inline_data.c | 42 +++++++++++++++++++++++++++++++----
> 1 file changed, 38 insertions(+), 6 deletions(-)
>
> diff --git a/tunefs.ocfs2/feature_inline_data.c b/tunefs.ocfs2/feature_inline_data.c
> index 77ddb42..9e1d07f 100644
> --- a/tunefs.ocfs2/feature_inline_data.c
> +++ b/tunefs.ocfs2/feature_inline_data.c
> @@ -170,31 +170,63 @@ static void empty_inline_data_context(struct inline_data_context *ctxt)
> static errcode_t expand_inline_data(ocfs2_filesys *fs,
> struct inline_data_context *ctxt)
> {
> - errcode_t ret = 0;
> + errcode_t ret = 0, err;
> struct list_head *pos;
> struct inline_data_inode *idi;
> ocfs2_cached_inode *ci = NULL;
> struct tools_progress *prog;
> + struct ocfs2_super_block *super = OCFS2_RAW_SB(fs->fs_super);
> + ocfs2_quota_hash *usrhash = NULL, *grphash = NULL;
> + uint32_t uid, gid;
> + long long change;
>
> prog = tools_progress_start("Expanding inline files", "expanding",
> ctxt->more_clusters);
> if (!ctxt->prog)
> return TUNEFS_ET_NO_MEMORY;
>
> + ret = ocfs2_load_fs_quota_info(fs);
> + if (ret)
> + goto out;
> +
> + ret = ocfs2_init_quota_change(fs, &usrhash, &grphash);
> + if (ret)
> + goto out;
This is so much nicer!
Joel
--
"You don't make the poor richer by making the rich poorer."
- Sir Winston Churchill
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
next prev parent reply other threads:[~2009-10-20 19:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-14 18:08 [Ocfs2-devel] [PATCH 0/5] Quota support for disabling inline-data feature (v2) and a fix Jan Kara
2009-10-14 18:08 ` [Ocfs2-devel] [PATCH 1/5] Do not reinitialize already initialized quota info Jan Kara
2009-10-14 18:08 ` [Ocfs2-devel] [PATCH 2/5] Implement support for quota changes in libocfs2 Jan Kara
2009-10-20 6:49 ` Tristan
2009-10-20 8:26 ` Jan Kara
2009-10-14 18:08 ` [Ocfs2-devel] [PATCH 3/5] Quota support for disabling inline-data feature Jan Kara
2009-10-20 19:08 ` Joel Becker [this message]
2009-10-14 18:08 ` [Ocfs2-devel] [PATCH 4/5] Convert disabling of sparse feature to use new code in libocfs2 Jan Kara
2009-10-16 8:16 ` Tristan
2009-10-19 6:55 ` Jan Kara
2009-10-14 18:08 ` [Ocfs2-devel] [PATCH 5/5] Don't account space used for system files when disabling sparse feature Jan Kara
2009-10-14 20:04 ` [Ocfs2-devel] [PATCH 0/5] Quota support for disabling inline-data feature (v2) and a fix Joel Becker
2009-10-15 10:34 ` Jan Kara
2009-10-19 7:06 ` Tristan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091020190852.GA15982@mail.oracle.com \
--to=joel.becker@oracle.com \
--cc=ocfs2-devel@oss.oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.