if image feature EXCLUSIVE_LOCK is not enabled we should not try to
initialize the exclusive lock, or we may end with two async Contexts
to finish the same SetSnapRequest instance
Fixes: http://tracker.ceph.com/issues/15571
Signed-off-by: runsisi <runsisi@zte.com.cn>
this silences following warning
```
warning: cc1plus: command line option ‘-Wstrict-prototypes’ is valid for
C/ObjC but not for C++ [enabled by default]
```
* distutils pass "-DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes" to
compiler by default if OPT environment variable is not set. so we opt to
remove '-Wstrict-prototypes' as we are using c++ as the language of the
generated bindinging.
* also use "env" to pass the environment variables to avoid unnecessary
quote added by distutils, which just breaks the generated CLI command
line.
Signed-off-by: Kefu Chai <kchai@redhat.com>
when compiling python bindings, the included "pyconfig.h" also defines
some of the macros which are duplicated with our versions in acconfig.h.
so do not define them if they are already defined.
Signed-off-by: Kefu Chai <kchai@redhat.com>
it kills following warning:
```
/home/kefu/dev/ceph/src/os/filestore/FileStore.cc: In function
‘std::ostream& operator<<(std::ostream&, const
FileStore::OpSequencer&)’:
/home/kefu/dev/ceph/src/os/filestore/FileStore.cc:155:132: warning: the
compiler can assume that the address of ‘out’ will always evaluate to
‘true’ [-Waddress]
assert(&out);
```
Signed-off-by: Kefu Chai <kchai@redhat.com>
When do write-bench, if objectsize is smaller than blocksize. It will
casue "Floating point exception".
This because in bjBencher::write_bench:
>>if (data.op_size)
>> writes_per_object = data.object_size / data.op_size;
It make writes_per_object = 0;
......
>> name[i] = generate_object_name(i / writes_per_object);
i/0 cause Floating point exception.
If objectsize is smaller than blocksize, make blocksize is eqaul
objectsize.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
We have done sanity check with bucket_exists() above, so these
checks are redundant and less effcient.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
This is because get_bucket() never returns 0 on error,
it always returns a non-zero value. So if you
assert(get_bucket(item)), you always get a postive answer.
Replace existence check for a specific item
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Because get_rule() may return -ENOENT on error, we shall
use the IS_ERR macro to catch that, as all the other callers does.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Get_bucket() is supposed to return a pointer to a specific bucket on success.
However, it never returns a null pointer if error occurs. It returns
-ENOENT instead. That's why most caller is misjudge the result code of get_bucket()
method.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Link pointing in Monitor Quorum section to
ceph configuration file was broken.
Fixing it to point to configuration section.
Signed-off-by: Yatin Kumbhare yatinkumbhare@gmail.com
Because it was meant for Ubuntu 12.04 and it is installing directly
from PyPI on newer releases that aren't being built for 12.04
Signed-off-by: Alfredo Deza <adeza@redhat.com>
In spdk/pci.h spdk/nvme.h, it alread contain those code:
extern "C" {
So remove the duplicated code.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
`Pool Configuration` was mentioned previously but didn't contain any
info, adding this section and minor cosmetic changes to a few headings
after looking at the html view.
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>