From: Chris Mason <chris.mason@oracle.com>
To: Andrey Kuzmin <andrey.v.kuzmin@gmail.com>
Cc: Sage Weil <sage@newdream.net>, linux-btrfs@vger.kernel.org
Subject: Re: [RFC] big fat transaction ioctl
Date: Wed, 11 Nov 2009 10:55:08 -0500 [thread overview]
Message-ID: <20091111155508.GE5566@think> (raw)
In-Reply-To: <2a31deca0911110741xb3529cbi982d982ef171de9f@mail.gmail.com>
On Wed, Nov 11, 2009 at 06:41:06PM +0300, Andrey Kuzmin wrote:
> >> I hadn't looked into this before, but I think the snapshots could =
be used
> >> to achieve both atomicity and rollback. =A0If userspace uses an rw=
mutex to
> >> quiesce writes, it can make sure all transactions complete before =
creating
> >> a snapshot (commit). =A0The problem with this currently is the cre=
ate
> >> snapshot ioctl is relatively slow... it calls commit_transaction, =
which
> >> blocks until everything reaches disk. =A0I think to perform well t=
his
> >> approach would need a hook to start a commit and then return as so=
on as it
> >> can guarantee than any subsequent operation's start_transaction ca=
n't join
> >> in that commit.
> >>
> >> This may be a better way to go about this, though. =A0Does that so=
und
> >> reasonable, Chris?
> >
> > Yes, we could do this, but I don't think it will perform very well
> > compared to your multi-operation ioctl. =A0It really does depend on=
how
> > often you need to do atomic ops (my guess is very).
> >
> > Honestly you'll get better performance with a simple write-ahead lo=
g
> > from userland:
>=20
> Write-ahead logging is necessary anyway if the aim is to provide
> transactional semantics to an application.
Sage's big fat ioctl does provide the subset of transactional semantics
that ceph (and many other apps) require. In this case, they just want
to know that a given set of operations will happen together.
> But, at the same time, w/o
> snapshot there is no synchronization between the log and file-system
> state.
Synchronizing the log and the filesystem state happens when the
application starts up after the crash (either app crash or system
crash). The application would be in charge of applying the log to its
own files to get the system into whatever state the app thinks is
consistent.
-chris
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
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:[~2009-11-11 15:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-10 20:12 [RFC] big fat transaction ioctl Sage Weil
2009-11-10 20:44 ` Andrey Kuzmin
2009-11-10 22:13 ` Sage Weil
2009-11-11 0:49 ` Jeremy Fitzhardinge
2009-11-11 5:15 ` Sage Weil
2009-11-11 15:03 ` Chris Mason
2009-11-11 15:41 ` Andrey Kuzmin
2009-11-11 15:55 ` Chris Mason [this message]
2009-11-11 17:19 ` Sage Weil
2009-11-12 3:56 ` Andrey Kuzmin
2009-11-11 14:54 ` Chris Mason
2009-11-11 18:22 ` Zach Brown
2009-11-11 22:22 ` Sage Weil
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=20091111155508.GE5566@think \
--to=chris.mason@oracle.com \
--cc=andrey.v.kuzmin@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=sage@newdream.net \
/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