linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Liu Bo <bo.li.liu@oracle.com>
To: dsterba@suse.cz, Jeff Layton <jlayton@redhat.com>,
	Chris Mason <clm@fb.com>, Josef Bacik <jbacik@fb.com>,
	David Sterba <dsterba@suse.com>,
	linux-btrfs@vger.kernel.org, Jan Kara <jack@suse.cz>
Subject: Re: [PATCH] btrfs: btrfs_wait_tree_block_writeback can be void return
Date: Fri, 26 May 2017 12:49:25 -0700	[thread overview]
Message-ID: <20170526194925.GA7859@lim.localdomain> (raw)
In-Reply-To: <20170526170831.GF30842@twin.jikos.cz>

On Fri, May 26, 2017 at 07:08:31PM +0200, David Sterba wrote:
> On Thu, May 25, 2017 at 06:39:52AM -0400, Jeff Layton wrote:
> > Nothing checks its return value.
> 
> I think we don't need to check the return value of
> filemap_fdatawait_range, because the errors are tracked by other means
> (attached to the btree_inode mapping that represents the metadata), in
> set_btree_ioerr.
> 
> > Signed-off-by: Jeff Layton <jlayton@redhat.com>
> > Reviewed-by: Jan Kara <jack@suse.cz>
> > Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
> 
> To Liu Bo:
> 
> May I ask if you did a review that matches the above understanding? It's
> trivial to see that nothing really checks the return value of
> btrfs_wait_tree_block_writeback but my question is if it's really safe
> not to so. Thanks.

About the question if it's safe not to do so, I think yes, it's used in
walk_log_tree which is called in two places, free_log_tree and log replay.  For
free_log_tree, it waits for any running writeback of the extent buffer under
freeing to finish in case we need to access the eb pointer from page->private,
and it's OK to not check the return value, while for log replay, it's doesn't
wait because wc->wait is not set. So neither cares about the writeback error.

thanks,
-liubo

  reply	other threads:[~2017-05-26 19:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-25 10:39 [PATCH] btrfs: btrfs_wait_tree_block_writeback can be void return Jeff Layton
2017-05-26 17:08 ` David Sterba
2017-05-26 19:49   ` Liu Bo [this message]
2017-05-29 13:30     ` 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=20170526194925.GA7859@lim.localdomain \
    --to=bo.li.liu@oracle.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=dsterba@suse.cz \
    --cc=jack@suse.cz \
    --cc=jbacik@fb.com \
    --cc=jlayton@redhat.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).