that code that propagates snapshot rstat is buggy and
difficult to fix. (the main problem this code causes is
that snapshot rstat is always propagated to parent node,
which results large size of CInode:old_inodes).
Signed-off-by: Yan, Zheng <zyan@redhat.com>
merge-diff and status commands, --image-features and --image-shared
options, other stuff.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 356a749f63)
Instead of setting the HEAD image flag to indicate an invalid
object map, set the flag for the specific snapshot that is
invalid.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
http://developer.openstack.org/api-ref-objectstorage-v1.html says: "With COPY, you can add additional metadata to the object."
Fixes: #10662
Backport: hammer
Reported-by: Ahmad Faheem <ahmad.faheem@ril.com>
Signed-off-by: Dmytro Iurchenko <diurchenko@mirantis.com>
It's possible for an object map to be invalid only for
a snapshot, so allow snapshot flags to be updated. This
will also be required when rebuilding the object map and
clearing the invalid flag.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
We slip in an extraneous comma if { "rw": "rw" } happens to be the
first map_options pair:
# ./rbd map -o rw,share foo
/dev/rbd0
-> 127.0.0.1:6789 name=admin,key=client.admin,,share rbd foo -
The kernel mount options parser can handle it, but fix it nonetheless.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Allow supplying rbd map -o / --options through 'rbd default map
options' config option. Options specified on the command line take
precedence on a per-option basis, i.e. default and cli options are
merged with a preference for the latter. For example:
# grep 'rbd default map options' ceph.conf
rbd default map options = "ro,nocrc"
# ./rbd map -o noshare,rw foo
/dev/rbd0
results in a rw mapping with nocrc,noshare.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
For example:
# ./rbd map -o share,noshare foo
rbd: warning: redefining map option share: 'share' -> 'noshare'
/dev/rbd0
mount(8) doesn't do this and it's a bit silly to begin with. Drop this
in preparation for adding rbd default map options config option.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Since XioLoopbackConnection is a RefCountedObject, it can't be
an expanded member of XioMessenger.
Fixes cleanup/shutdown errors.
Signed-off-by: Matt Benjamin <matt@cohortfs.com>
(cherry picked from commit f5735b28d1)
For the write case when the oid.snap is CEPH_NOSNAP, the obc is created
in find_object_context, and missing_oid is setting to a NULL object.
Checking if the missing_oid is in the hit set is not the correct way
since it's NULL. Instead, we should check the obc->obs.oi.soid.
Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
Since XioLoopbackConnection is a RefCountedObject, it can't be
an expanded member of XioMessenger.
Fixes cleanup/shutdown errors.
Signed-off-by: Matt Benjamin <matt@cohortfs.com>
Just fixes linkage of dencoder in test. Fix the false assumption
that cls is only used if WITH_RADOSGW.
Signed-off-by: Matt Benjamin <matt@cohortfs.com>
In some cases, depending on the implementation or the operating system,
parted --machine -- /dev/sdh print
may contain empty lines. The current parsing code is fragile and highly
depends on output details. Replace it with code that basically does the
same sanity checks (output not empty, existence of units, existence of
the dev entry) but handles the entire output instead of checking line by
line.
http://tracker.ceph.com/issues/10983Fixes: #10983
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Fix for cppcheck issue:
Assignment of function parameter has no effect outside the function.
Remove assignment to need_to_wait before exit.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>