When user is mounted a quota-restricted inode
as the root, report that inode's quota status
as the filesystem statistics in statfs.
This allows us to have a fairly convincing illusion
that someone has a filesystem to themselves, when
they're really mounting a restricted part of
the larger global filesystem.
Fixes: http://tracker.ceph.com/issues/15599
Signed-off-by: John Spray <john.spray@redhat.com>
* test_osd_bench: the injectargs call actually fails due to the spaces
at the beginning. so remove the spaces in args before sending it to
injectargs
* update/add some injectargs tests accordingly
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
the OPT_U32 options was translated using strict_si_cast<int>(), and then
cast the converted result to uint32_t. this could cause integer
underflow. we could have lifted the burden of checking invalid input
from the user of this option to the strict_si_cast<>() function. so in
this change, we use strict_si_cast<uint32_t>() instead, before casting
the converted value into `uint32_t`.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
we should release the osdmap reference once we are done with it,
otherwise we might need to wait very long to update that reference with
a newer osdmap ref. this appears to be an OSDMap leak: it is held by an
quiet OSD::Session forever.
the osdmap is not reset in OSD::session_notify_pg_create(), because its
only caller is wake_pg_waiters(), which will call
dispatch_session_waiting() later. and dispatch_session_waiting() will
check the session->osdmap, and will also reset the osdmap if
session->waiting_for_pg.empty().
Fixes: http://tracker.ceph.com/issues/13990
Signed-off-by: Kefu Chai <kchai@redhat.com>
not necessary to construct a entity_inst_t and then throw it away just
for extracting the entity_inst_t::name or entity_inst_t::addr.
Fixes: http://tracker.ceph.com/issues/13990
Signed-off-by: Kefu Chai <kchai@redhat.com>
this helps to free the resources referenced by the connection, among
other things, in the case of MOSDOp, the OSD::Session and OSDMap. this
helps to free the resource earlier and trim the osdmaps in time.
Fixes: http://tracker.ceph.com/issues/13990
Signed-off-by: Kefu Chai <kchai@redhat.com>
Fixes: http://tracker.ceph.com/issues/15886
Only add a rados object to the written_objs list if the write
was successful. Otherwise if the write will be canceled for some
reason, we'd remove an object that we didn't write to. This was
a problem in a case where there's multiple writes that went to
the same part. The second writer should fail the write, since
we do an exclusive write. However, we added the object's name
to the written_objs list anyway, which was a real problem when
the old processor was disposed (as it was clearing the objects).
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
A set of scripts used to bring up an OpenStack instance on one site,
connect a ceph cluster, add pools to store OpenStack glance images,
cinder volumes, nova vms, and cinder backups on rbd, and bring up a nova
compute node.
mon, osdmap: optimize check and cleanup of pg_temp for new osdmaps
Reviewed-by: xiexingguo <xie.xingguo@zte.com.cn>
Reviewed-by: Kefu Chai <kchai@redhat.com>
* Some CRUSH_TUNABLES$N references were false.
* The explanations concerning the warning when tunables are
non-optimal were false or confusing.
* Make the definition of the "default" profile clearer.
Signed-off-by: François Lafont <francois.lafont@ac-versailles.fr>
The function op_is_discardable introduces lock overhead which can
not be ignored.It would be better to judge if to discard op when
the connection disconnected as a parameter whether the network is
believable or extremely unlikelihood.
add g_conf osd_discard_disconnected_ops to control whether to
discard op when the connection disconnected
Waiting for test
Signed-off-by: ZhenyuLeng <lengzhenyu@ict.ac.cn>