diff options
author | David Zafman <david.zafman@inktank.com> | 2013-03-12 20:49:25 -0700 |
---|---|---|
committer | David Zafman <david.zafman@inktank.com> | 2013-03-14 10:20:03 -0700 |
commit | f56620b7fcb188469c3c006cb39a14311a1aeacc (patch) | |
tree | 572ee835441cb46205827b52d587f394fc8a19c5 /src/osd/OSD.h | |
parent | 8d8f892c8d2bb3c07f5159f7951ac9d607970873 (diff) | |
download | ceph-f56620b7fcb188469c3c006cb39a14311a1aeacc.tar.gz |
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>
Diffstat (limited to 'src/osd/OSD.h')
-rw-r--r-- | src/osd/OSD.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 1ee2750c444..1ce80e1414e 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -397,6 +397,15 @@ public: void expand_pg_num(OSDMapRef old_map, OSDMapRef new_map); + // -- OSD Full Status -- + Mutex full_status_lock; + enum s_names { NONE, NEAR, FULL } cur_state; + time_t last_msg; + float get_full_ratio(); + float get_nearfull_ratio(); + void check_nearfull_warning(const osd_stat_t &stat); + bool check_failsafe_full(); + OSDService(OSD *osd); }; class OSD : public Dispatcher, |