Commit Graph

7357 Commits

Author SHA1 Message Date
Sage Weil
e9f456843c msgr: fix race with signals vs select with pselect
Fixes hang where accepter thread misses the stop signal and
doesn't shut down.
2009-07-14 10:35:03 -07:00
Sage Weil
82fe78cf1d mkcephfs: chown/chmod mount point if non-root 2009-07-14 10:17:29 -07:00
Sage Weil
e4f817030f mds: reconnect caps added via replay+issue_new_caps
Also, set up the initial lock states after reconnecting them!
2009-07-13 17:48:19 -07:00
Sage Weil
ea2f8343d2 mds: check client ranges on mds restart 2009-07-13 17:48:19 -07:00
Sage Weil
2b03d81b1d mds: adjust client range on open existing for write 2009-07-13 17:48:19 -07:00
Sage Weil
e842cf55b2 mds: journal recovered mtime; cleanup
Also avoid using in->inode as that may fail with concurrent updates
(if that's even possible?).
2009-07-13 17:48:19 -07:00
Sage Weil
6867c0cb9a mds: do not check_inode_max_size in eval() path
This is super dangerous, since we may journal something in the
middle of preparing another journal entry.  (This is notably a
problem with calls to issue_new_caps).

Kill fugly NO_SIZE_CHECK flag too, yay.
2009-07-13 17:48:18 -07:00
Sage Weil
b1d5bea560 mds: set client_range on open O_TRUNC
Set client_ranges explicitly.  Move get_layout_size_inc into
inode_t.
2009-07-13 17:48:18 -07:00
Sage Weil
0b454296a3 mds: base client_ranges update on issued|wanted, not just issued 2009-07-13 17:48:18 -07:00
Sage Weil
23aeea4ee7 mds: use SCAN state for file recovery on mds restart
This ensures we revoke other caps before scanning for file
sizes.
2009-07-13 17:48:18 -07:00
Sage Weil
0d5b2c08ad Makefile: fix whitespace 2009-07-13 10:39:25 -07:00
Sage Weil
5cfa35e4af initscript: fix 'reload' 2009-07-13 10:38:23 -07:00
Sage Weil
9a7fdb22a9 initscripts: do what we can to run as user specified in the conf 2009-07-13 10:38:23 -07:00
Sage Weil
5bb2968985 initscripts: substitute in proper autoconf paths
Based on
http://www.gnu.org/software/hello/manual/autoconf/Installation-Directory-Variables.html
2009-07-13 10:30:43 -07:00
Sage Weil
08a6fb733d mds todos 2009-07-10 15:32:56 -07:00
Sage Weil
2789732c9e kclient: simplify/fix cap delay timeouts
Do NOT reset timeouts at the top of ceph_check_caps.. that's just
wrong, and screws up cap release logic.

Reset timeouts when we requeue the cap, since that's what all the
callers do.
2009-07-10 15:32:56 -07:00
Sage Weil
f871d3e0a0 mds: on restart, only recover files affected by missing clients 2009-07-10 15:32:56 -07:00
Sage Weil
3a86b94cb3 mds: maintain per-client write ranges instead of single max_size
We need to track individual clients' ability to write to a file in
order to behave rationally when a client dies or fails to reconnect
after an mds restart.

There is also a behavior change hiding in here: before we were
adjusting max_size based on _wanted_ caps, but that was unsafe,
since a client may have the old max_size value and initiate a write
after informing the mds it no longer wants said caps.  There will
undoubtably be some fallout from that change...

Also clean up instances of memset() on inode_t and friends.  Define
and use constructors instead.
2009-07-10 15:32:56 -07:00
Sage Weil
167f4cad26 uclient: fix getdir() to use new readdir_r return value 2009-07-10 15:32:55 -07:00
Sage Weil
8733b56fe5 uclient: stop using mds inode_t 2009-07-10 15:32:55 -07:00
Sage Weil
28e444dd0a mds: add SCAN, PRE_SCAN lock states
Also clean up state machine array sizes
2009-07-10 15:32:55 -07:00
Sage Weil
2ca5659eec osd: less hexdump on tmap updates 2009-07-10 15:32:55 -07:00
Yehuda Sadeh
bdfc852106 objecter: fix pool objects listing 2009-07-10 13:19:13 -07:00
Sage Weil
58fa7c1bed kclient: fix uninitialized vars 2009-07-09 16:44:09 -07:00
Sage Weil
21804bcc19 todo 2009-07-09 16:34:54 -07:00
Sage Weil
9a5d053459 Revert "kclient: strip out kernel version compatibility cruft"
This reverts commit ac1cf5dc7343953462aa27dc3526dd5ccec9cb53.
2009-07-09 16:33:38 -07:00
Sage Weil
28aa4e8a43 Merge branch 'master' of ssh://ceph.newdream.net/git/ceph 2009-07-09 16:29:36 -07:00
Sage Weil
67822ef05a s3gw: make compilation optional (./configure --with-s3gw) 2009-07-09 16:28:18 -07:00
Sage Weil
280e4df95d uclient: include tid in cap flush, flushsnap 2009-07-09 15:50:29 -07:00
Sage Weil
1961fb75eb kclient: include tid in cap flush, flushsnap
This avoids (dirty 1, flush 1, dirty 2, flush 2, flush_ack 1 ->
mark clean) badness.
2009-07-09 15:41:23 -07:00
Sage Weil
6d95e290aa mds: add tid to cap flush/flushsnap ops
And include in the ACK.
2009-07-09 15:35:22 -07:00
Sage Weil
45e409451a kclient: assign seq to cap flush; avoid starvation on sync_fs
Assign a seq# to each cap flush.  When we sync_fs, wait only for
prior cap flushes to complete.

Also, fix wait_unsafe_requests.
2009-07-09 15:11:52 -07:00
Sage Weil
c8744d6d48 kclient: debug output cleanup 2009-07-09 14:35:19 -07:00
Sage Weil
b5d32fa451 uclient: assign sequence to cap flushes, avoiding sync_fs starvation
Order flushes, so we can wait for them without possibility of
starvation.
2009-07-09 14:35:19 -07:00
Sage Weil
1a255ca1a0 kclient: fix write_inode; force dirty cap flush by mdsc_sync
Adding flag to ceph_check_flags to flush any dirty data.  Pass
through from mdsc_sync.

Also, flush if i_ceph_flags & CEPH_I_FLUSH to avoid letting
write_inode calls similarly leak through.
2009-07-09 14:35:19 -07:00
Greg Farnum
0bd233424b Merged Makefile.am 2009-07-09 14:06:43 -07:00
Greg Farnum
dab180c1ba libceph: SimpleMessenger usage bugfix, added testceph.cc, fixed dependencies 2009-07-09 14:04:06 -07:00
Sage Weil
a4b0764c94 kclient: make sync_fs wait on unsafe mds requests 2009-07-09 12:00:17 -07:00
Sage Weil
72b03df493 libceph: add dependencies to the Makefile 2009-07-09 11:54:22 -07:00
Greg Farnum
6c1fdddf34 libceph: Added getdir to the C++ interface.
Used by hypertable
2009-07-09 11:40:39 -07:00
Greg Farnum
4260265415 Hypertable:Completed initial Cephbroker. Requires testing. 2009-07-09 11:40:39 -07:00
Greg Farnum
523d7033ae hypertable: added skeleton .h and .cc CephBroker
These are meant to be built in Hypertable, obviously.
2009-07-09 11:40:38 -07:00
Sage Weil
0f6e0b3953 uclient: resend cap flushes on mds restart
Fuse doesn't implement sync_fs, so this is difficult to test. :/
2009-07-09 11:17:39 -07:00
Sage Weil
387778e6a0 uclient: change readdir_r return value
1 on success (got a dirent), 0 on end of dir, <0 on error.  This
isn't exactly posix, but is a little less silly.
2009-07-09 10:29:05 -07:00
Sage Weil
8ecffa5686 mds: make clientreplay go faster
Queue up next op as soon as we submit the journal entry.  That maintains
ordering while avoiding any waiting for the journal to flush.
2009-07-09 09:11:57 -07:00
Sage Weil
4daf4762cc uclient: track issue_seq; reset on reconnect 2009-07-08 16:31:58 -07:00
Sage Weil
2acd03a6fb kclient: reset issue_seq on reconnect 2009-07-08 16:31:39 -07:00
Sage Weil
1d4deb1296 mds: ignore cap updates in replayed ops
We already have the caps they think they have; these releases are
obsolete.
2009-07-08 16:31:25 -07:00
Sage Weil
cc54b17150 mds: do not include trace with replayed replies 2009-07-08 16:30:41 -07:00
Sage Weil
5b2b455e24 kclient: track and kick flushing caps per-mds
After an MDS restarts, we need to resend cap flush messages we
were trying to write back.  So, track flushing caps per-session,
with a global counter to make ceph_mdsc_sync simple.  When the
MDS goes active, re-flush anything that was flushing.

Also change old 'sync' terminology to more descriptive 'flushing'.
2009-07-08 15:55:03 -07:00