From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2] gfs2: fix quota refresh race in do_glock()
Date: Wed, 8 Apr 2015 10:38:47 -0400 (EDT) [thread overview]
Message-ID: <2112922455.11924800.1428503927117.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1428428893-53810-1-git-send-email-adas@redhat.com>
----- Original Message -----
> quotad periodically syncs in-memory quotas to the ondisk quota file
> and sets the QDF_REFRESH flag so that a subsequent read of a synced
> quota is re-read from disk.
>
> gfs2_quota_lock() checks for this flag and sets a 'force' bit to
> force re-read from disk if requested. However, there is a race
> condition here. It is possible for gfs2_quota_lock() to find the
> QDF_REFRESH flag unset (i.e force=0) and quotad comes in immediately
> after and syncs the relevant quota and sets the QDF_REFRESH flag.
> gfs2_quota_lock() resumes with force=0 and uses the stale in-memory
> quota usage values that result in miscalculations.
>
> This patch fixes this race by moving the check for the QDF_REFRESH
> flag check further out into the gfs2_quota_lock() process, i.e, in
> do_glock(), under the protection of the quota glock.
>
> Resolves: rhbz#1174295
> Signed-off-by: Abhi Das <adas@redhat.com>
> ---
Hi,
ACK
I pushed this patch to the for-next branch of the linux-gfs2 tree.
Regards,
Bob Peterson
Red Hat File Systems
prev parent reply other threads:[~2015-04-08 14:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-07 17:48 [Cluster-devel] [GFS2] gfs2: fix quota refresh race in do_glock() Abhi Das
2015-04-08 10:01 ` Steven Whitehouse
2015-04-08 14:38 ` Bob Peterson [this message]
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=2112922455.11924800.1428503927117.JavaMail.zimbra@redhat.com \
--to=rpeterso@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).