[Ocfs2-tools-devel] [PATCH 1/5] Do not reinitialize already initialized quota info
Jan Kara
jack at suse.cz
Fri Oct 23 06:16:40 PDT 2009
On Tue 20-10-09 12:37:42, Joel Becker wrote:
> 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?
No, they are only for use by ocfs2-tools and in-memory only...
Honza
--
Jan Kara <jack at suse.cz>
SUSE Labs, CR
More information about the Ocfs2-tools-devel
mailing list