From: Radoslaw Zarzynski Date: Wed, 5 Aug 2020 15:40:14 +0000 (-0400) Subject: crimson/osd: adapt to the new interface of seastar::make_file_output_stream(). X-Git-Tag: v16.1.0~1424^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c155464f6a12e942a741fccf275c4d5aee67bc7d;p=ceph.git crimson/osd: adapt to the new interface of seastar::make_file_output_stream(). Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/crimson/common/buffer_io.cc b/src/crimson/common/buffer_io.cc index 0e436d98b59a..86edf7a6f526 100644 --- a/src/crimson/common/buffer_io.cc +++ b/src/crimson/common/buffer_io.cc @@ -22,16 +22,19 @@ seastar::future<> write_file(ceph::buffer::list&& bl, foo.create_permissions = permissions; return seastar::open_file_dma(fn, flags, foo).then( [bl=std::move(bl)](seastar::file f) { - return seastar::do_with(seastar::make_file_output_stream(f), - std::move(f), - std::move(bl), - [](seastar::output_stream& out, - seastar::file& f, - ceph::buffer::list& bl) { - return seastar::do_for_each(bl.buffers(), [&out](auto& buf) { - return out.write(buf.c_str(), buf.length()); - }).then([&out] { - return out.close(); + return seastar::make_file_output_stream(f).then( + [bl=std::move(bl), f=std::move(f)](seastar::output_stream out) { + return seastar::do_with(std::move(out), + std::move(f), + std::move(bl), + [](seastar::output_stream& out, + seastar::file& f, + ceph::buffer::list& bl) { + return seastar::do_for_each(bl.buffers(), [&out](auto& buf) { + return out.write(buf.c_str(), buf.length()); + }).then([&out] { + return out.close(); + }); }); }); });