* refs/pull/28293/head:
mds: avoid passing null to SessionmMap::hit_session()
qa/cephfs: add test for blacklisted client eviction
mds: fix 'is session in blacklist' check in Server::apply_blacklist()
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
* refs/pull/28433/head:
cephfs-shell: Remove unnecessary empty line
cephfs-shell: Fix flake8 bare 'except' warnings
cephfs-shell: Remove unused variable 'e'
cephfs-shell: Fix flake8 use != to compare str literals warning
cephfs-shell: Fixe flake8 line too long error
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Kefu Chai [Thu, 6 Jun 2019 02:58:35 +0000 (10:58 +0800)]
debian/: add ceph-crimson-osd package
this package is commented out using `# Crimson`. and it will be enabled
only if we are building "crimson" flavor builds.
this package depends on ceph-osd, because it'll basically be a drop-in
replacement of ceph-osd. and it shares all the dependencies of ceph-osd.
so let's just reuse ceph-osd package for now.
Kefu Chai [Thu, 6 Jun 2019 03:10:41 +0000 (11:10 +0800)]
install-deps.sh: populate WITH_SEASTAR in the same way as for_make_check
because `install-deps.sh` is executed using `source`, we have to pass
these options using env variables. but before this change, `WITH_SEASTAR` is used directly,
while `FOR_MAKE_CHECK` is checked and translated to a local variable
`for_make_check`. which, in my opinion, has better readability.
so, in this change, `WITH_SEASTAR` is translated to `with_seastar`
variable in `install-deps.sh`.
Matt Benjamin [Thu, 6 Jun 2019 20:54:43 +0000 (16:54 -0400)]
rgw_file: permit lookup_handle to lookup root_fh
Originally, root_fh was reachable from RGWLibFS::fh_cache, but
this was problematic as it has infinite lifetime and so is not
present in RGWLibFS::fs_lru.
To fix the above, RGWLibFS::root_fh came to live unhooked from the
handle caches which works because nfs-ganesha/the application
always has an instance handle. However, this silently breaks
READDIR event invalidation.
Fixes: https://tracker.ceph.com/issues/40196 Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Sage Weil [Thu, 6 Jun 2019 17:14:49 +0000 (12:14 -0500)]
Merge PR #28363 into master
* refs/pull/28363/head:
osd/ClassHandler: use std::variant for storing func
osd/ClassHandler: no need to add `struct` before struct type
osd/ClassHandler: use ceph::mutex instead of Mutex
osd/ClassHandler: remove unused function
osd/ClassHandler: s/string/std::string/ in header
Reviewed-by: Samuel Just <sjust@redhat.com> Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Zhi Zhang [Thu, 6 Jun 2019 03:32:34 +0000 (11:32 +0800)]
mds: count purge queue items left in journal
MDS purge queue didn't have a perf counter to record how many items
still left in journal. Even when MDS restarted, there was no any hint to
know how many inodes haven't been really deleted from disks.
xie xingguo [Mon, 3 Jun 2019 08:43:25 +0000 (16:43 +0800)]
test: add parallel clean_pg_upmaps test
With parallel clean_pg_upmaps feature on, the total time cost
of the performance test which now can utilize up to 8 threads for
parallel upmap validating decreased from:
Note that by default the mon uses only 4 worker threads for
CPU intensive background work, you could further increase
the "mon_cpu_threads" option value if you decided the
time-consuming of clean_pg_upmaps still matters.
xie xingguo [Mon, 3 Jun 2019 08:10:22 +0000 (16:10 +0800)]
mon/OSDMonitor: do clean_pg_upmaps the parallel way if necessary
There could definitely be some certain cases we could reliably
skip this kind of checking, but there is no easy way to separate
those out.
However, this is clearly the general way to do the massive pg
upmap clean-up job more efficiently and hence should make sense
in all cases.
Jeff Layton [Mon, 3 Jun 2019 14:55:37 +0000 (10:55 -0400)]
msg: fix addr2 encoding for sockaddrs
Currently, the sockaddr sa_family field is being sent across the wire
without any sort of endianness conversion.
Redefine the new-style entity_addr_t encoding to encode the sa_family
field as little-endian. This will allow LE machines in the field to
keep limping along, but note that BE machines may break until they are
all fixed.
To do this, use the code that was initially written for BSD/Apple
machines to encode the different fields separately.
Fixes: http://tracker.ceph.com/issues/40114 Signed-off-by: Jeff Layton <jlayton@redhat.com>
Mike Christie [Tue, 14 May 2019 03:57:41 +0000 (22:57 -0500)]
rbd nbd: add support for netlink interface
This adds support for mapping and unmapping using the netlink
interface. If the user passes in --try-netlink during mapping then we
will try to use the netlink interface and if that is not supported use
the ioctl interface. For unmap we will always try netlink and if that is
not supported drop down to the ioctl.
Signed-off-by: Mike Christie <mchristi@redhat.com>
Mike Christie [Wed, 5 Jun 2019 04:42:40 +0000 (23:42 -0500)]
cmake and build: add netlink lib requirement detection
The next patch adds netlink support to rbd-nbd. This patch just adds the
build related changes to bring in the netlink lib and test and build
against it.
Signed-off-by: Mike Christie <mchristi@redhat.com>
Mike Christie [Tue, 4 Jun 2019 18:32:09 +0000 (13:32 -0500)]
cmake: Move WITH_RBD option earlier
The next patch will add a WITH_RBD check to the LINUX check block so we
only check for the netlink libs when those 2 conditions are met, so this
moves the WIT_RBD option setup to before the LINUX check.
Signed-off-by: Mike Christie <mchristi@redhat.com>
Mike Christie [Tue, 30 Apr 2019 22:24:07 +0000 (17:24 -0500)]
rbd nbd: Add cond to signal nbd disconnection
With the ioctl interface we know when a disconnect has been executed
because the NBD_DO_IO ioctl will return. The netlink interface returns
after the nl connect cmd call has completed, so this patch adds a cond
that signals when a nl disconnect/NBD_DISCONNECT has been executed and
the server thread has handled the resulting NBD_CMD_DISC.
Signed-off-by: Mike Christie <mchristi@redhat.com>
Mike Christie [Wed, 1 May 2019 01:14:31 +0000 (20:14 -0500)]
rbd nbd: move server startup code to function
The netlink connect cmd interface requires the server to be running when
the connect call completes or commands will timeout/fail. This breaks the
server code to 2 functions so we can control when it starts and runs.
Right now it looks odd in that start_server will allocate and return
the server only for it be freed after run, and it is not touched. The
netlink enablement patch at the end will use the returned server.
Signed-off-by: Mike Christie <mchristi@redhat.com>
xie xingguo [Wed, 5 Jun 2019 02:41:52 +0000 (10:41 +0800)]
osd/OSDMapMapping: make ParallelPGMapper can accept input pgs
The existing "prime temp" machinism is a good inspiration
for cluster with a large number of pgs that need to do various
calculations quickly.
I am planning to do the upmap tidy-up work the same way, hence
the need for an alternate way of specifying pgs to process other
than taking directly from the map.