public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Ross Zwisler <ross.zwisler-VuQAYsv1563Yd54FQh9/CA@public•gmane.org>
To: Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public•gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public•gmane.org
Cc: Jan Kara <jack-AlSwsSmVLrQ@public•gmane.org>,
	"Darrick J. Wong"
	<darrick.wong-QHcLZuEGTsvQT0dZR+AlfA@public•gmane.org>,
	Matthew Wilcox <mawilcox-0li6OtcxBFHby3iVrkZq2A@public•gmane.org>,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public•gmane.org,
	linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public•gmane.org,
	linux-next-u79uwXL29TY76Z2rM5mHXA@public•gmane.org,
	Alexander Viro
	<viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public•gmane.org>,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public•gmane.org,
	Christoph Hellwig <hch-jcswGhMUV9g@public•gmane.org>
Subject: [PATCH] dax: fix regression in dax_writeback_mapping_range()
Date: Tue, 14 Mar 2017 15:53:58 -0600	[thread overview]
Message-ID: <20170314215358.31451-1-ross.zwisler@linux.intel.com> (raw)
In-Reply-To: <20170314025642.nwpf7zxbc6655gum-E9dkjZ7ERC1QcClZ3XN9yxcY2uh10dtjAL8bYrjMMd8@public.gmane.org>

commit 354ae7432ee8 ("dax: add tracepoints to dax_writeback_mapping_range()")
in the -next tree, which appears in next-20170310, inadvertently changed
dax_writeback_mapping_range() so that it could end up returning a positive
value: the number of bytes flushed, as returned by dax_writeback_one().
This was incorrect. This function either needs to return a negative error
value, or zero on success.

This change was causing xfstest failures, as reported by Xiong:

https://lkml.org/lkml/2017/3/13/1220

With this fix applied to next-20170310, all the test failures reported by
Xiong (generic/075 generic/112 generic/127 generic/231 generic/263) are
resolved.

Reported-by: Xiong Zhou <xzhou-H+wXaHxf7aLQT0dZR+AlfA@public•gmane.org>
Signed-off-by: Ross Zwisler <ross.zwisler-VuQAYsv1563Yd54FQh9/CA@public•gmane.org>
---
 fs/dax.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/dax.c b/fs/dax.c
index 1861ef0..60688c7 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -907,7 +907,7 @@ int dax_writeback_mapping_range(struct address_space *mapping,
 	}
 out:
 	trace_dax_writeback_range_done(inode, start_index, end_index);
-	return ret;
+	return (ret < 0 ? ret : 0);
 }
 EXPORT_SYMBOL_GPL(dax_writeback_mapping_range);
 
-- 
2.9.3

      parent reply	other threads:[~2017-03-14 21:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-14  2:56 fsx tests on DAX started to fail with msync failure on 0307 -next tree Xiong Zhou
2017-03-14 17:36 ` Ross Zwisler
     [not found]   ` <20170314173609.GA13885-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-03-16 15:53     ` Ross Zwisler
     [not found] ` <20170314025642.nwpf7zxbc6655gum-E9dkjZ7ERC1QcClZ3XN9yxcY2uh10dtjAL8bYrjMMd8@public.gmane.org>
2017-03-14 21:53   ` Ross Zwisler [this message]

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=20170314215358.31451-1-ross.zwisler@linux.intel.com \
    --to=ross.zwisler-vuqaysv1563yd54fqh9/ca@public$(echo .)gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public$(echo .)gmane.org \
    --cc=darrick.wong-QHcLZuEGTsvQT0dZR+AlfA@public$(echo .)gmane.org \
    --cc=hch-jcswGhMUV9g@public$(echo .)gmane.org \
    --cc=jack-AlSwsSmVLrQ@public$(echo .)gmane.org \
    --cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
    --cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public$(echo .)gmane.org \
    --cc=linux-next-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
    --cc=linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public$(echo .)gmane.org \
    --cc=mawilcox-0li6OtcxBFHby3iVrkZq2A@public$(echo .)gmane.org \
    --cc=viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public$(echo .)gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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