1    	// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2    	// vim: ts=8 sw=2 smarttab
3    	
4    	#ifndef LIBRBD_IO_ASYNC_OPERATION_H
5    	#define LIBRBD_IO_ASYNC_OPERATION_H
6    	
7    	#include "include/ceph_assert.h"
8    	#include "include/xlist.h"
9    	#include <list>
10   	
11   	class Context;
12   	
13   	namespace librbd {
14   	
15   	class ImageCtx;
16   	
17   	namespace io {
18   	
19   	class AsyncOperation {
20   	public:
21   	
22   	  AsyncOperation()
23   	    : m_image_ctx(NULL), m_xlist_item(this)
24   	  {
25   	  }
26   	
(1) Event exn_spec_violation: An exception of type "_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINSt8ios_base7failureB5cxx11EEEEE" is thrown but the throw list "throw()" doesn't allow it to be thrown. This will cause a call to unexpected() which usually calls terminate().
Also see events: [fun_call_w_exception]
27   	  ~AsyncOperation()
28   	  {
(2) Event fun_call_w_exception: Called function throws an exception of type "_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINSt8ios_base7failureB5cxx11EEEEE". [details]
Also see events: [exn_spec_violation]
29   	    ceph_assert(!m_xlist_item.is_on_list());
30   	  }
31   	
32   	  inline bool started() const {
33   	    return m_xlist_item.is_on_list();
34   	  }
35   	
36   	  void start_op(ImageCtx &image_ctx);
37   	  void finish_op();
38   	
39   	  void flush(Context *on_finish);
40   	
41   	private:
42   	
43   	  ImageCtx *m_image_ctx;
44   	  xlist<AsyncOperation *>::item m_xlist_item;
45   	  std::list<Context *> m_flush_contexts;
46   	
47   	};
48   	
49   	} // namespace io
50   	} // namespace librbd
51   	
52   	#endif // LIBRBD_IO_ASYNC_OPERATION_H
53