osd_types: add read_error flag to Scrubmap::object

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG::_scan_list: record read errors in the Scrubmap::object

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG: make _select_auth_object smarter

Previously, we just picked the first one to have the object in
question.  Now, we will attempt to choose one that has as
much of the following as possible:
1) has the object (there must be one)
2) has an object_info attr
3) has a valid object_info attr
4) has an object_info whose size matches the scrubbed size

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG::_select_auth_object: prefer a peer which did not hit a read error

Signed-off-by: Samuel Just <sam.just@inktank.com>
FileStore,OSD: add mechanism for injecting EIO, truncating obj

This will be used in testing repair.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG: read_error should trigger a repair in _compare_scrub_objects

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG: pass authoritative scrub map to _scrub

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG: don't compare auth with itself

Signed-off-by: Samuel Just <sam.just@inktank.com>
ObjectStore: add allow_eio to read, stat, get_omap_header

This will allow enlightened callers to handle EIO.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG: _scan_list can now handle EIO on read, stat, get_omap_header

Signed-off-by: Samuel Just <sam.just@inktank.com>
FileStore: rename debug_delete_obj to debug_obj_on_delete

This should make the method intent less confusing.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG::_scan_list: assert if error is neither -EIO nor -ENOENT

Signed-off-by: Samuel Just <sam.just@inktank.com>
Merge pull request #181 from ceph/wip_4510

Scrub/repair should correctly handle truncation and EIO

Fixes #4510
Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>