Commit Graph

13255 Commits

Author SHA1 Message Date
Greg Farnum
4328a550eb MDCache: add max_dir_commit_size.
Configured by setting mds_dir_max_commit_size in conf, or else
by looking at osd_max_write_size. This should lead to sane
max commits even if the user doesn't specify anything.

This will be used in the next commit or to by CDir.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-02-11 15:54:18 -08:00
Greg Farnum
74c4d867d6 MDS: Don't always _commit_full just because we have a complete dir.
Instead, commit if a certain percentage of the dentries are dirty.
Configurable via mds_dir_commit_ratio!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-02-11 13:56:45 -08:00
Sage Weil
7fea444bb6 Merge remote branch 'origin/librbd' 2011-02-11 13:29:32 -08:00
Josh Durgin
b7d1d0522f objecter: set linger op target pg when a linger is resent
send_linger always creates a new Op, but op_submit does not fill in
the target pg if an existing session is passed in, so when a linger
was resent, it had the wrong pg set.

This caused a crash in cosd with debugging turned on when running
testlibrbd twice. This occurred because the object context for the
linger in the wrong pg had no object name set.
2011-02-11 13:21:52 -08:00
Colin Patrick McCabe
7e1ebd7a08 Disable lockdep for ExportControl, ConfFile locks
Currently, we haven't read the configuration at the time we initialize
these locks. So we can't know whether lockdep has been enabled, or what
verbosity it is supposed to have. So just disable it on these locks.

Potentially ExportControl's initialization could be moved to after
g_conf.lockdep and g_conf.debug_lockdep have been read from the
configuration, if lockdep is needed for this component.

ConfFile probably doesn't need a lock at all, but that's another story.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-11 11:10:48 -08:00
Greg Farnum
3129581e89 MDCache: switch CDir::_commit so that it can limit max write size.
This should fix #777.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-02-11 17:03:39 -08:00
Greg Farnum
12e14f70db MDCache: add max_dir_commit_size.
Configured by setting mds_dir_max_commit_size in conf, or else
by looking at osd_max_write_size. This should lead to sane
max commits even if the user doesn't specify anything.

This will be used in the next commit or to by CDir.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-02-11 17:03:39 -08:00
Greg Farnum
fa4a9230c6 MDS: Don't always _commit_full just because we have a complete dir.
Instead, commit if a certain percentage of the dentries are dirty.
Configurable via mds_dir_commit_ratio!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-02-11 16:16:33 -08:00
Sage Weil
b7de2fd008 .gitignore: py-compile
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-02-11 15:38:49 -08:00
Colin Patrick McCabe
cde53e9575 Merge branch 'pybind' 2011-02-11 07:50:13 -08:00
Sage Weil
cd85992302 librados: include headers in dist tarball
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-02-11 14:36:34 -08:00
Josh Durgin
0c97d79056 ceph.spec.in: add librbd 2011-02-11 13:48:02 -08:00
Tommi Virtanen
e21034e14e Make git ignore librbd tests. 2011-02-11 13:50:42 -08:00
Sage Weil
27a7b5a73d ceph: add --concise flag
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-02-11 13:42:51 -08:00
Sage Weil
1c320ebe65 Merge branch 'stable'
Conflicts:
	configure.ac
2011-02-11 13:41:56 -08:00
Sage Weil
09c019bbf5 monclient: fix weirdness when we explicitly start with non-master mon
Fix

$ ./ceph -m 10.0.1.252:6790 health
2011-02-11 12:30:38.132728 mon <- [health]
2011-02-11 12:30:38.133243 mon <- [health]
2011-02-11 12:30:38.133697 mon0 -> 'Access denied' (-13)

when the IP we specify is, e.g., for mon.b.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-02-11 12:55:38 -08:00
Colin Patrick McCabe
f70d9047c5 config: Remove g_conf.num_osd, num_mds, num_mon
These configuration options don't serve any use and were confusing.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-11 06:00:57 -08:00
Tommi Virtanen
718c42b9df Make git ignore qa/workunits/direct_io_test. 2011-02-11 12:58:06 -08:00
Colin Patrick McCabe
8a1906a017 MonitorStore: check for ENOENT, not EEXIST
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-11 04:03:30 -08:00
Colin Patrick McCabe
a350296deb common: bufferlist::read_file: use safe_read
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-11 03:51:05 -08:00
Colin Patrick McCabe
d43129524e auth/Crypto.cc: use safe_read_exact
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-11 03:31:31 -08:00
Colin Patrick McCabe
22dece176d os/FileStore: remove unused variable
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-11 02:55:41 -08:00
Sage Weil
2cd2c56dd0 v0.24.3 2011-02-10 09:49:28 -08:00
Colin Patrick McCabe
b60444b5c1 make:add messages/MOSDRepScrub.h to NOINST_HEADERS
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 09:49:28 -08:00
Colin Patrick McCabe
c695a61f40 cephtool: get_indata should use safe_read_exact
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 09:16:22 -08:00
Colin Patrick McCabe
378ba0a119 mon/MonitorStore.cc: use safe_read
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 09:16:22 -08:00
Colin Patrick McCabe
42b735c4fe rados.cc: use fwrite to output data to stdout
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 09:16:22 -08:00
Colin Patrick McCabe
c7886ba5b5 common/common_init: use safe_read
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 09:16:22 -08:00
Colin Patrick McCabe
e5fbf5ec8f os/FileStore: fix error handling
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 09:16:22 -08:00
Wesley Spikes
12a47f5648 s3.sh: simple bug fix 2011-02-10 15:43:30 -08:00
Yehuda Sadeh
1021f5e26e rados: add create op 2011-02-10 15:41:06 -08:00
Colin Patrick McCabe
ff85407b43 common/DoutStreambuf: use safe_io.h
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 08:00:34 -08:00
Colin Patrick McCabe
2aabb909d8 tools/common: use fwrite to write stdout
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 07:09:24 -08:00
Colin Patrick McCabe
70a8b625c8 osd: write_meta/read_meta: fix error handling
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 07:08:46 -08:00
Colin Patrick McCabe
59874008dd msgr: better error checking for write_pid_file
Use safe_write. Check error code of close.

Fix what looks like a "lack of braces around multi-statement block"
error where we always complain that we're unable to write the pid file,
even if we succeed.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 06:49:15 -08:00
Colin Patrick McCabe
635c535c56 os/FileStore.cc: use safe_write
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 06:47:55 -08:00
Colin Patrick McCabe
c3f0f09d98 common/buffer.cc: kill deadcode
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 06:47:55 -08:00
Colin Patrick McCabe
0d4244d8e0 common/ConfUtils.cc: use safe_write
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 06:47:52 -08:00
Colin Patrick McCabe
d249194190 MonitorStore::put_int: handle I/O errors
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 06:21:04 -08:00
Colin Patrick McCabe
56943deb88 common/safe_io.h: warn about unchecked returns
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 06:02:46 -08:00
Colin Patrick McCabe
e8ac5aa2a4 cfuse.cc: use safe_write
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 05:55:10 -08:00
Colin Patrick McCabe
4a4c2eeb5d mds/Dumper: use safe_write
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 05:55:10 -08:00
Colin Patrick McCabe
ea80a0669e btrfs_ioc_test.c: use safe_write
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 05:55:01 -08:00
Colin Patrick McCabe
cd2a2d7372 test_disk_bw.cc: use safe_write
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 05:49:10 -08:00
Colin Patrick McCabe
4de7fd4931 common: safe_io: allow C files to include safe_io
Don't use extern C unless we're compiling with C++.
This allows C files to include safe_io.h

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 05:47:42 -08:00
Colin Patrick McCabe
84b90892bf client/fuse_ll: use safe_write
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 05:14:45 -08:00
Colin Patrick McCabe
b161e6a3cb os: convert some read/write uses to safe variants
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 04:58:47 -08:00
Colin Patrick McCabe
a743e314b9 common:safe_io: create exact and non-exact variant
Create safe_read_exact, which fails with -EDOM unless it reads exactly
the requested number of bytes. More often, what we want is the
semantics of safe_read, which returns the number of bytes it read, or
negative on error. Likewise for pread.

Write doesn't need variants because failing to write all the bytes is
always an error.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 04:58:47 -08:00
Colin Patrick McCabe
380ccfd76b common: safe_io: handle EOF on read
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-10 04:58:47 -08:00
Sage Weil
500edf7a81 rbd: fix signed/unsigned comp on i386
We -D_FILE_OFFSET_BITS=64, so off_t is off64_t.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-02-10 09:01:09 -08:00