Commit Graph

10627 Commits

Author SHA1 Message Date
Sage Weil
928512ffc6 crushtool: add simple test function 2010-06-25 21:47:00 -07:00
Sage Weil
59b114a095 crush: fix "in" threshold to be 1.0, not 0.1
We were effectively counting any item with weight > .1 to be weight 1.0.
2010-06-25 21:47:00 -07:00
Greg Farnum
19b4a5ff80 cfuse: remove some NPEs with ESTALE from MDSes.
Under certain circumstances this continues to let you get ESTALE
and not handle it, but those are still being analyzed for a fix.
2010-06-25 16:10:35 -07:00
Sage Weil
bef062942a mds: keep cap follows above in->first in FLUSHSNAP
The client has a follows of 0 initially, which is correct (it does follow
0, and there are no prior snaps).  But the inode has ->first of 2, which
is also fine.  The follows here needs to be at least higher than the
inode first, though, or the caps cloning gets off...
2010-06-24 16:49:52 -07:00
Sage Weil
eeede270a8 qa: read recently written/deleted data back from snap 2010-06-24 16:49:52 -07:00
Sage Weil
9795fabb63 mds: fix client cap condition
In 551a12f52e36 we fixed a bug with cow_inode() where the
cap->client_follows didn't match last precisely.  Instead, we compare
to first.  But the == is too strict.. cap follows that is equal _or_older_
than the clone's first should be copied to the clone inode.

This fixes the simple test case
 $ echo asdf > bar ; mkdir .snap/bar ; rm bar ; cat .snap/bar/bar
 asdf
(Previously we would get nothing unless we waited for the cap to flush on
its own.)
2010-06-24 16:49:52 -07:00
Greg Farnum
478fe72362 ceph_fs: add CEPH_LOCK_IFLOCK so its inclusion elsewhere continues to build 2010-06-24 11:51:59 -07:00
Greg Farnum
62827156b2 mds: add IFLOCK to wait bits to prevent collisions with lock branch 2010-06-24 11:37:29 -07:00
Sage Weil
7ce0338683 crush: fix recursion through intervening types
This fixes pretty core behavior when doing recursion down the tree.  I
suspect it was broken when changing the retry behavior.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-06-24 10:42:20 -07:00
Sage Weil
241d011f05 crush: make CHOOSE_LEAF to behave when leaf type is encountered
We may not want to recursively call crush_choose() if we start out with a
leaf.  If that happens, we need to fill out the out2[] vector with
our result immediately.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-06-24 10:40:14 -07:00
Sage Weil
8f7df4ed4f client: resync with kernel's ioctl.h
This got munged up by the #ifndef/#define guard cleanup.
2010-06-24 10:39:36 -07:00
Sage Weil
07cfbad803 mds: fix SimpleLock wait_shift()
DVERSION was missing, others were overlapping...
2010-06-24 10:39:20 -07:00
Greg Farnum
5634ce8d05 ceph_fs: add CEPH_FEATURE_FLOCK to ceph_fs so its bit doesn't get covered again 2010-06-23 16:35:18 -07:00
Sage Weil
58f4dceb96 osdmap: negative osd ids do not exist
Signed-off-by: Sage Weil <sage@newdream.net>
2010-06-23 14:12:05 -07:00
Sage Weil
b7ad8aa91b crush: behave when chooseleaf is given leaf type
Fill in the out2 choose_leaf vector if it's defined.  This is necessary
because we may not recursively call choose on out2 if the item we're on is
not a bucket (e.g., when chooseleaf is given the leaf type 0).

Signed-off-by: Sage Weil <sage@newdream.net>
2010-06-23 14:08:39 -07:00
Yehuda Sadeh
364521acb0 mds: handle_export_caps, copy cap_import map (instead of swap content)
This fixes #200. The client_map is later on swapped again in the new ESession(),
which left finish->client_map empty.
2010-06-22 14:11:53 -07:00
Greg Farnum
43a7ec4c88 client: properly handle ESTALE by redirecting to auth MDS 2010-06-21 16:27:59 -07:00
Greg Farnum
c89afb4c8b client: don't send cap snap message to MDS if not dirty or writing.
From Sage.
2010-06-21 16:27:58 -07:00
Sage Weil
2e73f737d3 mds: only acquire_locks once in handle_client_open
Subsequent calls will just return with 'already locked'
2010-06-21 11:35:55 -07:00
Sage Weil
2cd04f47c8 mds: rename handle_client_opent 2010-06-21 11:35:55 -07:00
Yehuda Sadeh
027b6c3e6f rados: more descriptive ls usage failure, stdout set implicitly 2010-06-21 11:43:30 -07:00
Yehuda Sadeh
4d86180e53 rbdtool: fix --list 2010-06-21 11:27:41 -07:00
Greg Farnum
90511120a7 osd: fix incorrect logic check on fsid comparison 2010-06-21 10:36:13 -07:00
Greg Farnum
9bbeec4745 osd: Warn and shutdown on a mismatched fsid, instead of failing an assert 2010-06-21 09:46:22 -07:00
Thomas Mueller
c9af6def0c add helptext for option "snapdirname" to manpage of mount.ceph
[ The following text is in the "UTF-8" character set. ]
    [ Your display is set for the "iso-8859-1" character set.  ]
    [ Some characters may be displayed incorrectly. ]

inspired by the addition to
http://ceph.newdream.net/wiki/Snapshots about the snapdirname
 option i've created a patch for the mount.ceph manpage

- Thomas

Signed-off-by: Sage Weil <sage@newdream.net>
2010-06-21 08:33:31 -07:00
Sage Weil
bf3d52a4b7 journal: initialize applied_seq during journal replay
This should avoid

#0  0x00007f41b1a18a75 in raise () from /lib/libc.so.6
#1  0x00007f41b1a1c5c0 in abort () from /lib/libc.so.6
#2  0x00007f41b22cd8e5 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6
#3  0x00007f41b22cbd16 in ?? () from /usr/lib/libstdc++.so.6
#4  0x00007f41b22cbd43 in std::terminate() () from /usr/lib/libstdc++.so.6
#5  0x00007f41b22cbe3e in __cxa_throw () from /usr/lib/libstdc++.so.6
#6  0x00000000005b39f8 in ceph::__ceph_assert_fail (assertion=0x5ec3b2 "seq >= last_committed_seq", file=<value optimized out>, line=711, func=<value optimized out>) at common/assert.cc:30
#7  0x00000000005649e1 in FileJournal::committed_thru (this=0x1116310, seq=0) at os/FileJournal.cc:711
#8  0x000000000055d265 in JournalingObjectStore::commit_finish (this=0x1125740) at os/JournalingObjectStore.cc:186
#9  0x00000000005543f3 in FileStore::sync_entry (this=0x1125740) at os/FileStore.cc:1714
#10 0x00000000004ef93d in FileStore::SyncThread::entry() ()
#11 0x0000000000469a4a in Thread::_entry_func (arg=0x6315) at ./common/Thread.h:39
#12 0x00007f41b28ab9ca in start_thread () from /lib/libpthread.so.0
#13 0x00007f41b1acb6cd in clone () from /lib/libc.so.6
#14 0x0000000000000000 in ?? ()

Signed-off-by: Sage Weil <sage@newdream.net>
2010-06-20 14:41:19 -07:00
Sage Weil
2540ea480a mkcephfs: push conf to remote machines
Signed-off-by: Fred Ar <ar.fred@yahoo.com>
Signed-off-by: Sage Weil <sage@newdream.net>
2010-06-20 09:45:05 -07:00
Sage Weil
3bfabd41ff mon: allow 10ms clock drift before complaining 2010-06-20 09:44:37 -07:00
Fred Ar
775506e9ac debian: include cclass 2010-06-19 08:41:21 -07:00
Fred Ar
d4173fa717 initscript: fix for dash
Signed-off-by: Fred Ar <ar.fred@yahoo.com>
2010-06-19 08:40:00 -07:00
Fred Ar
1f2725bc04 cclass: fix for dash
Signed-off-by: Fred Ar <ar.fred@yahoo.com>
2010-06-19 08:39:37 -07:00
Sage Weil
6d8334759f initscript: remove class loading for now
- only need to do it once, by connecting to a random monitor, not for
  each monitor
- not sure we should try it every time we start the monitor for all time,
  as opposed to once after mkfs, or whenever the admin chooses to load
  new classes
2010-06-18 21:26:41 -07:00
Sage Weil
b3dc5ecf65 vstart: only need to load classes once, not for each monitor 2010-06-18 19:12:01 -07:00
Sage Weil
c626ac3846 Merge branch 'rbd-class' into unstable 2010-06-18 16:32:10 -07:00
Sage Weil
3a2c9169b8 Revert "class: able to add classes when doing mkfs"
This reverts commit 65371482dd.
2010-06-18 16:31:38 -07:00
Sage Weil
fb1ad6e746 filestore: op_start when op is _queued_, so that q is drained on commit
We need the store in a consistent state on commit, which means flushing
transactions such that we have all ops <= a given seq applied.  That is
handled by the commit_start()/commit_started() pair, but will only include
ops in the FileStore queue if we op_start when it is initially queued.
Which is exactly what we want, because the queue can reorder things, so
stopping just currently-being-applied updates will only keep transactions
atomic but not ordered.

Yup!
2010-06-18 15:59:36 -07:00
Sage Weil
6a261eb1cc journal: maintain applied_seq, use that value during the commit.
Track which seq's have successfully applied.

This fixes writeahead mode.  Parallel mode is still broken...
2010-06-18 15:09:05 -07:00
Sage Weil
ed768c9ae0 buffer: fix includes for writev/iovec stuff in write_fd() 2010-06-18 14:30:02 -07:00
Sage Weil
a3e906e3e7 filestore: make sync() and friends actually sync! 2010-06-18 14:09:15 -07:00
Sage Weil
ae90ba1828 initscripts: fix verbose output for root commands 2010-06-18 13:56:24 -07:00
Sage Weil
10d41d2cb4 filejournal: only pad to align for data segments above 64 KB 2010-06-18 13:06:13 -07:00
Sage Weil
f98c0b4f65 filejournal: make alignment optional (<0 == no preferred alignment) 2010-06-18 13:00:23 -07:00
Sage Weil
2be1480a5b Merge branch 'unstable' of ceph.newdream.net:git/ceph into unstable 2010-06-18 12:49:55 -07:00
Sage Weil
3fbc2a2a0a buffer: remove debug cruft 2010-06-18 12:48:01 -07:00
Sage Weil
d1626090b7 filejournal: pad entries on disk based on preferred alignment
Adjust pre/post padding to align entry payload with it's preferred
alignment.
2010-06-18 12:47:13 -07:00
Sage Weil
f59d77be82 objectstore: track offset, alignment of largest data segment [encoding change] 2010-06-18 12:46:23 -07:00
Sage Weil
0995f28fe2 buffer: list::rebuild_page_aligned()
Rebuild bufferlist such that all segments/ptrs are page sized/aligned.
(Avoids copying/reallocating segments that are already aligned.)
2010-06-18 12:44:57 -07:00
Greg Farnum
25116b2738 client: if checking caps on a snap, return, don't assert 2010-06-18 11:38:45 -07:00
Sage Weil
bd4188a02a filejournal: use buffer::write_fd() instead of open coding
Avoid dup code, and also handle short writes.
2010-06-18 10:10:53 -07:00
Sage Weil
ca9b756399 osd: implement bench command
'bench [bsize] [total bytes]'

Result is reported via logclient.
2010-06-18 09:40:01 -07:00