BlueFS::FileWriter *h;
ASSERT_EQ(0, fs.mkdir("dir"));
ASSERT_EQ(0, fs.open_for_write("dir", "file", &h, false));
- bufferlist bl;
- bl.append("foo");
- h->append(bl);
- bl.append("bar");
- h->append(bl);
- bl.append("baz");
- h->append(bl);
+ h->append("foo", 3);
+ h->append("bar", 3);
+ h->append("baz", 3);
fs.fsync(h);
fs.close_writer(h);
}
ASSERT_EQ(0, fs.mkdir("dir"));
ASSERT_EQ(0, fs.open_for_write("dir", "file", &h, false));
for (unsigned i = 0; i < 10000; ++i) {
- bufferlist bl;
- bl.append("fddjdjdjdjdjdjdjdjdjdjjddjoo");
- h->append(bl);
+ h->append("abcdeabcdeabcdeabcdeabcdeabc", 23);
}
fs.fsync(h);
fs.close_writer(h);
BlueFS::FileWriter *h;
ASSERT_EQ(0, fs.open_for_write("dir", "file_sync", &h, false));
for (unsigned i = 0; i < 1000; ++i) {
- bufferlist bl;
- bl.append("fddjdjdjdjdjdjdjdjdjdjjddjoo");
- h->append(bl);
+ h->append("abcdeabcdeabcdeabcdeabcdeabc", 23);
fs.fsync(h);
}
fs.close_writer(h);
char *buf = gen_buffer(ALLOC_SIZE);
bufferptr bp = buffer::claim_char(ALLOC_SIZE, buf);
bl.push_back(bp);
- h->append(bl);
+ h->append(bl.c_str(), bl.length());
r = fs.fsync(h);
if (r < 0) {
fs.close_writer(h);
char *buf = gen_buffer(ALLOC_SIZE);
bufferptr bp = buffer::claim_char(ALLOC_SIZE, buf);
bl.push_back(bp);
- h->append(bl);
+ h->append(bl.c_str(), bl.length());
fs.fsync(h);
fs.close_writer(h);
}
char *buf = gen_buffer(ALLOC_SIZE);
bufferptr bp = buffer::claim_char(ALLOC_SIZE, buf);
bl.push_back(bp);
- h->append(bl);
+ h->append(bl.c_str(), bl.length());
r = fs.fsync(h);
if (r < 0) {
fs.close_writer(h);
char *buf = gen_buffer(4096);
bufferptr bp = buffer::claim_char(4096, buf);
bl.push_back(bp);
- h->append(bl);
+ h->append(bl.c_str(), bl.length());
fs.fsync(h);
fs.close_writer(h);
}
char *buf = gen_buffer(4096);
bufferptr bp = buffer::claim_char(4096, buf);
bl.push_back(bp);
- h->append(bl);
+ h->append(bl.c_str(), bl.length());
fs.fsync(h);
fs.close_writer(h);
}