Commit Graph

31749 Commits

Author SHA1 Message Date
Samuel Just
fd9da00edc ReplicatedPG: take snapset_obc write lock where appropriate
Otherwise, we might read it for backfill before it's fully created
on a peer.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-17 14:25:33 -08:00
Samuel Just
da4652c92d ReplicatedPG: release backfill state on_global_recover not peer recover
There may now be multiple backfill peers.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-17 14:24:56 -08:00
Samuel Just
d687ed96fd ReplicatedPG: take clone write lock as well in make_writeable
Otherwise, we might start backfilling the clone before the op is
complete.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-17 14:24:56 -08:00
Samuel Just
643b6a50ae ReplicatedPG,osd_types: seperate require_rollback from ec_pool
It's handy to allow a pool to answer false to ec_pool() and
true to require_rollback() in order to allow a replicated
pool to test the rollback mechanisms without allowing
non-NO_SHARD shards.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-17 14:24:56 -08:00
Samuel Just
f020ce90f7 ReplicatedPG:: remove_snap_mapped_object already removes the object
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-17 14:24:56 -08:00
Samuel Just
17e6ecc841 ReplicatedPG: find_object_context debugging: output oi
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-17 14:24:56 -08:00
Samuel Just
b3b2bab403 ReplicatedPG: handle xattr cache on rollback and delete_head
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-17 14:24:56 -08:00
Samuel Just
d8b6d4c125 ReplicatedPG: release_op_ctx_locks in all-applied, not all-committed
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-17 14:24:56 -08:00
Samuel Just
13a41e14b6 FileStore: permit NULL onreadable callback
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-17 14:24:56 -08:00
Samuel Just
3650da69b5 ErasureCodeJerasure: fill in decoded if all shards are included
This causes it to match minimum_to_decode.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-17 14:24:56 -08:00
Samuel Just
44f5d4de2a ErasureCodeJerasure: fix alignement issues in encode/decode
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-17 14:24:55 -08:00
Samuel Just
06ec9bd42b ObjectStore: fix OP_COLL_ADD dump output
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-17 14:24:55 -08:00
Samuel Just
541a7e2725 TestRados: send aligned appends on erasure pools
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-17 14:24:55 -08:00
Samuel Just
e0b0508586 ReplicatedPG: reject unaligned writes on ec pools
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-17 14:24:55 -08:00
Samuel Just
211fc4e17c librados: add calls to expose required write alignment
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-17 14:24:55 -08:00
Samuel Just
4c1338f457 SimpleMessenger: init_local_connection whenever my_inst changes
This is necessary to correctly handle messages to self.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-02-17 14:24:55 -08:00
Sage Weil
093128a8b1 Merge pull request #1139 from ceph/wip-agent
osd: basic cache tier agent

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-02-17 14:14:21 -08:00
Sage Weil
bd8fcd2543 osd: improve whiteout debug prints
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-17 13:07:47 -08:00
Sage Weil
63f5a799aa osd/ReplicatedPG: make agent skip blocked obcs
Among other things, this can interfere with an in-flight copy-from and
corrupt the pg stats.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-17 13:07:39 -08:00
Sage Weil
79976466ca ReplicatedBackend: print char ack_type as int
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-17 13:07:39 -08:00
Sage Weil
62532fb025 Merge pull request #1254 from ceph/wip-barrier
libcephfs: disable barriers for now
2014-02-17 11:09:09 -08:00
Sage Weil
a4ca4a7347 Merge remote-tracking branch 'gh/wip-7212-sage-b'
We should carefully backport some or all of this.

Backport: emperor, dumpling
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-02-17 11:07:55 -08:00
Sage Weil
a71d829e46 client: disable barrier support
The boost interval_set class is not available on centos6/rhel6.  Until that
dependency is sorted out, fix the build.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-17 10:27:23 -08:00
Sage Weil
747002c6be client: fix barrier interval
(start, end) not (start, length)

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-17 10:23:37 -08:00
Sage Weil
d7457f7341 client/barrier: drop unused active_commit_interval
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-17 10:16:10 -08:00
Sage Weil
ce643e007a client: don't populate Client::barriers from read accesses
If the entry doesn't exist, no need to create it.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-17 10:15:58 -08:00
Sage Weil
a1dbc9ceec qa/workunits/suites/pjd: use test suite with acl tweak
Test 45 in xacl/00.t fails on ext4 and cephfs.  Just disable it.
Everything else passes.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-16 22:25:49 -08:00
Yan, Zheng
623748e54d mds: bump the protocol version
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 13:23:02 +08:00
Sage Weil
2a19a1bebe osd/ReplicatedPG: allow is_degraded_object() to be called outside of backfil
The agent does this.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-16 20:53:13 -08:00
Yan, Zheng
e5457dfbe2 mds: open sessions for rejoin imported caps
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 09:37:52 +08:00
Yan, Zheng
c54b3ceaac mds: fix slave rename rollback
use rollback bufferlist to decide if the inode is being exported.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 09:37:51 +08:00
Yan, Zheng
9e8dbf9e3f mds: remove failed MDS from export bystanders list
make sure the importer does not wait for MExportDirNotifyAck from
the failed MDS

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 09:37:51 +08:00
Yan, Zheng
21d209d024 mds: wake up dentry waiters when handling cache rejoin ack
Cache rejoin ack message may fragment dirfrag, we should set the
'replay' parameter of adjust_dir_fragments() to false in this case.
This makes sure that CDir::merge/split wake up any dentry waiter
in the fragmented dirfrag.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 09:37:51 +08:00
Yan, Zheng
74ef370b02 mds: fix negative rstat assertion
when gathering rstat for directory inode that is fragmented to
several dirfrags, inode's rstat may temporarily become nagtive.
This is because, when splitting dirfrag, delta rstat is always
added to the first new dirfrag.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 09:37:51 +08:00
Yan, Zheng
22535340b4 mds: avoid race between cache expire and pushing replicas
MDentryLink and MMDSFragmentNotify push replica inode/dirfrags
to other MDS. They both are racy because, when the target MDS
receives them, it may has expired the replicaed inode/dirfrags'
ancestor. The race creates unconnected replica inode/dirfrags,
unconnected replicas are problematic for subtree migration
because migrator sends MExportDirNotify according to subtree
dirfrag's replica list. MDS that contains unconnected replicas
may not receive MExportDirNotify.

The fix is, for MDentryLink and MMDSFragmentNotify messages
that may be received later, we avoid trimming their parent
replica objects. If null replica dentry is not readable, we
may receive a MDentryLink message later. If replica inode's
dirfragtreelock is not readable, it's likely some dirfrags
of the inode are being fragmented, we may receive a
MMDSFragmentNotify message later.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 09:37:51 +08:00
Yan, Zheng
cc77ef2d52 mds: fix scattered wrlock rejoin
If unstable scatter lock is encountered when handling weak cache
rejoin, don't remove the recovering MDS from the scatter lock's
gather list. The reason is the recovering MDS may hold rejoined
wrlock on the scatter lock. (Rejoined wrlocks were created when
handling strong cache rejoins from survivor MDS)

When composing cache rejoin ack, if the recovering MDS is in lock's
gather list, set lock state of the recovering MDS to a compatible
unstable stable.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 09:37:51 +08:00
Yan, Zheng
3b90c78540 mds: fixes for thrash fragment
This patch contains 3 changes:
- limit the number of in progress fragmenting processes.
- reduce the probability of splitting small dirfrag.
- process the merge_queue when thrash_fragments is enabled.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 09:37:51 +08:00
Yan, Zheng
5b1de69ac7 mds: force fragment subtree bounds when replaying ESubtreeMap
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 09:37:51 +08:00
Yan, Zheng
4d5ceba531 mds: fix 'force dirfrags' during journal replay
For rename operation, null dentry is first replayed, it detaches
the inode from the FS hierarchy. Then primary dentry is replayed,
it updates the inode and re-attaches the inode to the FS hierarchy.
We may call CInode::force_dirfrag() when updating the inode. But
CInode::force_dirfrag() doesn't work well when inode is detached
from the FS hierarchy because adjusting fragments may also adjust
subtree map. The fix is don't detach the inode when replaying the
null dentry.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 09:37:51 +08:00
Yan, Zheng
f3666ededc mds: journal dirfragtree change
Introduce new flag DIRTYDFT to CDir and EMetaBlob::dirlump, the new
flag indicates the dirfrag is newly fragmented and the corresponding
dirfragtree change hasn't been propagate to the directory inode.

After fragmenting subtree dirfrags, make sure DIRTYDFT flag is set
on EMetaBlob::dirlump that correspond to the resulting dirfrags.
Journal replay code uses DIRTYDFT frag to decide if dirfragtree is
scattered dirty.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 09:37:51 +08:00
Yan, Zheng
ee7ac6fc66 mds: allow fragmenting subtree dirfrags
We can't wait until object becomes auth pinnable after freezing a
dirfrag/subtree, because it can cause deadlock. Current fragmenting
dirfrag code checks if the directory inode is auth pinnable, then
calls Locker::acquire_locks(). It avoids deadlock, but also forbids
fragmenting subtree dirfrags. We can get rid of the limitation by
using 'nonlocking auth pin' mode of Locker::acquire_locks().

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 09:37:51 +08:00
Yan, Zheng
98105b2448 mds: preserve dir_auth when spliting/merging dirfrags
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 09:37:51 +08:00
Yan, Zheng
3dc51dea31 mds: minor cleanup for EFragment and MMDSFragmentNotify
pass dirfrag_t to their constructors, instead of passing inode_t
and frag_t separately.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 09:37:51 +08:00
Yan, Zheng
9df6861b31 mds: freeze dir deadlock detection
freezing dir and freezing tree have the same deadlock cases.
This patch adds freeze dir deadlock detection, which imitates
commit ab93aa59 (mds: freeze tree deadlock detection)

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 09:37:51 +08:00
Yan, Zheng
9a47913d20 mds: improve freeze tree deadlock detection
Current code uses the start time of freezing tree to detect deadlock.
It is better to check how long the auth pin count of freezing tree
stays unchanged to decide if there is potential deadlock.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 09:37:51 +08:00
Yan, Zheng
8079939534 mds: handle frag mismatch for cache expire
When sending MDSFragmentNotify to peers, also replicate the new
dirfrags. This guarantees peers get new replica nonces for the
new dirfrags. So it's safe to ignore mismatched/old dirfrags in
the cache expire message.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 09:37:51 +08:00
Yan, Zheng
305d16f3f6 mds: handle frag mismatch for cache rejoin weak
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 09:37:51 +08:00
Yan, Zheng
0eb311d39c mds: fix open undef dirfrags
Undef inode may contain a undef dirfrag (*). When undef inode is
opened, we should force fragment the undef dirfrag (*). because
we may open other dirfrags later, the undef dirfrag (*) will
overlap with them.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 09:37:51 +08:00
Yan, Zheng
6e013cd675 mds: properly set COMPLETE flag when merging dirfrags
don't keep the COMPLETE flag when merging dirfrags during journal
replay, because it's inconvenience to check if the all dirfrags
under the 'basefrag' are in the cache and complete. One special case
is that newly created dirfrag get fragmented, then the fragment
operation get rolled back. The COMPLETE flag should be preserved in
this case because the dirfrag still doesn't exist on object store.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 09:37:51 +08:00
Yan, Zheng
ee0ab2b733 mds: fix CInode::get_dirfrags_under()
make the function work when opened dirfrags don't match the
dirfragtree.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-02-17 09:37:50 +08:00