Sage Weil [Thu, 13 Aug 2009 00:08:04 +0000 (17:08 -0700)]
mds: track caps we release in requests, and reissue on request cleanup if needed
We may suppress cap issue when we release caps in a request. A lock state
change may have changed the allowed caps and should normally have issued
caps, but we suppress that because the request will way to embed that
normally. When we cleanup the request, if we haven't issued on that cap
for some reason (maybe the request errored out, or forwarded, etc.), force
an issue then.
Sage Weil [Tue, 11 Aug 2009 22:20:51 +0000 (15:20 -0700)]
kclient: refactor readpages, striping
Make zero filling conditional on whether we did a short read or
the caller wants zeroed pages (e.g. O_DIRECT). Simply lowest level
osdc readpages to do a short read if it hits a stripe boundary;
that is sufficient for the ->readpages() aops.
Sage Weil [Tue, 11 Aug 2009 17:44:04 +0000 (10:44 -0700)]
kclient: fix sync read, avoid unnecessary zeroing in readpages
For readpages and O_DIRECT, we want to zero out the full range
of pages we tried to read, even if the OSD does a short read,
because that implies those pages are full of zeroes.
For a regular sync read, though, we want to pass the OSD's short
read back to the application, and avoid wasting time zeroing
out pages we aren't going to look at.
Greg Farnum [Mon, 10 Aug 2009 23:46:58 +0000 (16:46 -0700)]
uClient: Now pipelines cap flushes like the kclient.
Analagous to the kclient changes in f7e60edead6d025d167715372dad601b499fb5a4.
The kick_flushing_caps function does way too many comparisons, though.
Greg Farnum [Fri, 7 Aug 2009 20:21:34 +0000 (13:21 -0700)]
Hadoop: CephFSInterface cleanup:
better error catching on JNI function use;
removed a few unused functions;
now takes advantage of implicit typecasting for clearer code
(no more manually creating j_ints and storing results to make a 1-line
function into 3+ lines; no more if statements returning JNI_TRUE/FALSE);
modified the getDir function as it wasn't very robust
about checking for . and .. entries and the Java code does that;
modified the Java code listPaths as it wasn't necessarily filling
the array and didn't compact it!
Greg Farnum [Thu, 6 Aug 2009 23:29:50 +0000 (16:29 -0700)]
Hadoop: Throws IOException -> return null; interface requirement.
setReplicationRaw is an old method name, and it doesn't need to be overridden.
getReplication was deprecated and no longer exists.
Greg Farnum [Thu, 6 Aug 2009 23:04:25 +0000 (16:04 -0700)]
Hadoop: libhadoopcephfs now links against libceph
rather than incorporating it; the Java code accounts for this and
loads based on a configuration setting -- no more worries
about java.library.path.
Sage Weil [Wed, 5 Aug 2009 18:38:32 +0000 (11:38 -0700)]
kclient: revamp fsync
Be smarter about when we write back caps on fsync, and when we
wait. Also, wait only for those caps to write back, not for all
caps to be clean, avoiding starvation.
Sage Weil [Tue, 4 Aug 2009 23:08:32 +0000 (16:08 -0700)]
mds: wait for rejoin_gather_finish to complete before finishing
To do that we add ourselves to the rejoin_ack_gather. Otherwise
we end up in up:active before we've even finished our
parallel_fetch or finished up our caps!
Sage Weil [Tue, 4 Aug 2009 23:07:24 +0000 (16:07 -0700)]
mds: set primary lock state to LOCK from strong replica when appropriate
This is needed only because we identify_files_to_recover() before
sending the rejoin acks, and that may twiddle the lock state, so
we need to be in a compatible state.
Sage Weil [Tue, 4 Aug 2009 04:34:15 +0000 (21:34 -0700)]
mds: start resolve with root as UNKNOWN (if it's not ours)
Anything that's not ours should be unknown, including the root dir frag,
which normally starts out as mds0.
If we leave it as 0, then when mds0 claims a subset of /, its bounds are
left as 0 as well instead of being set to unknown. Which leads to
incorrect resolve stage results.