summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | ReplicatedPG: copy: switch CopyCallback to use a GenContextGreg Farnum2013-10-042-48/+42
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | | ReplicatedPG: rename finish_copy -> finish_copyfromGreg Farnum2013-10-012-3/+3
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | | ReplicatedPG: copy: use CopyCallback instead of CopyOp in OpContextGreg Farnum2013-10-012-21/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to make this happen, we make the switch to generate the complete transaction in the generic copy code and save it into the Callback. Then in finish_copy() we just take that transaction and prepend it to the existing transaction. With that change, and by making use of the existing CopyCallback data, we no longer need to access the CopyOp from the OpContext, so we can remove it. Hurray, the pipelines are now independent! Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | | ReplicatedPG: copy: implement CopyFromCallback::finish, remove CopyOp::ctxGreg Farnum2013-10-012-12/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We implement enough of the CopyFromCallback that CopyOp no longer needs a direct reference to the OpContext, so we remove it and replace all references with calls to cop->cb->complete(). Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | | ReplicatedPG: copy: add CopyCallback pointer to CopyOp, and set it upGreg Farnum2013-10-012-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We'll start using it in the next commit; eventually we can use the interfaces we're putting their to replace our link to the OpContext. Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | | ReplicatedPG: copy: start defining CopyCallback structuresGreg Farnum2013-10-011-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Outline the basic interfaces we're going to use, and implement the more obvious ones. Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | | ReplicatedPG: copy: split up the transaction generation from the PG managementGreg Farnum2013-10-012-8/+22
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | | ReplicatedPG: copy: specify the temp_oid in the callerGreg Farnum2013-10-012-7/+13
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | | ReplicatedPG: copy: take an ObjectContextRef in start_copy and use thatGreg Farnum2013-10-012-6/+6
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | | ReplicatedPG: copy: add an ObjectContextRef to CopyOpGreg Farnum2013-10-012-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use that instead of the OpContext::obc in copy codepaths. Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | | ReplicatedPG: follow the same finish path for failed copy opsGreg Farnum2013-10-011-30/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't necessarily want to respond to clients with a failure if a copy got an error code. Instead, conditionally execute the success path and always launch back into execute_ctx() when the copy has stopped (either due to completion or failure). Update the COPY_FROM section so it returns the CopyOp::rval (instead of always zero) and only launches finish_copy() on success. Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | | ReplicatedPG: copy: remove most references to OpContext from process_copy_chunkGreg Farnum2013-10-011-9/+10
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | | ReplicatedPG: copy: do not use an OpContext in _copy_someGreg Farnum2013-10-012-6/+6
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Greg Farnum <greg@inktank.com>
| * | | | ReplicatedPG: update pg stats correctly when doing a copyGreg Farnum2013-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The obs.oi.size needs to updated in the middle so that we actually change the stats -- this got set backwards by mistake during one of the refactors to support large objects! (See 4e29e362e7981634d751ee982144fbf602782a9a) Signed-off-by: Greg Farnum <greg@inktank.com>
* | | | | Merge pull request #667 from ceph/wip-6143David Zafman2013-10-043-74/+141
|\ \ \ \ \ | | | | | | | | | | | | Reviewed-by: Sage Weil <sage@inktank.com>
| * | | | | common, os: Perform xattr handling based on detected fs typeDavid Zafman2013-10-043-5/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In FileStore::_detect_fs() store discovered filesystem type in m_fs_type Add per-filesystem filestore_max_inline_xattr_size_* variants Add per-filesystem filestore_max_inline_xattrs_* variants New function set_xattr_limits_via_conf() Set m_filestore_max_inline_xattr_size based on override or fs type Set m_filestore_max_inline_xattrs based on override or fs type Handle conf change of any relevant value by calling set_xattr_limits_via_conf() Change filestore_max_inline_xattr_size to override if non-zero Change filestore_max_inline_xattrs to override if non-zero Fixes: #6143 Signed-off-by: David Zafman <david.zafman@inktank.com>
| * | | | | common,os: Remove filestore_xattr_use_omap optionDavid Zafman2013-10-042-70/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we operate just like when this was set to true Fixes: #6143 Signed-off-by: David Zafman <david.zafman@inktank.com>
* | | | | | Merge pull request #692 from ceph/wip-5992-2athanatos2013-10-0413-83/+375
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wip 5992 2 Reviewed-by: Sage Weil <sage@inktank.com>
| * | | | | | ReplicatedPG: lock snapdir obc during writeSamuel Just2013-10-042-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, we won't block properly in prep_push_backfill_object. Signed-off-by: Samuel Just <sam.just@inktank.com>
| * | | | | | PGLog: on split, leave log head aloneSamuel Just2013-10-042-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way last_update doesn't go backwards. Fixes: 6447 Signed-off-by: Samuel Just <sam.just@inktank.com>
| * | | | | | FileStore: make _setattrs not return -ENOENT most of the timeSamuel Just2013-10-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com>
| * | | | | | ReplicatedPG: add debugging in recover_replicas for objects added for backfillSamuel Just2013-10-041-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com>
| * | | | | | ReplicatedPG,PG: use PGBackend methods for getattrSamuel Just2013-10-042-16/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com>
| * | | | | | ReplicatedPG,PG: adapt collection_list* users to PGBackend interfaceSamuel Just2013-10-042-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com>
| * | | | | | PG,ReplicatedPG: expose PGBackend to PGSamuel Just2013-10-042-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com>
| * | | | | | PG.cc: remove leading empty spaceSamuel Just2013-10-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com>
| * | | | | | PGBackend,ReplicatedBackend: add interfaces for scanning the pgSamuel Just2013-10-043-0/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will be important since the erasure coded pg will have a different on-disk format than the replicated backend. Signed-off-by: Samuel Just <sam.just@inktank.com>
| * | | | | | ReplicatedPG: don't rescan the local collection if we can avoid itSamuel Just2013-10-043-17/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com>
| * | | | | | common/hobject: add is_degenerate methodSamuel Just2013-10-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com>
| * | | | | | PGMap: calc_min_last_epoch_clean() will now also use osd_epochsSamuel Just2013-10-041-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't want to trim past the current osd map for any up osd. osd_epochs provides a lower bound for that epoch for each osd. Fixes: 5869 Signed-off-by: Samuel Just <sam.just@inktank.com>
| * | | | | | PGMap,PGMonitor: maintain mapping of osd to recent stat epochSamuel Just2013-10-043-19/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, osd_stat will be empty for out osd. When an osd is marked out, rather than remove it from osd_stat, we instead 0 out the structure. This patch also makes osd_stat_updates and osd_stat_rm private. This should make it simpler to enforce invariants on these mappings. Each up osd will have a mapping since out osds are now included as empty stats. Signed-off-by: Samuel Just <sam.just@inktank.com>
* | | | | | | Merge pull request #690 from ceph/wip-fuseSage Weil2013-10-045-22/+128
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | a few ceph-fuse fixes Reviewed-by: Sage Weil <sage@inktank.com> Reviewed-by: Yan, Zheng <zheng.z.yan@intel.com>
| * | | | | | client: remove requests from closed MetaSessionSage Weil2013-10-022-16/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we get a CLOSED message on a session, remove/kick any requests on that session before tearing it down. Otherwise, we get a crash like 2013-09-26 03:51:44.704446 7f4d35a46700 10 client.4111 kick_requests for mds.0 2013-09-26 03:51:45.014156 7f4d35a46700 -1 ./include/xlist.h: In function 'xlist<T>::~xlist() [with T = MetaRequest*]' thread 7f4d35a46700 time 2013-09-26 03:51:44.751908 ./include/xlist.h: 69: FAILED assert(_size == 0) ceph version 0.61.5 (8ee10dc4bb73bdd918873f29c70eedc3c7ef1979) 1: (MetaSession::~MetaSession()+0x425) [0x4e0105] 2: (Client::_closed_mds_session(MetaSession*)+0x116) [0x48a696] 3: (Client::handle_client_session(MClientSession*)+0x2bb) [0x48bf5b] 4: (Client::ms_dispatch(Message*)+0x56b) [0x4bfa0b] 5: (DispatchQueue::entry()+0x3f1) [0x621b31] 6: (DispatchQueue::DispatchThread::entry()+0xd) [0x6191bd] 7: (()+0x7851) [0x7f4d3c168851] 8: (clone()+0x6d) [0x7f4d3b09d90d] Note that this can happen if we fail to reconnect do an MDS during its reconnect interval. If that happens, we probably have inodes in our cache with no caps and things are generally not going to work very well. This is but one step in improving the situation. Separate out the two methods since they share little/no behavior. Signed-off-by: Sage Weil <sage@inktank.com>
| * | | | | | ceph: Update FUSE_USE_VERSION from 26 to 30.majianpeng2013-10-023-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When compiling, it met this error: >In file included from /usr/local/include/fuse/fuse.h:19:0, > from client/fuse_ll.cc:17: >/usr/local/include/fuse/fuse_common.h:474:4: error: #error only API >version 30 or greater is supported Update FUSE_USE_VERSION from 26 to 30. Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
| * | | | | | client: trim deleted inodeYan, Zheng2013-10-023-3/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous patch makes MDS send notification to clients when an inode is deleted. When receiving a such notification, we invalidate any dentry link to the deleted inode. If there is no other reference to the inode, the inode gets trimmed. For cephfs fuse client, we use fuse_lowlevel_notify_inval_entry() or fuse_lowlevel_notify_delete() to notify the kernel to trim the deleted inode. (this is not completely reliable because we play unlink/link tricks when handle MDS replies. it's difficult to keep the user space cache and kernel dcache in sync) Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
* | | | | | | Merge pull request #689 from ceph/wip-6254-modelathanatos2013-10-042-3/+11
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ceph_test_rados: notice read error; do not race rollback with snap_delete Reviewed-by: Samuel Just <sam.just@inktank.com>
| * | | | | | | ceph_test_rados: do not let rollback race with snap deletewip-6254-modelSage Weil2013-10-032-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that the OSD behaves in a weird way when you rollback to a non- existent snap, so the test probably isn't the only party at fault here. Fixes (test half of): #6254 Backport: dumpling, cuttlefish Signed-off-by: Sage Weil <sage@inktank.com>
| * | | | | | | ceph_test_rados: stop on read error!Sage Weil2013-10-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
* | | | | | | | Merge pull request #688 from ceph/wip-6474athanatos2013-10-041-27/+25
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | osd/ReplicatedPG: fix null deref on rollback_to whiteout check Reviewed-by: Samuel Just <sam.just@inktank.com>
| * | | | | | | | osd/ReplicatedPG: fix null deref on rollback_to whiteout checkwip-6474Sage Weil2013-10-031-27/+25
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring this whole if/else chain up one level so that we can capture both ENOENT and whiteout in the same case. (And don't dereference the pointer when we know it is NULL.) Fixes: #6474 Signed-off-by: Sage Weil <sage@inktank.com>
* | | | | | | | Merge remote-tracking branch 'gh/next'Sage Weil2013-10-035-106/+234
|\ \ \ \ \ \ \ \ | | |_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/Makefile.am
| * | | | | | | Merge pull request #557 from ceph/wip-5896Sage Weil2013-10-031-7/+32
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mon: MonmapMonitor: make 'ceph mon add' idempotent Reviewed-by: Sage Weil <sage@inktank.com>
| | * | | | | | | mon: MonmapMonitor: make 'ceph mon add' idempotentJoao Eduardo Luis2013-10-031-7/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MonMap changes lead to bootstraps. Callbacks waiting for a proposal to finish can have several fates, depending on what happens: finished, rerun or aborted. In the case of a bootstrap right after a monmap change, callbacks are rerun. Considering we queued the message that lead to the monmap change on this queue, if we instead of finishing it end up reruning it, we will end up trying to perform the same modification twice -- the last one will try to modify an already existing state and we will return just that: whatever you're attempting to do has already been done. This patch makes 'ceph mon add' completely idempotent. If one tries to add an already existing monitor (i.e., same name, same ip:port), one simply gets a 'monitor foo added', with return 0, no matter how many times one runs the command. Fixes: #5896 Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
| * | | | | | | | Merge pull request #653 from ceph/wip-mon-authSage Weil2013-10-032-90/+118
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mon: Monitor: dissociate msg handling from session and connection logic Reviewed-by: Sage Weil <sage@inktank.com>
| | * | | | | | | | mon: Monitor: reuse 'src_is_mon' bool on dispatchJoao Eduardo Luis2013-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of making the same comparison twice with no gain at all. Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
| | * | | | | | | | mon: Monitor: only handle paxos msgs from a mon && if session has exec capsJoao Eduardo Luis2013-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
| | * | | | | | | | mon: Monitor: dissociate msg handling from session & connection logicJoao Eduardo Luis2013-10-032-50/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes for simpler logic for patches to come. Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
| | * | | | | | | | mon: Monitor: drop client msg if no session exists and msg is not MAuthJoao Eduardo Luis2013-10-031-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we are not a monitor and we don't have a session yet, we must first authenticate with the cluster. Therefore, the first message to the monitor must be an MAuth. If not, we assume it's a stray message and just drop it. Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
| | * | | | | | | | mon: Monitor: assert on absense of connection during dispatchJoao Eduardo Luis2013-10-031-40/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We expect to always have a connection associated with a message. If that happens to not be so, assert. Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
| * | | | | | | | | Merge pull request #677 from ceph/wip-store-toolSage Weil2013-10-022-9/+83
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wip-store-tool: Few patches to ceph_test_store_tool Reviewed-by: Sage Weil <sage@inktank.com>