On 06/13/2017 12:14 AM, David Sterba wrote:
On Fri, Jun 09, 2017 at 02:52:28PM +0800, Anand Jain wrote:
Commit
9035b5dbc576 btrfs: btrfs_io_bio_alloc never fails, skip error handling
removed the -ENOMEM return from write_dev_flush() so no need to
check for the -ENOMEM during send.
This patch also peals write_dev_flush's wait part of the code,
and creates a new function wait_dev_flush().
"This patch also" usually means that the patch should be split.
/*
- * trigger flushes for one the devices. If you pass wait == 0, the flushes are
- * sent down. With wait == 1, it waits for the previous flush.
- *
- * any device where the flush fails with eopnotsupp are flagged as not-barrier
- * capable
+ * trigger flushes for one the devices.
In the patch that splits write_dev_flush, please use the following
comment wording:
* Submit a flush request to the device if it supports it. Error handling is
* done in the waiting counterpart.
*/
-static int write_dev_flush(struct btrfs_device *device, int wait)
+static void write_dev_flush(struct btrfs_device *device)
and
/*
* If the flush bio has been submitted by write_dev_flush, wait for it.
*/
+static int wait_dev_flush(struct btrfs_device *device)
+{
But otherwise the cleanup is good.
Done. V2 has been sent out.
Thanks for the review.
-Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html