linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fb.com>
To: <bo.li.liu@oracle.com>
Cc: <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] Btrfs: deal with error on secondary log properly
Date: Wed, 26 Aug 2015 15:06:21 -0400	[thread overview]
Message-ID: <55DE0E2D.6000001@fb.com> (raw)
In-Reply-To: <20150826020609.GB5614@localhost.localdomain>

On 08/25/2015 10:06 PM, Liu Bo wrote:
> On Tue, Aug 25, 2015 at 01:09:43PM -0400, Josef Bacik wrote:
>> If we have an fsync at the same time in two seperate subvolumes we could end up
>> with the tree log pointing at invalid blocks.  We need to notice if our writeout
>
> Mind to share more details of the problem?
>

It's the problem Filipe was trying to solve.  Say we fsync() on two 
different subvols, one of them will race in and be the one who commits 
the log root tree.  So process A waits on process B to add its log to 
the log root tree and write out its log.  If we get an IO error while 
writing out the log the log root tree will be pointing to invalid crap, 
and we also won't return an error back to userspace.  We need to notice 
if there was an error, turn on the transaction commit stuff since we've 
already updated the the log root tree with our subvol log so we don't 
get garbage on the disk, and we need to return an error to process B. 
Thanks,

Josef


  reply	other threads:[~2015-08-26 19:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-25 17:09 [PATCH] Btrfs: deal with error on secondary log properly Josef Bacik
2015-08-26  2:06 ` Liu Bo
2015-08-26 19:06   ` Josef Bacik [this message]
2015-08-28 13:23     ` Filipe David Manana
2015-08-28 13:54       ` Josef Bacik
2015-08-28  2:45 ` Liu Bo

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=55DE0E2D.6000001@fb.com \
    --to=jbacik@fb.com \
    --cc=bo.li.liu@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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).