<commit_before>#include "arch/io/disk/pool.hpp"
#include "config/args.hpp"
#include <boost/bind.hpp>

#define BLOCKER_POOL_QUEUE_DEPTH (MAX_CONCURRENT_IO_REQUESTS * 2)

pool_diskmgr_t::pool_diskmgr_t(
        linux_event_queue_t *queue, passive_producer_t<action_t *> *_source)
    : source(_source),
      blocker_pool(MAX_CONCURRENT_IO_REQUESTS, queue),
      n_pending(0) {
    if (source->available->get()) pump();
    source->available->set_callback(this);
}

pool_diskmgr_t::~pool_diskmgr_t() {
    source->available->unset_callback();
}

void pool_diskmgr_t::action_t::run() {
    int res;
    if (is_read) {
        res = pread(fd, buf, count, offset);
    } else {
        res = pwrite(fd, buf, count, offset);
    }
    guarantee_err((size_t)res == count, "pread()/pwrite() failed.");
}<commit_msg>Cleaned up include ordering in pool.cc.<commit_after>#include "arch/io/disk/pool.hpp"

#include "errors.hpp"
#include <boost/bind.hpp>

#include "config/args.hpp"

#define BLOCKER_POOL_QUEUE_DEPTH (MAX_CONCURRENT_IO_REQUESTS * 2)

pool_diskmgr_t::pool_diskmgr_t(
        linux_event_queue_t *queue, passive_producer_t<action_t *> *_source)
    : source(_source),
      blocker_pool(MAX_CONCURRENT_IO_REQUESTS, queue),
      n_pending(0) {
    if (source->available->get()) pump();
    source->available->set_callback(this);
}

pool_diskmgr_t::~pool_diskmgr_t() {
    source->available->unset_callback();
}

void pool_diskmgr_t::action_t::run() {
    int res;
    if (is_read) {
        res = pread(fd, buf, count, offset);
    } else {
        res = pwrite(fd, buf, count, offset);
    }
    guarantee_err((size_t)res == count, "pread()/pwrite() failed.");
}
{'fraction_non_alphanumeric': 0.15126050420168066, 'fraction_numerical': 0.0024009603841536613, 'mean_word_length': 4.225705329153605, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1518468', 'n_tokens_mistral': 633, 'n_tokens_neox': 627, 'n_words': 99}