[Ocfs2-tools-devel] [PATCH 1/5] Do not reinitialize already initialized quota info

Joel Becker Joel.Becker at oracle.com
Tue Oct 20 12:37:42 PDT 2009


On Mon, Oct 19, 2009 at 09:01:35AM +0200, Jan Kara wrote:
> Tunefs can call ocfs2_init_fs_quota_info() and ocfs2_read_global_quota_info()
> several times when several features are to be enabled / disabled. Check
> whether we haven't already initialized the info / read the info from disk
> and don't do anything in such case so that we don't lose references to
> inodes or even overwrite cached information in memory with an old one from
> disk.
> 
> Signed-off-by: Jan Kara <jack at suse.cz>
> ---
>  include/ocfs2/ocfs2.h        |    1 +
>  libocfs2/quota.c             |    8 ++++++++
>  tunefs.ocfs2/feature_quota.c |    2 +-
>  3 files changed, 10 insertions(+), 1 deletions(-)
> 
> diff --git a/include/ocfs2/ocfs2.h b/include/ocfs2/ocfs2.h
> index 992d2f2..d7be734 100644
> --- a/include/ocfs2/ocfs2.h
> +++ b/include/ocfs2/ocfs2.h
> @@ -129,6 +129,7 @@
>  
>  /* Flags for global quotafile info */
>  #define OCFS2_QF_INFO_DIRTY 1
> +#define OCFS2_QF_INFO_LOADED 2

	These flags come from the kernel, right?  Are they physically on
disk?

Joel

-- 

"Under capitalism, man exploits man.  Under Communism, it's just 
   the opposite."
				 - John Kenneth Galbraith

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-tools-devel mailing list