/// track in-flight io
struct IOContext {
+ enum {
+ FLAG_DONT_CACHE = 1
+ };
+
private:
ceph::mutex lock = ceph::make_mutex("IOContext::lock");
ceph::condition_variable cond;
std::atomic_int num_pending = {0};
std::atomic_int num_running = {0};
bool allow_eio;
+ uint32_t flags = 0; // FLAG_*
explicit IOContext(CephContext* cct, void *p, bool allow_eio = false)
: cct(cct), priv(p), allow_eio(allow_eio)
int get_return_value() const {
return r;
}
+
+ bool skip_cache() const {
+ return flags & FLAG_DONT_CACHE;
+ }
};
bool csum_error = false;
r = _generate_read_result_bl(o, offset, length, ready_regions,
compressed_blob_bls, blobs2read,
- buffered, &csum_error, bl);
+ buffered && !ioc.skip_cache(),
+ &csum_error, bl);
if (csum_error) {
// Handles spurious read errors caused by a kernel bug.
// We sometimes get all-zero pages as a result of the read under