From: Joel Becker <Joel.Becker@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 1/7] quota: Refactor dquot_transfer code so that OCFS2 can pass in its references
Date: Thu, 13 May 2010 16:44:24 -0700 [thread overview]
Message-ID: <20100513234424.GC13692@mail.oracle.com> (raw)
In-Reply-To: <1273780683-3638-2-git-send-email-jack@suse.cz>
On Thu, May 13, 2010 at 09:57:57PM +0200, Jan Kara wrote:
> Currently, __dquot_transfer() acquires its own references of dquot structures
> that will be put into inode. But for OCFS2, this creates a lock inversion
> between dq_lock (waited on in dqget) and transaction start (started in
> ocfs2_setattr). Currently, deadlock is impossible because dq_lock is acquired
> only during dquot_acquire and dquot_release and we already hold a reference to
> dquot structures in ocfs2_setattr so neither of these functions can be called
> while we call dquot_transfer. But this is rather subtle and it is hard to teach
> lockdep about it. So provide __dquot_transfer function that can be passed dquot
> references directly. OCFS2 can then pass acquired dquot references directly to
> __dquot_transfer with proper locking.
>
> Signed-off-by: Jan Kara <jack@suse.cz>
I like this patch. Very clean solution.
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:[~2010-05-13 23:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-13 19:57 [Ocfs2-devel] Quota locking fixes for OCFS2 Jan Kara
2010-05-13 19:57 ` [Ocfs2-devel] [PATCH 1/7] quota: Refactor dquot_transfer code so that OCFS2 can pass in its references Jan Kara
2010-05-13 23:44 ` Joel Becker [this message]
2010-05-13 19:57 ` [Ocfs2-devel] [PATCH 2/7] ocfs2: Do not map blocks from local quota file on each write Jan Kara
2010-05-13 23:44 ` Joel Becker
2010-05-14 8:06 ` Jan Kara
2010-05-13 19:57 ` [Ocfs2-devel] [PATCH 3/7] ocfs2: Avoid unnecessary block mapping when refreshing quota info Jan Kara
2010-05-13 19:58 ` [Ocfs2-devel] [PATCH 4/7] ocfs2: Fix quota locking Jan Kara
2010-05-13 19:58 ` [Ocfs2-devel] [PATCH 5/7] ocfs2: Fix estimate of credits needed for quota allocation Jan Kara
2010-05-13 19:58 ` [Ocfs2-devel] [PATCH 6/7] ocfs2: Fix NULL pointer deref when writing local dquot Jan Kara
2010-05-13 19:58 ` [Ocfs2-devel] [PATCH 7/7] ocfs2: Use __dquot_transfer to avoid lock inversion Jan Kara
2010-05-13 23:51 ` [Ocfs2-devel] Quota locking fixes for OCFS2 Joel Becker
2010-05-14 8:08 ` Jan Kara
2010-05-14 19:36 ` Joel Becker
2010-05-17 16:18 ` Jan Kara
2010-05-17 19:17 ` Joel Becker
2010-05-17 21:30 ` 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=20100513234424.GC13692@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.