]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd/cache: Fix scoping issue with lambda capture renaming 36480/head
authorWillem Jan Withagen <wjw@digiware.nl>
Wed, 5 Aug 2020 19:04:11 +0000 (19:04 +0000)
committerWillem Jan Withagen <wjw@digiware.nl>
Thu, 6 Aug 2020 16:16:18 +0000 (16:16 +0000)
commit678a3154c8f0bae41a62cae7e4ebb0313269e11a
tree02b967ac8310d178120678cc392426d07f66caad
parentfc7a6ef79af68f744ab0a01b39adc3a3dfacd518
librbd/cache: Fix scoping issue with lambda capture renaming

Clang complains:
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:97:66: error: 'object_off' in capture list does not name a variable
   ([this, read_data, dispatch_result, on_dispatched, object_no, object_off,
                                                                 ^
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:98:6: error: 'object_len' in capture list does not name a variable
     object_len, snap_id, &parent_trace](ObjectCacheRequest* ack) {
     ^
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:99:41: error: reference to local binding 'object_off' declared in enclosing function 'librbd::cache::ParentCacheObjectDispatch::read'
      handle_read_cache(ack, object_no, object_off, object_len, snap_id,
                                        ^
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:81:9: note: 'object_off' declared here
  auto [object_off, object_len] = extents.front();
        ^
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:99:53: error: reference to local binding 'object_len' declared in enclosing function 'librbd::cache::ParentCacheObjectDispatch::read'
      handle_read_cache(ack, object_no, object_off, object_len, snap_id,
                                                    ^
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:81:21: note: 'object_len' declared here
  auto [object_off, object_len] = extents.front();
                    ^
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:99:41: error: reference to local binding 'object_off' declared in enclosing function 'librbd::cache::ParentCacheObjectDispatch<librbd::ImageCtx>::read'
      handle_read_cache(ack, object_no, object_off, object_len, snap_id,
                                        ^
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:242:31: note: in instantiation of member function 'librbd::cache::ParentCacheObjectDispatch<librbd::ImageCtx>::read' requested here
template class librbd::cache::ParentCacheObjectDispatch<librbd::ImageCtx>;
                              ^
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:81:9: note: 'object_off' declared here
  auto [object_off, object_len] = extents.front();
        ^
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:99:53: error: reference to local binding 'object_len' declared in enclosing function 'librbd::cache::ParentCacheObjectDispatch<librbd::ImageCtx>::read'
      handle_read_cache(ack, object_no, object_off, object_len, snap_id,
                                                    ^
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:81:21: note: 'object_len' declared here
  auto [object_off, object_len] = extents.front();
                    ^
6 errors generated.

fixes: https://github.com/ceph/ceph/pull/36145
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/librbd/cache/ParentCacheObjectDispatch.cc