]>
git.apps.os.sepia.ceph.com Git - ceph.git/log
Patrick Donnelly [Wed, 29 Jun 2016 19:45:30 +0000 (15:45 -0400)]
client: add missing client_lock for get_root
A segmentation fault was observed in a recent test failure
(test_client_cache_size) [1]. An analysis of the core dump revealed that the
client->root inode was NULL. The client log [2] showed that the root inode was
deleted prior to the segfault:
2016-06-27 14:24:13.358500
7fe75cff9700 20 client.4161 _ll_put 0x7fe76000ba40
100000003e9 1 -> 0
2016-06-27 14:24:13.358502
7fe75cff9700 10 client.4161 put_inode on
100000003e9 .head(faked_ino=0 ref=1 ll_ref=0 cap_refs={} open={} mode=41777 size=0/0 mtime=2016-06-27 14:24:10.700562 caps=pAsLsXsFs(0=pAsLsXsFs) 0x7fe76000ba40)
2016-06-27 14:24:13.358513
7fe75cff9700 15 inode.put on 0x7fe76000ba40
100000003e9 .head now 0
2016-06-27 14:24:13.358515
7fe75cff9700 10 client.4161 remove_cap mds.0 on
100000003e9 .head(faked_ino=0 ref=0 ll_ref=0 cap_refs={} open={} mode=41777 size=0/0 mtime=2016-06-27 14:24:10.700562 caps=pAsLsXsFs(0=pAsLsXsFs) 0x7fe76000ba40)
2016-06-27 14:24:13.358538
7fe75cff9700 15 client.4161 remove_cap last one, closing snaprealm 0x7fe76000c1b0
2016-06-27 14:24:13.358544
7fe75cff9700 20 client.4161 put_snap_realm 1 0x7fe76000c1b0 1002 -> 1001
2016-06-27 14:24:13.358546
7fe75cff9700 10 client.4161 put_inode deleting
100000003e9 .head(faked_ino=0 ref=0 ll_ref=0 cap_refs={} open={} mode=41777 size=0/0 mtime=2016-06-27 14:24:10.700562 caps=- 0x7fe76000ba40)
After looking through the reference count inc/dec, I noticed this mismatched inc/dec:
2016-06-27 14:24:13.352622
7fe75dffb700 3 client.4161 ll_forget
100000003e9 1
2016-06-27 14:24:13.352601
7fe7767fc700 1 -- 172.21.15.58:0/
3762258427 >> 172.21.15.57:6804/11121 conn(0x7fe789bf3b60 sd=20 :-1 s=STATE_OPEN_MESSAGE_READ_FOOTER_AND_DISPATCH pgs=7 cs=1 l=0). == rx == mds.0 seq 1473 0x7fe764037a80 client_reply(???:470 = 0 (0) Success safe) v1
2016-06-27 14:24:13.352665
7fe75dffb700 20 client.4161 _ll_put 0x7fe76000ba40
100000003e9 1 -> 1
2016-06-27 14:24:13.352687
7fe75d7fa700 3 client.4161 ll_lookup 0x7fe76000ba40 testdir
2016-06-27 14:24:13.352699
7fe75d7fa700 20 client.4161 _lookup have dn testdir mds.-1 ttl 0.000000 seq 0
2016-06-27 14:24:13.352705
7fe75d7fa700 15 inode.get on 0x7fe760011da0
100000003ea .head now 537
2016-06-27 14:24:13.352693
7fe76effd700 1 -- 172.21.15.58:0/
3762258427 <== mds.0 172.21.15.57:6804/11121 1473 ==== client_reply(???:470 = 0 (0) Success safe) v1 ==== 27+0+0 (
3458149698 0 0) 0x7fe764037a80 con 0x7fe789bf3b60
2016-06-27 14:24:13.352708
7fe75d7fa700 10 client.4161 _lookup
100000003e9 .head(faked_ino=0 ref=3 ll_ref=1 cap_refs={} open={} mode=41777 size=0/0 mtime=2016-06-27 14:24:10.700562 caps=pAsLsXsFs(0=pAsLsXsFs) 0x7fe76000ba40) testdir =
100000003ea .head(faked_ino=0 ref=537 ll_ref=999 cap_refs={} open={} mode=40755 size=0/0 mtime=2016-06-27 14:24:13.325297 caps=pAsLsXsFsx(0=pAsLsXsFsx) COMPLETE parents=0x7fe750001f50 0x7fe760011da0)
This sequence of ll_forget/ll_lookup is repeated in this test several hundred times. This is the prior sequence (in one thread):
2016-06-27 14:24:13.324896
7fe75dffb700 3 client.4161 ll_forget
100000003e9 1
2016-06-27 14:24:13.324904
7fe75dffb700 20 client.4161 _ll_put 0x7fe76000ba40
100000003e9 1 -> 1
2016-06-27 14:24:13.324915
7fe75dffb700 3 client.4161 ll_lookup 0x7fe76000ba40 testdir
2016-06-27 14:24:13.324921
7fe75dffb700 20 client.4161 _lookup have dn testdir mds.-1 ttl 0.000000 seq 0
2016-06-27 14:24:13.324931
7fe75dffb700 15 inode.get on 0x7fe760011da0
100000003ea .head now 621
2016-06-27 14:24:13.324904
7fe7767fc700 1 -- 172.21.15.58:0/
3762258427 >> 172.21.15.57:6804/11121 conn(0x7fe789bf3b60 sd=20 :-1 s=STATE_OPEN_MESSAGE_READ_FOOTER_AND_DISPATCH pgs=7 cs=1 l=0). == rx == mds.0 seq 1387 0x7fe764026720 client_reply(???:385 = 0 (0) Success safe) v1
2016-06-27 14:24:13.324934
7fe75dffb700 10 client.4161 _lookup
100000003e9 .head(faked_ino=0 ref=3 ll_ref=2 cap_refs={} open={} mode=41777 size=0/0 mtime=2016-06-27 14:24:10.700562 caps=pAsLsXsFs(0=pAsLsXsFs) 0x7fe76000ba40) testdir =
100000003ea .head(faked_ino=0 ref=621 ll_ref=998 cap_refs={} open={} mode=40755 size=0/0 mtime=2016-06-27 14:24:13.321021 caps=pAsLsXsFsx(0=pAsLsXsFsx) COMPLETE parents=0x7fe750001f50 0x7fe760011da0)
The key line is `_lookup
100000003e9 .head(...)`. ll_ref=2 is the expected count
after this sequence but, as we see at 14:24:13.352708, ll_ref=1.
This racing behavior is not serialized by client_lock because
Client::get_root() does not lock the client_lock. Additionally, this race is
not easy to identify in the logs because Client::get_root() does not use
Client::_ll_get to increment the reference, which hides the increments in the
logs. Instead it directly increments the reference using Inode:ll_get().
This commit adds the client_lock for Client::get_root() and
Client::get_root_ino() (which may not strictly be necessary but can't hurt).
[1] http://pulpito.ceph.com/pdonnell-2016-06-27_06:54:23-fs-wip-pdonnell-i16164---basic-smithi/280361/
[2] http://qa-proxy.ceph.com/teuthology/pdonnell-2016-06-27_06:54:23-fs-wip-pdonnell-i16164---basic-smithi/280361/remote/smithi058/log/ceph-client.0.23448.log.gz
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit
208e3b6fd58237b309aae15b18dcd82672b133af )
Matt Benjamin [Wed, 6 Jul 2016 18:18:44 +0000 (14:18 -0400)]
Merge pull request #9545 from Abhishekvrshny/wip-16117-jewel
jewel: rgw: aws4 parsing issue
Loic Dachary [Wed, 6 Jul 2016 09:55:13 +0000 (11:55 +0200)]
Merge pull request #9568 from dreamhost/wip-16182
jewel: rgw: backport merge of static sites fixes
Reviewed-by: Yehuda Sadeh <ysadehwe@redhat.com>
Orit Wasserman [Thu, 30 Jun 2016 08:36:20 +0000 (10:36 +0200)]
Merge pull request #9099 from Abhishekvrshny/wip-15841-jewel
jewel: s3website: x-amz-website-redirect-location header returns malformed HTTP response
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Orit Wasserman [Thu, 30 Jun 2016 08:35:23 +0000 (10:35 +0200)]
Merge pull request #9265 from Abhishekvrshny/wip-15965-jewel
jewel: No Last-Modified, Content-Size and X-Object-Manifest headers if no segments in DLO manifest
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Orit Wasserman [Thu, 30 Jun 2016 08:34:42 +0000 (10:34 +0200)]
Merge pull request #9267 from Abhishekvrshny/wip-15960-jewel
jewel: rgw: custom metadata aren't camelcased in Swift's responses
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Orit Wasserman [Thu, 30 Jun 2016 08:28:45 +0000 (10:28 +0200)]
Merge pull request #9316 from Abhishekvrshny/wip-15954-jewel
jewel: rgw: initial slashes are not properly handled in Swift's BulkDelete
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Orit Wasserman [Thu, 30 Jun 2016 08:26:09 +0000 (10:26 +0200)]
Merge pull request #9390 from vumrao/wip-vumrao-16071
jewel: rgw : cleanup radosgw-admin temp command as it was deprecated
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Orit Wasserman [Thu, 30 Jun 2016 08:25:51 +0000 (10:25 +0200)]
Merge pull request #9542 from Abhishekvrshny/wip-15967-jewel
jewel: rgw: account/container metadata not actually present in a request are deleted during POST through Swift API
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Orit Wasserman [Thu, 30 Jun 2016 08:25:30 +0000 (10:25 +0200)]
Merge pull request #9543 from Abhishekvrshny/wip-16040-jewel
jewel: rgw: updating CORS/ACLs might not work in some circumstances
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Loic Dachary [Thu, 30 Jun 2016 07:41:20 +0000 (09:41 +0200)]
Merge pull request #9631 from dillaman/wip-16232
jewel: test: improve rbd-mirror test case coverage
Reviewed-by: Loic Dachary <ldachary@redhat.com>
Loic Dachary [Wed, 29 Jun 2016 14:47:15 +0000 (16:47 +0200)]
Merge pull request #9294 from theanalyst/wip-16009-jewel
jewel: radosgw-admin: failure for user create after upgrade from hammer to jewel
Reviewed-by: Casey Bodley <cbodley@redhat.com>
Mykola Golub [Wed, 29 Jun 2016 08:42:43 +0000 (11:42 +0300)]
Merge pull request #9721 from trociny/wip-16289-jewel
jewel: qa/workunits/rbd: respect RBD_CREATE_ARGS environment variable
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Loic Dachary [Wed, 29 Jun 2016 07:56:58 +0000 (09:56 +0200)]
Merge pull request #9425 from cbodley/wip-rgw-sync-retry-jewel
jewel: rgw: retry on bucket sync errors
Reviewed-by: Loic Dachary <ldachary@redhat.com>
Loic Dachary [Wed, 29 Jun 2016 07:55:26 +0000 (09:55 +0200)]
Merge pull request #9327 from cbodley/wip-rgw-zone-modify-master-jewel
jewel: rgw: add_zone only clears master_zone if --master=false
Reviewed-by: Loic Dachary <ldachary@redhat.com>
Loic Dachary [Wed, 29 Jun 2016 07:50:04 +0000 (09:50 +0200)]
Merge pull request #9242 from yehudasa/wip-15911-jewel
jewel: rgw: don't unregister request if request is not connected to manager
Reviewed-by: Loic Dachary <ldachary@redhat.com>
Jason Dillaman [Tue, 28 Jun 2016 19:53:03 +0000 (15:53 -0400)]
Merge pull request #9883 from dillaman/wip-16422
jewel: librbd: flag image as updated after proxying maintenance op
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Samuel Just [Mon, 27 Jun 2016 19:43:11 +0000 (12:43 -0700)]
Merge pull request #9105 from Abhishekvrshny/wip-15768-jewel
jewel: FileStore: umount hang because sync thread doesn't exit
Reviewed-by: Samuel Just <sjust@redhat.com>
Loic Dachary [Mon, 27 Jun 2016 15:50:39 +0000 (17:50 +0200)]
Merge pull request #9633 from liewegas/wip-async-jewel
msg/async: backports of all asyncmsgr fixes to jewel
Reviewed-by: Haomai Wang <haomai@xsky.com>
Sage Weil [Mon, 27 Jun 2016 13:12:14 +0000 (09:12 -0400)]
Merge pull request #9576 from Abhishekvrshny/wip-16148-jewel
jewel: Scrub error: 0/1 pinned
Reviewed-by: Sage Weil <sage@redhat.com>
Sage Weil [Mon, 27 Jun 2016 13:11:43 +0000 (09:11 -0400)]
Merge pull request #9575 from Abhishekvrshny/wip-16150-jewel
jewel: crash adding snap to purged_snaps in ReplicatedPG::WaitingOnReplicas
Reviewed-by: Sage Weil <sage@redhat.com>
Sage Weil [Mon, 27 Jun 2016 13:10:36 +0000 (09:10 -0400)]
Merge pull request #8754 from kmroz/wip-backport-fix-run-dir-chown
jewel: global-init: fixup chown of the run directory along with log and asok files
Reviewed-by: Sage Weil <sage@redhat.com>
Loic Dachary [Mon, 27 Jun 2016 08:12:35 +0000 (10:12 +0200)]
Merge pull request #9578 from Abhishekvrshny/wip-16080-jewel
jewel: osd:sched_time not actually randomized
Reviewed-by: Loic Dachary <ldachary@redhat.com>
Loic Dachary [Mon, 27 Jun 2016 08:08:25 +0000 (10:08 +0200)]
Merge pull request #9574 from Abhishekvrshny/wip-16153-jewel
jewel: Missing export for rados_aio_get_version in src/include/rados/librados.h
Reviewed-by: Loic Dachary <ldachary@redhat.com>
Loic Dachary [Mon, 27 Jun 2016 08:06:54 +0000 (10:06 +0200)]
Merge pull request #9565 from dzafman/wip-15767-jewel
jewel: Fixes for list-inconsistent-*
Reviewed-by: Loic Dachary <ldachary@redhat.com>
Loic Dachary [Mon, 27 Jun 2016 07:42:28 +0000 (09:42 +0200)]
Merge pull request #8904 from SUSE/wip-15700-jewel
jewel: rados/test.sh workunit timesout on OpenStack
Reviewed-by: Loic Dachary <ldachary@redhat.com>
Jason Dillaman [Tue, 21 Jun 2016 18:56:43 +0000 (14:56 -0400)]
librbd: flag image as updated after proxying maintenance op
Fixes: http://tracker.ceph.com/issues/16404
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
478dd5f173591914b41d87b8c6d035c32cac8d3e )
Josh Durgin [Tue, 21 Jun 2016 23:43:20 +0000 (16:43 -0700)]
Merge branch 'wip-dmick-install-deps-jewel' into jewel
install-deps.sh: use mk-build-deps instead of processing control
Reviewed-by: Erwan Velu <erwan@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Dan Mick [Thu, 24 Mar 2016 00:43:53 +0000 (17:43 -0700)]
install-deps.sh: use mk-build-deps instead of processing control
mk-build-deps is designed to handle installing build dependencies;
use that instead, so '|' indications are handled properly.
Signed-off-by: Dan Mick <dan.mick@redhat.com>
(cherry picked from commit
99bca09b8d09c41077a9d2141ff556b74328e57a )
Roi Dayan [Wed, 20 Apr 2016 14:56:16 +0000 (17:56 +0300)]
xio: add MNop.h to dist tarball
This file is needed when we want to build a package with xio messenger
but was not added to dist tarball.
Signed-off-by: Roi Dayan <roid@mellanox.com>
(cherry picked from commit
ac50842d81d271569d4149737834ac53b2f51db2 )
Mykola Golub [Tue, 14 Jun 2016 12:28:06 +0000 (15:28 +0300)]
qa/workunits/rbd: respect RBD_CREATE_ARGS environment variable
Fixes: http://tracker.ceph.com/issues/16289
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit
3048d3c7ce800a6174c54946b838e4e4079ec609 )
David Zafman [Fri, 6 May 2016 06:20:58 +0000 (23:20 -0700)]
rados: Improve list-inconsistent json format
Use array "errors" of strings for the error bits
Change snapshot number to integer instead of hex
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit
07dc844d6804db93055573ec83e6753773a4c049 )
David Zafman [Sat, 7 May 2016 02:54:11 +0000 (19:54 -0700)]
test: Fix test to not use jq -S which isn't avail in all distributions
Fixes: http://tracker.ceph.com/issues/15766
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit
a2147ad3cb256c34541ff7dc285594a22a24dfc6 )
David Zafman [Tue, 3 May 2016 19:10:38 +0000 (12:10 -0700)]
test: Add testing of new scrub commands in rados
Test list-inconsistent-pg
Test list-inconsistent-obj
Test inconsistent-snapset
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit
db517ba9176f1ee829453b016b1bd43c6054a555 )
David Zafman [Fri, 29 Apr 2016 18:25:18 +0000 (11:25 -0700)]
rados: Don't bother showing list-inconsistent-* errors that aren't set
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit
a551b6bd5c4eba11c170afe63994258e7598c3d2 )
David Zafman [Sat, 30 Apr 2016 00:09:13 +0000 (17:09 -0700)]
osd, rados: Fixes for list-inconsistent-snapset
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit
fdca113fc24adbb4f60bfdc55fbbd5044b711b5d )
David Zafman [Fri, 29 Apr 2016 18:26:39 +0000 (11:26 -0700)]
include, rados: Fixes for list-inconsistent-obj and librados
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit
4fc4326b36aa00092043514746aa39aedad06b0f )
David Zafman [Wed, 27 Apr 2016 01:16:22 +0000 (18:16 -0700)]
rados: Balance format sections in same do_get_inconsistent_cmd()
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit
de4681b80a5d24e72bbc7ac6dfee4775987fd834 )
David Zafman [Tue, 22 Mar 2016 03:41:03 +0000 (20:41 -0700)]
rados: Include epoch in the list-inconsistent-* command output
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit
df4bc16c4d49489f7398eb1ecc7b9aef93258414 )
David Zafman [Tue, 22 Mar 2016 03:39:53 +0000 (20:39 -0700)]
rados: Improve error messages for list-inconsistent commands
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit
cea7cf56ee3b9593c935d0c74ce6e4b28b14c2da )
Jenkins Build Slave User [Fri, 13 May 2016 17:50:34 +0000 (17:50 +0000)]
10.2.1
Mykola Golub [Sat, 11 Jun 2016 17:01:31 +0000 (20:01 +0300)]
qa/workunits/rbd: specify source path
otherwise it looks in $PATH for the script
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit
698242e7435c9c4d1db7cb6d5aab3faf57eda840 )
Jason Dillaman [Thu, 9 Jun 2016 20:23:52 +0000 (16:23 -0400)]
qa/workunits/rbd: additional rbd-mirror stress tests
Fixes: http://tracker.ceph.com/issues/16197
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
db3e583a5fe4a7985b1e7f1740114da414835af5 )
Jason Dillaman [Thu, 9 Jun 2016 21:14:36 +0000 (17:14 -0400)]
vstart: add --nolockdep option
rbd-mirror stress test cases need a way to disable lockdep when
initiated in a vstart environment.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
d5eec7b2f4222dde0cfdaa9e0e4b43be015c3692 )
Jenkins Build Slave User [Tue, 14 Jun 2016 11:43:24 +0000 (11:43 +0000)]
10.2.2
Jason Dillaman [Tue, 14 Jun 2016 11:32:44 +0000 (07:32 -0400)]
Merge pull request #9692 from dillaman/wip-16292
jewel: librbd: remove should ignore mirror errors from older OSDs
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Mon, 13 Jun 2016 19:29:43 +0000 (15:29 -0400)]
librbd: remove should ignore mirror errors from older OSDs
Fixes: http://tracker.ceph.com/issues/16268
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
5a97a9b7ef238c4ceb16225a0b937f9a0cdbb2b6 )
Jason Dillaman [Tue, 14 Jun 2016 11:24:28 +0000 (07:24 -0400)]
Merge pull request #9691 from dillaman/wip-16260-jewel
jewel: librbd: do not shut down exclusive lock while acquiring'
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Tue, 14 Jun 2016 10:57:38 +0000 (06:57 -0400)]
Merge pull request #9690 from dillaman/wip-16290
jewel: rbd-mirror: FAILED assert(!m_status_watcher)
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Tue, 14 Jun 2016 00:20:33 +0000 (20:20 -0400)]
librbd: track in-flight flush events for journaling
The tracking for flush events was accidentally dropped. This
can result in the journal being closed too early since it
might miss in-flight flush ops.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
a1ea1edce9332fa1730625629e3b4e16f02caaf4 )
Jason Dillaman [Mon, 13 Jun 2016 16:00:28 +0000 (12:00 -0400)]
librbd: do not shut down exclusive lock while acquiring
Fixes: http://tracker.ceph.com/issues/16260
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
c5694fc6766fb8e213c4b65d2cd7b9d066b07ff7 )
Mykola Golub [Sun, 12 Jun 2016 17:32:45 +0000 (20:32 +0300)]
rbd-mirror: FAILED assert(!m_status_watcher)
Fixes: http://tracker.ceph.com/issues/16245
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit
b8bfc0f2efb44d3eff7a5fd8bca24516c8815d62 )
Jason Dillaman [Tue, 14 Jun 2016 10:54:51 +0000 (06:54 -0400)]
Merge pull request #9654 from dillaman/wip-16246
jewel: librbd: recursive lock possible when disabling journaling
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Tue, 14 Jun 2016 10:54:31 +0000 (06:54 -0400)]
Merge pull request #9673 from dillaman/wip-16265
jewel: rbd-mirror: do not re-use image id from mirror directory if creating image
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Tue, 14 Jun 2016 03:37:06 +0000 (23:37 -0400)]
Merge pull request #9674 from dillaman/wip-16267
jewel: qa/workunits: ensure replay has started before checking position
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Mon, 13 Jun 2016 04:19:37 +0000 (00:19 -0400)]
qa/workunits: ensure replay has started before checking position
Fixes: http://tracker.ceph.com/issues/16248
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
6a68b68e0d2741e6694fd28d31766808ba881815 )
Jason Dillaman [Mon, 13 Jun 2016 06:09:00 +0000 (02:09 -0400)]
rbd-mirror: reset local image id when creating new image
Fixes: http://tracker.ceph.com/issues/16253
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
1948047acbc129de2982d53e130da1f577af224b )
Jason Dillaman [Mon, 13 Jun 2016 06:07:54 +0000 (02:07 -0400)]
rbd-mirror: handle an attempt to delete a non-mirrored image
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
45dda67b3ef3d5dc5abb327fc1f242140f004d90 )
Jason Dillaman [Mon, 13 Jun 2016 06:03:29 +0000 (02:03 -0400)]
cls_rbd: disallow setting an empty mirror image entry to disabling
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
7b2f99a97ff64451f3ae72081186dff41c507271 )
Jason Dillaman [Mon, 13 Jun 2016 01:42:59 +0000 (21:42 -0400)]
librbd: avoid holding owner_lock waiting for exclusive lock
Fixes: http://tracker.ceph.com/issues/16235
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
b96ab805eed49d4bdb494c8919d2e1ee7ad0a7e6 )
Gregory Farnum [Mon, 13 Jun 2016 08:26:53 +0000 (01:26 -0700)]
Merge pull request #9656 from gregsfortytwo/wip-jewel-16024
Jewel client: fix bugs accidentally disabling readahead
Gregory Farnum [Mon, 13 Jun 2016 08:22:22 +0000 (01:22 -0700)]
Merge pull request #9655 from gregsfortytwo/wip-jewel-15508
Jewel mds: order directories by hash and fix simultaneous readdir races
Yan, Zheng [Mon, 9 May 2016 14:12:48 +0000 (22:12 +0800)]
client: fix simultaneous readdirs race
Current readdir code uses list to track the order of the dentries
in readdir replies. When handling a readdir reply, it pushes the
resulting dentries to the back of directory's dentry_list. After
readdir finishes, the dentry_list reflects how MDS sorts dentries.
This method is racy when there are simultaneous readdirs. The fix
is use vector instead of list to trace how dentries are sorted in
its parent directory. As long as shared_gen doesn't change, each
dentry is at fixed position of the vector. So cocurrent readdirs
do not affect each other.
Fixes: http://tracker.ceph.com/issues/15508
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit
9d297c5e98f814b282dadc379ab70dfa678db73e )
Signed-off-by: Greg Farnum <gfarnum@redhat.com
Yan, Zheng [Mon, 25 Apr 2016 15:24:46 +0000 (23:24 +0800)]
client: move dir_{release,ordered}_count into class Inode
We close Inode::dir when it's empty. Once closing the dir, we lose
track of {release,ordered}_count. This causes direcotry to be wrongly
marked as complete. (dir is trimmed to empty in the middle of readdir)
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit
235fcf68f5d96a4d9d6cc260d12da912fa7ea4a8 )
Signed-off-by: Greg Farnum <gfarnum@redhat.com
Yan, Zheng [Mon, 25 Apr 2016 09:59:35 +0000 (17:59 +0800)]
ceph_test_libcephfs: check order of entries in readdir result
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit
9b17d145c15a469caa29853312b8dcb0b19f55f0 )
Signed-off-by: Greg Farnum <gfarnum@redhat.com
Yan, Zheng [Mon, 25 Apr 2016 07:52:32 +0000 (15:52 +0800)]
mds: don't reset readdir offset if client supports hash order dentry
Now the ordering of dentries is stable across directory fragmentation.
There is no need to reset readdir offset if directory get fragmented
in the middle of readdir.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit
98a01af2cd8e01f14ab7be32c31a43571ef8bb87 )
Signed-off-by: Greg Farnum <gfarnum@redhat.com
Yan, Zheng [Mon, 25 Apr 2016 07:31:27 +0000 (15:31 +0800)]
client: using hash value to compose dentry offset
If MDS sorts dentries in dirfrag in hash order, we use hash value to
compose dentry offset. dentry offset is:
(0xff << 52) | ((24 bits hash) << 28) |
(the nth entry hash hash collision)
This offset is stable across directory fragmentation.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit
680766ec131b95271e320f54dfe6d69ea8d4fbb3 )
Signed-off-by: Greg Farnum <gfarnum@redhat.com
Yan, Zheng [Mon, 25 Apr 2016 02:50:17 +0000 (10:50 +0800)]
client: record 'offset' for each entry of dir_result_t::buffer
This is preparation for using hash value as dentry 'offset'
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit
bd6546e5e8bfb4ef8927807492d63d5285534618 )
Signed-off-by: Greg Farnum <gfarnum@redhat.com
Yan, Zheng [Mon, 9 May 2016 03:51:36 +0000 (11:51 +0800)]
client: fix cached readdir after seekdir
Client::seekdir doesn't reset dirp->at_cache_name for a forward seek
within same frag. So the dentry with name == at_cache_name may not be
the one prior to the readdir postion.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit
0e32115bae2f1ac2c59b57852976b0de5587abac )
Signed-off-by: Greg Farnum <gfarnum@redhat.com
Yan, Zheng [Thu, 21 Apr 2016 09:31:10 +0000 (17:31 +0800)]
mds: define end/complete in readdir reply as single u16 flags
so that we can introduce new flags for readdir reply.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit
92cfbdf526d1030891da366299b635e589dd5f8e )
Signed-off-by: Greg Farnum <gfarnum@redhat.com
Yan, Zheng [Sat, 23 Apr 2016 08:03:48 +0000 (16:03 +0800)]
mds: sort dentries in CDir in hash order
This gives us stable ordering of dentries. (Previously ordering of
dentries changes after directory gets fragmented)
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit
f483224a0bc70b9eb5f62cd6cbb8b97df5b65953 )
Signed-off-by: Greg Farnum <gfarnum@redhat.com
Yan, Zheng [Fri, 22 Apr 2016 01:43:54 +0000 (09:43 +0800)]
client: save readdir result into dir_result_t directly
Current code saves the readdir result into MedaRequest, then updates
dir_result_t according to MetaRequest. I can't see any reason why
we need to do this.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit
db5d60d1b8d01afd43da09a063f00aa6ab312903 )
Signed-off-by: Greg Farnum <gfarnum@redhat.com
Yan, Zheng [Fri, 22 Apr 2016 01:31:00 +0000 (09:31 +0800)]
client: don't allocate dir_result_t::buffer dynamically
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit
c41ceb9f1425432295a52965de8d4a23b15fe5e5 )
Signed-off-by: Greg Farnum <gfarnum@redhat.com
Yan, Zheng [Thu, 21 Apr 2016 12:53:55 +0000 (20:53 +0800)]
client: simplify 'offset in frag'
don't distinguish leftmost frag from other frags. always use 2 as
first entry's offset.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit
6572c2a24ea2abec4c7eecef92a292c2cc72c762 )
Signed-off-by: Greg Farnum <gfarnum@redhat.com
Patrick Donnelly [Fri, 10 Jun 2016 21:33:04 +0000 (17:33 -0400)]
client: move readahead ref get/put to obj constr
The readahead context was incrementing the file handle reference count but only
decreasing in finish which is not called if readahead is a no-op.
This fixes a bug caught in testing where readahead was causing inode to become
disconnected:
2016-06-10 19:46:48.953018
7f2a4351be80 1 client.4125 dump_inode: DISCONNECTED inode
10000000502 #
10000000502 ref
110000000502 .head(faked_ino=2307 ref=1 ll_ref=0 cap_refs={1024=0,2048=0,4096=0,8192=0} open={1=0,2=0} mode=100666 size=
4194304 /0 mtime=2016-06-10 19:29:45.107417 caps=-(0=pAsLsXsFscr) objectset[
10000000502 ts 2/
4012653 objects 0 dirty_or_tx 0] 0x7f2a24300d00)
2016-06-10 19:46:48.953032
7f2a4351be80 2 client.4125 cache still has 0+155 items, waiting (for caps to release?)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit
b5a0773259ce9f2ef44e8e6925ab11dc1a5e55e6 )
Signed-off-by: Greg Farnum <gfarnum@redhat.com
Patrick Donnelly [Thu, 26 May 2016 20:32:58 +0000 (16:32 -0400)]
client: use fh min readahead to enable readahead
The client was using the configured maximum readahead of 0 which was changed in
95ee69989129750fddce6a3b5644238c4b88ed74 . This prevented readahead from ever
running (without setting a different default from 0).
Fixes: http://tracker.ceph.com/issues/16024
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit
01c179bcce2dc8a269d78eb1be8198b12bd161f7 )
Signed-off-by: Greg Farnum <gfarnum@redhat.com
Patrick Donnelly [Fri, 27 May 2016 15:43:31 +0000 (11:43 -0400)]
client: update comment
Default was changed to unlimited in
11e4680e7394e6e02612441c964e05207b97737b .
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit
bee02a073f4c551798bc490618a0e8d862893c25 )
Signed-off-by: Greg Farnum <gfarnum@redhat.com
Patrick Donnelly [Thu, 26 May 2016 19:08:52 +0000 (15:08 -0400)]
client: use layout.get_period() helper
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit
b331d12a43a4177369a003c3ab9d525da6a89950 )
Signed-off-by: Greg Farnum <gfarnum@redhat.com
Jason Dillaman [Fri, 10 Jun 2016 19:44:26 +0000 (15:44 -0400)]
librbd: recursive lock possible when disabling journaling
If pool-level mirroring is enabled, deleting the journal
could cause a deadlock attempting to delete remote peer
sync-point snapshots.
Fixes: http://tracker.ceph.com/issues/16235
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
fb255e6c3cd44c8d24c53e3cd70395a11a712574 )
Jason Dillaman [Sun, 12 Jun 2016 12:16:35 +0000 (08:16 -0400)]
Merge pull request #9553 from Abhishekvrshny/wip-16038-jewel
jewel: pybind: rbd API should default features parameter to None
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Sun, 12 Jun 2016 12:13:16 +0000 (08:13 -0400)]
Merge pull request #9552 from Abhishekvrshny/wip-15981-jewel
jewel: qa: dynamic_features.sh races with image deletion
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Sun, 12 Jun 2016 12:08:39 +0000 (08:08 -0400)]
Merge pull request #9629 from dillaman/wip-16231
jewel: rbd-mirror: fix deletion propagation edge cases
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Sun, 12 Jun 2016 12:08:23 +0000 (08:08 -0400)]
Merge pull request #9630 from dillaman/wip-16233
jewel: rbd-mirror: do not propagate deletions when pool unavailable
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Sun, 12 Jun 2016 12:07:42 +0000 (08:07 -0400)]
Merge pull request #9628 from dillaman/wip-16224
jewel: rbd-mirror: fix journal shut down ordering
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Sun, 12 Jun 2016 12:07:10 +0000 (08:07 -0400)]
Merge pull request #9627 from dillaman/wip-16217
jewel: rbd-mirror: refresh image after creating sync point
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Sage Weil [Sat, 11 Jun 2016 01:48:26 +0000 (21:48 -0400)]
Merge pull request #9579 from Abhishekvrshny/wip-16006-jewel
jewel: BackoffThrottle spins unnecessarily with very small backoff while the throttle is full
Reviewed-by: Sage Weil <sage@redhat.com>
Sage Weil [Fri, 10 Jun 2016 21:34:19 +0000 (17:34 -0400)]
Merge pull request #9638 from ceph/wip-16211-jewel
Jewel: remove reliance on FLAG_OMAP for reads
Reviewed-by: Sage Weil <sage@redhat.com>
Jason Dillaman [Fri, 10 Jun 2016 12:15:19 +0000 (08:15 -0400)]
rbd-mirror: do not propagate deletions when pool unavailable
Fixes: http://tracker.ceph.com/issues/16229
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
d321634414fa4b90c66474557ec990dfc935ae29 )
Jason Dillaman [Fri, 10 Jun 2016 04:12:06 +0000 (00:12 -0400)]
rbd-mirror: image deleter properly handles multiple snapshots
Fixes: http://tracker.ceph.com/issues/16226
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
d72a8cb67fbdc7361f8f9e265c659ddb96dc0f74 )
Jason Dillaman [Fri, 10 Jun 2016 02:32:33 +0000 (22:32 -0400)]
rbd-mirror: propagate deletions even if image replayer is stopped
If an image deletion which causes the replayer to stop (due to an error)
before the deletion is detected, the deletion should still occur.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
a0c526a23783fe543737f6445a2d9438cc73b137 )
Jason Dillaman [Fri, 10 Jun 2016 01:14:27 +0000 (21:14 -0400)]
qa/workunits/rbd: improve deletion propagation test case
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
de15b198cd7b5e94016605c8016a5cf38c07c6f6 )
Jason Dillaman [Wed, 8 Jun 2016 14:12:04 +0000 (10:12 -0400)]
librbd: quickly check for duplicate snap name upon create
During journal replay, quickly check for a duplicate snap name
before allocating a snapshot sequence from the OSDs and
reverting due to the duplicate name.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
8374d45c7644666103f88c410a2b1b781f3a0cb8 )
Jason Dillaman [Tue, 7 Jun 2016 18:45:16 +0000 (14:45 -0400)]
rbd-mirror: stop external replayer before closing remote journaler
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
88bd3002082184c045bb82547929b30da1526cfb )
Jason Dillaman [Tue, 7 Jun 2016 16:42:52 +0000 (12:42 -0400)]
librbd: stop journal recorder before starting external replay
Fixes: http://tracker.ceph.com/issues/16165
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
5aa6eb2782bdb5cde6a050a5f7a4e683800414c0 )
Jason Dillaman [Wed, 8 Jun 2016 16:49:04 +0000 (12:49 -0400)]
rbd-mirror: refresh image after creating sync point snapshot
Fixes: http://tracker.ceph.com/issues/16196
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
c9a3e3be7ddc31992167d55de12bbe6849447b43 )
Jason Dillaman [Wed, 8 Jun 2016 16:03:33 +0000 (12:03 -0400)]
rbd-mirror: consistently use dout/derr for debug logging
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
03f5e4a917b3c18f8ccdaa5ce676ed9731dd2a8f )
Jason Dillaman [Fri, 10 Jun 2016 16:32:21 +0000 (12:32 -0400)]
Merge pull request #9612 from dillaman/wip-16208
jewel: rbd-mirror: support bootstrap canceling
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Fri, 10 Jun 2016 16:32:02 +0000 (12:32 -0400)]
Merge pull request #9610 from dillaman/wip-16209
jewel: librbd: prevent error messages when journal externally disabled
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Fri, 10 Jun 2016 16:19:47 +0000 (12:19 -0400)]
Merge pull request #9611 from dillaman/wip-16210
jewel: librbd: journal IO error results in failed assertion in AioCompletion
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Fri, 10 Jun 2016 16:16:49 +0000 (12:16 -0400)]
Merge pull request #9580 from Abhishekvrshny/wip-15996-jewel
jewel: librbd: reuse ImageCtx::finisher and SafeTimer for lots of images case
Reviewed-by: Jason Dillaman <dillaman@redhat.com>