linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@oracle.com>
To: btrfs-devel@oss.oracle.com
Cc: Sage Weil <sage@newdream.net>, linux-btrfs@vger.kernel.org
Subject: Re: [Btrfs-devel] transaction ioctls
Date: Tue, 22 Apr 2008 16:32:34 -0400	[thread overview]
Message-ID: <200804221632.34654.chris.mason@oracle.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0804221210130.23551@cobra.newdream.net>

On Tuesday 22 April 2008, Sage Weil wrote:
> Hi Chris,
>
> These ioctls let a user application hold a transaction open while it
> performs a series of operations.  A final ioctl does a sync on the fs
> (closing the current transaction).  This is the main requirement for
> Ceph's OSD to be able to keep the data it's storing in a btrfs volume
> consistent, and AFAICS it works just fine.  The application would do
> something like
>

I'm definitely willing to include it for you to experiment with.  Holding a 
transaction from userland can indeed lead to deadlock, but in this case your 
userland basically owns the server anyway.  I'm worried about some nasty 
corner cases still, but btrfs is blissfully ignoring those right now anyway.

One problem will be operations that are basically boundless (truncating a 
file, large writes).  Eventually the ENOSPC support will hook into the 
transaction system to make sure a given operation reserves enough free space.

With your ioctls, the "do a bunch of stuff" will need to honor the same 
accounting rules as the kernel code (which don't exist yet).

I thought your original plan was to do all of this from userland (without a 
kernel filesystem at all)?  The btrfs progs share most of the same code with 
the kernel, so with a little love to the transaction and IO subsystems, you'd 
be able to use it as a library style DB.

-chris

  parent reply	other threads:[~2008-04-22 20:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.64.0804221210130.23551@cobra.newdream.net>
2008-04-22 20:29 ` [Btrfs-devel] transaction ioctls Zach Brown
2008-04-22 20:41   ` Chris Mason
2008-04-22 20:52     ` Sage Weil
2008-04-22 20:55       ` Chris Mason
2008-04-22 20:56         ` Sage Weil
2008-04-22 21:05         ` Evgeniy Polyakov
2008-04-23 12:50           ` Chris Mason
2008-04-23 12:57             ` Evgeniy Polyakov
2008-04-23 13:07               ` Chris Mason
2008-04-23 13:15                 ` Evgeniy Polyakov
2008-04-23 13:23                   ` Chris Mason
     [not found]                   ` <200804230923.03752.chris.mason@oracle.com>
2008-04-23 16:21                     ` Evgeniy Polyakov
2008-04-23 17:15                       ` Chris Mason
2008-04-23 23:52                     ` Bron Gondwana
2008-04-24 13:06                       ` Chris Mason
     [not found]                       ` <200804240906.54788.chris.mason@oracle.com>
2008-04-27 10:55                         ` Bron Gondwana
2008-04-23 17:12                 ` btrfs-devel
2008-04-22 20:32 ` Chris Mason [this message]
2008-04-22 20:48   ` 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=200804221632.34654.chris.mason@oracle.com \
    --to=chris.mason@oracle.com \
    --cc=btrfs-devel@oss.oracle.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;
as well as URLs for NNTP newsgroup(s).