Commit Graph

24697 Commits

Author SHA1 Message Date
Danny Al-Gaaf
a42e9ef802 mds/CInode.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:23:59 +01:00
Danny Al-Gaaf
1e60fcfa67 mds/CDir.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:21:45 +01:00
Danny Al-Gaaf
d0d8929437 mds/AnchorServer.h: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:18:05 +01:00
Danny Al-Gaaf
8b96655b33 mds/AnchorServer.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:18:05 +01:00
Danny Al-Gaaf
1525053c15 mds/AnchorClient.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:18:05 +01:00
Danny Al-Gaaf
f4a78a244e librbd/internal.cc: prefer prefix ++operator for iterators
Prefer prefix ++operator for iterators, move iterator declaration into
the related for loop.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:18:05 +01:00
Danny Al-Gaaf
2ef97a689e librbd/ImageCtx.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:18:05 +01:00
Danny Al-Gaaf
7332796023 librados/RadosClient.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:18:05 +01:00
Danny Al-Gaaf
5ac012acfd librados/IoCtxImpl.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:18:05 +01:00
Danny Al-Gaaf
ab46e6d56c libcephfs.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:18:05 +01:00
Danny Al-Gaaf
e8d59d563e kv_flat_btree_async.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:18:04 +01:00
Danny Al-Gaaf
46c0d9ce55 key_value_store/cls_kvs.cc: prefer prefix --operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:18:04 +01:00
Danny Al-Gaaf
e2776a93e6 crush/CrushWrapper.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:18:04 +01:00
Danny Al-Gaaf
9a1b86303d crush/CrushCompiler.cc: prefer prefix --operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:18:04 +01:00
Danny Al-Gaaf
381bee3e32 common/lockdep.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:18:04 +01:00
Danny Al-Gaaf
60cedb1163 client/SyntheticClient.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:18:04 +01:00
David Zafman
f56620b7fc osd: data loss: low space handling
Add check whether to allow writing ops based on failsafe full percentage
Check for failsafe nearfull warning or full error message every heartbeat
Use clock to limit messages to every 30 secs (osd_op_complaint_time)

Feature: #4197

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-03-14 10:20:03 -07:00
David Zafman
8d8f892c8d Simplify may_write()
CEPH_MDS_OP_CREATE has CEPH_MDS_OP_WRITE bit set so already checked

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-03-13 21:37:28 -07:00
Samuel Just
04c8a3bd39 Merge branch 'wip_omap_snaps'
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-03-13 19:59:39 -07:00
Samuel Just
388616b073 OSD: remove snap_mapper entries in RemoveWQ
This is a somewhat ugly hack for now until we implement
pg resurrection.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 19:45:13 -07:00
Samuel Just
3177cb8557 PG: check and repair snap_mapper entries during scrub
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 19:45:13 -07:00
Samuel Just
8665839251 OSD,PG: add upgrade procedure for snap_mapper
Also, sub_op_modify transactions currently carry the operations
for creating snap links in the shipped transaction.  To handle
ops shipped by unenlightened osds, transactions can now be
tagged with a tolerate_collection_add_enoent flag.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 19:45:12 -07:00
Samuel Just
8631e92579 osd/: Integrate SnapMapper with OSD
- SnapTrimmer now uses SnapMapper to get the next object to trim
- Entries for a snap are implicitely removed from SnapMapper when
the last object is trimmed, so no need for the adjust_local_snaps
logic.
- Scrub now compares the object_info snaps set on the object attr
with the version stored in the SnapMapper.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 19:45:12 -07:00
Samuel Just
8db029db40 Makefile: add SnapMapper to osd
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 19:45:12 -07:00
Samuel Just
354f33d96d test/: add tests for map_cacher
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 19:45:12 -07:00
Samuel Just
580ea548be osd/: add SnapMapper
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 19:45:12 -07:00
Samuel Just
2f9e369129 common/: add map_cacher
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 19:45:12 -07:00
Samuel Just
984c0c3d0f common/shared_ptr.hpp: add get_next and expose VPtr and WeakVPtr types
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 19:45:12 -07:00
Samuel Just
4ac16ec9b5 filestore: add debug option to verify split results
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 19:45:12 -07:00
Samuel Just
03e5330844 DBObjectMap, hobject: add helpers for pgid bit matching
Create helpers in hobject for generating prefixes for a
pg as well as matching hobjects against a pgid/numpgs
combo.  Use these in HashIndex.cc.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 19:45:12 -07:00
Samuel Just
0b436abe3a ObjectStore: add Context management to Transaction
ObjectStore now appends passed contexts in queue_transaction
to the Transaction contexts and uses that to pass into
the virtual queue_transactions.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 19:45:12 -07:00
Samuel Just
f6500f5975 Context: allow C_Contexts to not have a cct, add list_to_context
This will simplify the SnapMapper implementation.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 19:45:11 -07:00
Samuel Just
7db2a5115b ObjectStore: move queue_transaction into ObjectStore
This will simplify the SnapMapper implementation.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 19:45:11 -07:00
Samuel Just
78db663ec7 osd_internals/snaps.rst: update description to reflect SnapMapper
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 19:45:08 -07:00
Samuel Just
ba449ce031 osd_internals/snaps.rst: add a description of snaps and trimming
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 18:48:24 -07:00
Samuel Just
be95af7bf8 PG::read_log: fix assert, split may introduce holes in the log
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 18:48:24 -07:00
Samuel Just
1a8c1701cc OSD: add debugging to start_split and complete_split
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 18:48:24 -07:00
Samuel Just
de22b186c4 PG: check_recovery_sources must happen even if not active
missing_loc/missing_loc_sources also must be cleaned up
if a peer goes down during peering:

1) pg is in GetInfo, acting is [3,1]
2) we find object A on osd [0] in GetInfo
3) 0 goes down, no new peering interval since it is neither up nor
acting, but peer_missing[0] is removed.
4) pg goes active and try to pull A from 0 since missing_loc did not get
cleaned up.

Backport: bobtail
Fixes: #4371
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-03-13 18:14:43 -07:00
Samuel Just
7a434d10da FileStore: fix reversed collection_empty return value
Backport: bobtail
Fixes: #4380
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-03-13 18:14:43 -07:00
Samuel Just
ce4432adc6 HashIndex: _collection_list_partial must tolerate NULL next
Backport: bobtail
Fixes: #4379
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-03-13 18:14:43 -07:00
Samuel Just
e4bf1bcab1 OSD: lock not needed in ~DeletingState()
No further refs to the object can remain at this point.
Furthermore, the callbacks might lock mutexes of their
own.

Backport: bobtail
Fixes: #4378
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-03-13 18:14:43 -07:00
Samuel Just
32bf131e01 ReplicatedPG: don't leak reservation on removal
Fixes: 4431
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-03-13 18:14:43 -07:00
Sage Weil
22f51f02e2 Merge remote-tracking branch 'dalgaaf/wip-da-performance'
Conflicts:
	src/client/Client.cc

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-13 16:46:47 -07:00
Sage Weil
8b71337144 Merge branch 'wip-mds-con'
Reviewed-by: Greg Farnum <greg@inktank.com>
Tested-by: Noah Watkins <jayhawk@cs.ucsc.edu>
2013-03-13 16:38:38 -07:00
Sage Weil
8123a1fd55 mds: log session resets more cleanly
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:38:28 -07:00
Sage Weil
311704f36d mds: use session con ref to mark down killing session
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:38:28 -07:00
Sage Weil
dcda366947 mds: mark con for closed session disposable
If there is a fault while delivering the message, close the con.  This will
clean up the Session state from memory.  If the client doesn't get the
CLOSED message, they will reconnect (from their perspective, it is still
a lossless connection) and get a remote_reset event telling them that the
session is gone.  The client code already handles this case properly.

Note that way back in 4ac45200f1 we removed
this because the client would reuse the same connection when it reopened
the session.  Now the client never does that; it will mark_down the con
as soon as it is closed and open a new one for a new session... which means
the MDS will get a remote_reset and close out the old session.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:38:28 -07:00
Sage Weil
5c9186cb29 mds: useless cleanup
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:38:28 -07:00
Sage Weil
2b55470dea mds: mark_down old sessions using con
Use the Connection ref to mark old client sessions down.  This is cleaner.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:38:28 -07:00
Sage Weil
f67596a447 Merge branch 'wip-4390-b'
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-03-13 16:37:29 -07:00