All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 3/3] btrfs: Check read-only status of roots during send
Date: Tue, 17 Dec 2013 14:09:55 +0100	[thread overview]
Message-ID: <20131217130955.GL6498@suse.cz> (raw)
In-Reply-To: <52B03C60.6060007@cn.fujitsu.com>

On Tue, Dec 17, 2013 at 07:58:24PM +0800, Wang Shilong wrote:
> Nice work, Before this patch for btrfs send.
> we have to join a transaction to avoid commit root changed.

That sounds like a good improvement.

> I send a plus patch that remove transaction protection from btrfs send.
> and  a little comment below.
> 
> [...]
> On 12/17/2013 12:34 AM, David Sterba wrote:
> >All the subvolues that are involved in send must be read-only during the
> >  s via SUBVOL_SETFLAGS
> >+	 */
> >+	int send_in_progress;
> 
> Why not use u32 here?

The int type should be enough to hold refs for all running sends, if
this is your concern.

I thought it's a refcount, it should not go below 0 but if it does, then
it should be caught. I'll update the patch to check if send_in_progress
is not negative after the decrements.

thanks,
david

  reply	other threads:[~2013-12-17 13:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-16 16:34 [PATCH 0/3] Send: minor cleanups, add RO checks David Sterba
2013-12-16 16:34 ` [PATCH 1/3] btrfs: send: clean up dead code David Sterba
2013-12-16 16:34 ` [PATCH 2/3] btrfs: remove unused mnt from send_ctx David Sterba
2013-12-16 16:34 ` [PATCH 3/3] btrfs: Check read-only status of roots during send David Sterba
2013-12-17 11:58   ` Wang Shilong
2013-12-17 13:09     ` David Sterba [this message]
2013-12-17 14:07 ` David Sterba

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=20131217130955.GL6498@suse.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wangsl.fnst@cn.fujitsu.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.