Commit Graph

10927 Commits

Author SHA1 Message Date
Sage Weil
5b798a3d47 osd: fix recovery_primary loop on local clone
When we take the clone branch, we update the missing map.  This invalidates
our current iterator, which can cause badness.  Instead, increment the
iterator near the top of the loop so we don't have to worry about it.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-09-30 22:00:06 -07:00
Yehuda Sadeh
569d96bb80 rgw: fix meta attr setting when doing copy operation 2010-09-25 18:12:59 -07:00
Yehuda Sadeh
810ff49974 osd: remove assertion 2010-09-24 10:46:38 -07:00
Sage Weil
113a9bcd95 mds: always pass pick_inode_snap the head
This fixes a possible infinite loop in handle_client_caps().  We need to
_always_ pass the head inode in.
2010-09-23 07:46:37 -07:00
Sage Weil
79b6f2f9e9 mon: return errors (not 0) from MonitorStore::get_bl_ss()
Checked callers, should be fine.
2010-09-22 13:32:11 -07:00
Sage Weil
01b58f38cc msgr: do no open connection when policy indicates we are lossy server
We should not initiate a connection if we are a lossy server; just drop
the message.
2010-09-22 09:26:35 -07:00
Yehuda Sadeh
4b4bdb494b rgw: url_decode url prefix 2010-09-21 15:10:48 -07:00
Yehuda Sadeh
8fc9adfa8f rgw: url_decode delimiter 2010-09-21 15:10:44 -07:00
Sage Weil
b7c4185793 mds: do full pre_dirty()/mark_dirty() on cowed dentries
The dir commit/fetch and LogSegment::try_to_expire() rely on any new or
items in the directory getting new versions that correspond to a bump in
the dirfrag version.  This must include dentries/inodes that are created
by the cow process, or else we have problems during dir commit/fetch or
segment expire.

Change the dirty list in the Mutation to include the pv so that we can
properly mark them dirty later.

Leave the inode one alone.  We could theoretically do the same for the
dirty inodes, but this way we avoid projecting them and copying stuff
around.  Any dirty cowed inode will also have a dirty dentry, so it will
still get saved regardless.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-09-21 13:54:13 -07:00
Sage Weil
3aa948f9aa mds: only return pdnvec for full path_traverse
We should only return the pdnvec for a full traverse.  i.e., either a
success, or a failure in which we instantiate a null dn for the trailing
entry.  This makes pdnvec well defined, and allows callers like
rdlock_path_pin_ref() to reply with a null lease when appropriate.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-09-21 13:54:00 -07:00
Sage Weil
fa277aef7b mds: don't instantiate null dentries for snapped namespace
The dentry needs a [first,last] range and we don't know what first is when
we miss a lookup.  And part of the point of instantiating null dentires is
to issue leases against them, which we don't do.  The client will cache
the null result.
2010-09-21 13:53:29 -07:00
Sage Weil
e4e37a96f6 v0.21.3 2010-09-17 21:03:27 -07:00
Sage Weil
ce63cf424d client: increase default cache size to 16K dentries and lru insertion point .25 2010-09-17 20:12:04 -07:00
Sage Weil
487b8a6acc debian: allow builddebs.sh build a specific dist 2010-09-17 20:12:04 -07:00
Yehuda Sadeh
67f1f1dded rgw: get_data should not be initialized after being set 2010-09-17 18:27:56 -07:00
Yehuda Sadeh
06e27d5105 rgw: make gateway dns name configurable 2010-09-17 18:27:56 -07:00
Sage Weil
a6b1a5e495 mds: drop x/wrlocks before, rdlocks after sending reply
This lets us issue the most leases/caps possible.  It also ensure we can
issue caps in the snapped namespace when we are still on the head inode
(previously, releasing the rdlock twiddled the state, the client didn't
get say Frc, and hung indefinitely).
2010-09-17 11:26:57 -07:00
Sage Weil
9b93367740 mds: touch missed dentry when fetching dir on path traverse
We can get into a loop when doing a path traverse if we miss on a large
directory and then end up trimming the result we need before handling the
original request.  To avoid this, we simply put the wanted dentry at the
top of the LRU (instead of midpoint).

Signed-off-by: Sage Weil <sage@newdream.net>
2010-09-17 09:46:29 -07:00
Greg Farnum
22d211338f client: Make truncation work properly
The previous if block didn't work because inode->size was usually
changed well before handle_cap_trunc was ever invoked, so it never
did the truncation in the objectcacher! This was okay if you just truncated
a file and then closed it, but if you wrote a file, truncated part of it out,
and then wrote past the (new) end you would get reads that returned
the previously-truncated data out of what should have been a hole.

Now, we do the actual objectcacher truncation in update_inode_file_bits,
because all methods of truncation will move through there and this maintains
proper ordering.
2010-09-16 16:54:46 -07:00
Sage Weil
1a4bbb7c4a osd: copy truncate_seq et al to clone oi
These fields are logically object attributes that should be preserved
across the clone COW process.  (Not copying truncate_seq in particular
corrupts snapshot file data, depending on the order of arrival of racing
trimtrunc and writes.
2010-09-16 16:15:30 -07:00
Sage Weil
0023c8843b osd: fix is_pool_snaps_mode() for empty pools
The data pool in particular has seq 0 and (initially) no removed snaps.  We
must not return true for that case, or else the OSD will use an empty
pool snap context and not the user/mds provided one.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-09-16 15:51:06 -07:00
Yehuda Sadeh
52f83d9e2d rgw: fix cleanup for certain ops
This fixes bug #412
2010-09-15 16:29:20 -07:00
Sage Weil
3be64f1fe9 config: fix buffer overrun in env_to_{vec,deq}() 2010-09-12 20:38:05 -07:00
Sage Weil
3695de1e6e osd: fix osdcaps parsing negative return value 2010-09-12 20:26:57 -07:00
Sage Weil
c8da246a3a filestore: handle error opening fsid on mkjournal 2010-09-12 20:26:16 -07:00
Sage Weil
0fd8934947 filestore: handle error reading current_op_seq_fn 2010-09-12 20:25:18 -07:00
Sage Weil
daa733aa6f filestore: return on error creating fsid file 2010-09-12 20:25:18 -07:00
Sage Weil
1a16c01fd0 filestore: fix error paths for _clone() 2010-09-12 09:19:35 -07:00
Sage Weil
eeeaf7a1c5 moncaps: fix array out of bounds in parsing 2010-09-12 09:18:13 -07:00
Sage Weil
5f7a9997be osd: handle nonexistant file in ager 2010-09-11 21:00:06 -07:00
Sage Weil
ca4bb65ef4 osd: check for errors in open, write in write_meta() 2010-09-11 20:59:08 -07:00
Sage Weil
c7658de255 str_list: fix buffer index when start<0
find_first_no_of() can return a negative value.
2010-09-11 20:57:40 -07:00
Sage Weil
ed1f0caf29 mon: less log noise 2010-09-10 13:54:58 -07:00
Sage Weil
a34eddbe76 osdmap: allow blacklist of an entire ip
We can backlist either a specific instance (1.2.3.4:1234/5678) or an
entire IP, in which case the table has something like "1.2.3.4:0/0" (a port
and nonce of 0).
2010-09-09 15:37:09 -07:00
Sage Weil
33fdb9d385 mon: add 'osd blacklist ls' 2010-09-09 15:26:11 -07:00
Henry C Chang
ad40652bdc common: close fd after parsed config file
Signed-off-by: Sage Weil <sage@newdream.net>
2010-09-09 15:18:47 -07:00
Paul Chiang
6bc8090539 mount.ceph: exit with error code from mount
Signed-off-by: Sage Weil <sage@newdream.net>
2010-09-09 15:18:40 -07:00
Sage Weil
bdd5c168fa mon: 'osd blacklist (add|rm) addr [duration]'
Manipulate the OSDMap blacklist.
2010-09-09 15:18:40 -07:00
Sage Weil
797950ef39 mon: fix up variable names to be more clear this is an inclusive range 2010-09-09 11:09:57 -07:00
Sage Weil
2a07960828 mon: fix osdmap subscribe range
Send incremental starting with the next map they want, not the one they
already have.
2010-09-09 11:04:27 -07:00
Sage Weil
6cefd5f1e3 mon: fix send_incremental ranges; behave when sending just 1 inc.
The build_incremental range is inclusive.  And we should behave when
sending a single inc map to get up to date.
2010-09-09 11:03:46 -07:00
Sage Weil
e7462f9003 mon: handle subscribe to osdmap=1
We would send an incremental for anything >1, or the latest map, but not
osdmap e1 itself.  Fix the condition, and make send_incremental() smart
about starting with the full map at 1 as needed.
2010-09-09 10:56:22 -07:00
Sage Weil
448d3d5100 mds: fix journal replay of session close->open after reconnect
If the client reconnects, the journal 'close' replay doesn't remove the
session, which leaves the session state intact.  It needs to reset it in
that case, or else we get problems if the session is reopened and the
state doesn't match up.

Reported-by: Nat N <phenisha@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
2010-09-09 10:01:24 -07:00
Sage Weil
9e383c786b objectcacher: fix use-after-free atomic_sync_readx
readx() releases rd; copy snapid so we can use it later.
2010-09-08 15:42:08 -07:00
Sage Weil
717f458e23 mds: fix use-after-free
We copied the name, but forgot to use it.
2010-09-08 15:38:11 -07:00
Sage Weil
bb4d45d14e mds: fix use-after-free in snaprealm_create_finish
We pass mut's log segment to snapclient->commit().
2010-09-08 15:36:37 -07:00
Sage Weil
5e98e2de4d objectcacher: cleanup release(), just to be clear 2010-09-08 15:33:42 -07:00
Sage Weil
4ccf69b3b3 objecter: add missing return in list_objects
This fixes a use-after-free, and generally bad behavior.
2010-09-08 15:30:32 -07:00
Sage Weil
c30fde48ca objectcacher: fix use-after-free
Move waiter check above close_object(ob) call.
2010-09-08 15:28:21 -07:00
Sage Weil
3eb332aa88 mount: fix scope of secret[]
We use value pointer outside of this block; move declaration up to function
level.
2010-09-08 15:26:28 -07:00