From: Jan Kara <jack@suse.cz>
To: xfs@oss.sgi.com
Cc: sandeen@redhat.com, dchinner@redhat.com
Subject: Are two transactions running in parallel OK?
Date: Thu, 17 May 2012 22:08:31 +0200 [thread overview]
Message-ID: <20120517200831.GB23231@quack.suse.cz> (raw)
Hello,
I've been into a source of lockdep warning I got with XFS when testing my
filesystem freezing patches. The culprit seems to be that when doing direct
IO, XFS starts a transaction in xfs_setfilesize_trans_alloc() and attaches
that transaction to endio structure. Then it goes on and starts another
transaction in xfs_iomap_write_direct() which creates a possible deadlock
with filesystem freezing (if the second transaction start happens after we
start blocking new transactions, it gets blocked, but the first transaction
isn't ever completed).
So first I wanted to ask whether my analysis is correct. If yes, I was also
wondering whether this cannot cause a deadlock (at least in theory) if the
second transaction would block waiting for log space but we couldn't
possibly free enough of it due to the first transaction being held open?
If freezing deadlock is the only problem with this code, then I guess we
could avoid waiting for filesystem freezing when starting the second
transaction (although it might end up being rather ugly). Or if anyone else
has other idea how to solve this, I'm listening ;).
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2012-05-17 20:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-17 20:08 Jan Kara [this message]
2012-05-18 10:28 ` Are two transactions running in parallel OK? Dave Chinner
2012-05-18 13:21 ` 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=20120517200831.GB23231@quack.suse.cz \
--to=jack@suse.cz \
--cc=dchinner@redhat.com \
--cc=sandeen@redhat.com \
--cc=xfs@oss.sgi.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