From: "Jörn Engel" <joern@lazybastard.org>
To: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: Race between __sync_single_inode() and LogFS garbage collector
Date: Mon, 19 Feb 2007 23:23:51 +0000 [thread overview]
Message-ID: <20070219232351.GG7813@lazybastard.org> (raw)
In-Reply-To: <1171926356.9771.34.camel@kleikamp.austin.ibm.com>
On Mon, 19 February 2007 17:05:55 -0600, Dave Kleikamp wrote:
>
> It'd be nice if you could drop s_w_mutex when the garbage collector
> calls i_get().
Not possible. Garbage collection only happens when space is getting
tight. At that moment all writes must be serialized or this race will
be the least of my problems. :(
> Otherwise, you may be able to call ilookup5_nowait() in the garbage
> collector, and skip that inode if I_LOCK is set.
Also not possible. I cannot skip that inode, or again this race will be
a minor problem. The inode exists on the medium and I must get it by
some means. Re-reading it from the medium is fine, writing is not and
waiting for the write to happen brings me back to square one.
It is a nasty problem that has been haunting me for about a year now.
For a while I tried ilookup5_nowait() and just used the inode in spite
of the lock. But that will explode spectacularly when racing against
generic_drop_inode().
Double-caching or a common lock seem to be the only solutions.
Jörn
--
My second remark is that our intellectual powers are rather geared to
master static relations and that our powers to visualize processes
evolving in time are relatively poorly developed.
-- Edsger W. Dijkstra
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2007-02-19 23:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-19 21:31 Race between __sync_single_inode() and LogFS garbage collector Jörn Engel
2007-02-19 23:05 ` Dave Kleikamp
2007-02-19 23:23 ` Jörn Engel [this message]
2007-02-20 3:06 ` Dave Kleikamp
2007-02-20 10:50 ` Jörn Engel
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=20070219232351.GG7813@lazybastard.org \
--to=joern@lazybastard.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=shaggy@linux.vnet.ibm.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).