mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Poetzl <herbert@13thfloor.at>
To: Jan Kara <jack@suse.cz>
Cc: linux-kernel@vger.kernel.org, Alex Lyashkov <shadow@itt.net.ru>
Subject: Re: Linux 2.4 quota (accounting?) bug ...
Date: Sat, 25 Oct 2003 19:42:25 +0200	[thread overview]
Message-ID: <20031025174225.GB24020@DUK2.13thfloor.at> (raw)
In-Reply-To: <20031025163128.GA20786@atrey.karlin.mff.cuni.cz>

On Sat, Oct 25, 2003 at 06:31:28PM +0200, Jan Kara wrote:
>   Hi,
> 
> > a friend of mine, made me aware of the following
> > imbalance, which looks like a minor accounting bug 
> > to me, but might be a quota bug ...
>   Sorry but the code seems correct to me - we get reference to dquot by
> get_dquot_ref() and than we put the reference by dqput(). dqput() is
> correct because something nasty might happen in the mean time and so we
> might be the last holders of the dquot. What do you think is wrong?

dqput() does dqstats.drops++;
which isn't correct if this should be the same as
put_dquot_ref(), but maybe I'm just irritated by 
strange statistics on some kernels showing more
drops than lookups+allocated after sync/quotaoff

best,
Herbert

> 								Honza
> 
> > 
> > fs/dquot.c : 394 vfs_quota_sync()
> > -----------------------------------------------------
> >                 /* Get reference to quota so it won't be invalidated. get_dquot_ref()
> >                  * is enough since if dquot is locked/modified it can't be
> >                  * on the free list */
> > 
> > > 		get_dquot_ref(dquot);
> >  		if (dquot->dq_flags & DQ_LOCKED)
> >  			wait_on_dquot(dquot);
> >  		if (dquot_dirty(dquot))
> >  			sb->dq_op->sync_dquot(dquot);
> > >		dqput(dquot);
> >  		goto restart;
> >  	}
> > 
> > 
> > best,
> > Herbert
> > 
> > 
> -- 
> Jan Kara <jack@suse.cz>
> SuSE CR Labs
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2003-10-25 17:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-25 16:26 Herbert Poetzl
2003-10-25 16:31 ` Jan Kara
2003-10-25 17:42   ` Herbert Poetzl [this message]
2003-10-28 23:40     ` Jan Kara
2003-11-05 20:36     ` Jan Kara

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=20031025174225.GB24020@DUK2.13thfloor.at \
    --to=herbert@13thfloor.at \
    --cc=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shadow@itt.net.ru \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®