Commit Graph

11071 Commits

Author SHA1 Message Date
Greg Farnum
6ace230b8f Merge branch 'unstable' into leaks
Conflicts:
	src/mds/Locker.cc
2010-08-23 23:41:41 -07:00
Sage Weil
c85a499b8d osd: disable potentially dangerous dead code
Greg got a segfault accessing the OSDOP& first reference. Not clear why,
but this whole block is dead code.
2010-08-20 13:46:38 -07:00
Greg Farnum
1ac5675500 backtrace: fix segfault in tcmalloc.
The print function is only called when we're about to crash anyway,
and the datamember 'foo' is allocated by ptmalloc, not tcmalloc. Freeing
it via tcmalloc causes its own crash which pollutes our debugging and
incorrectly sticks tcmalloc into the stack. So, just don't free.
2010-08-20 13:46:25 -07:00
Sage Weil
b1350c905c mds: fix pick_inode_snap
Return when we find something.
2010-08-19 16:21:47 -07:00
Sage Weil
84e835f1e6 mds: fix intermediate snapped inode updates
Pass head inode to pick_inode_snap!
2010-08-19 16:21:18 -07:00
Sage Weil
3b5a53f01b utime: microsecond -> nanosecond resolution
Strictly speaking, this changes the encoding.  But, the encoding was
broken before, because ceph_timespec in ns but we were actually encoding
us.

But it's all subsecond resolution, so who cares.  Just change it!
2010-08-19 16:02:01 -07:00
Sage Weil
fcea7d96e0 Merge branch 'testing' into unstable 2010-08-19 10:47:19 -07:00
Sage Weil
e3654dfc96 mds: make null snapflush helper, and call on cap removal too
Move remove_client_cap() from MDCache->Locker while we're at it!
2010-08-19 10:47:16 -07:00
Sage Weil
02522afc09 mds: simplify/fix early null snapflush check, clean up comment 2010-08-19 09:57:50 -07:00
Sage Weil
d0f6991eb6 osd: carry ondisk write lock for cloned objects
This fixes a race when reading and deleting objects, as evidenced by

 cp bigfile a
 mkdir .snap/foo
 rmdir a
 diff bigfile .snap/foo/a    <-- reads cloned object before it hits disk

Reproduced by snaptest-snap-rm-cmp.sh.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-19 09:52:55 -07:00
Sage Weil
824de0d6e0 mds: fix crash when REQSCATTER races with an actual scatter/MIX 2010-08-18 15:17:55 -07:00
Sage Weil
c8701f29f0 mds: fix null snapflush logic
We only want to do a null snapflush if we _know_ there isn't another one
coming: that is, there aren't any outstanding issued excl/wr cap bits at
the client.  The old test has the bitwise NOT backwards.  We can also
limit the test to the bits we care about.
2010-08-18 13:49:11 -07:00
Sage Weil
f3b323f6d8 mds: don't send null ack in do_snap_update
(In this case, it's a null flushsnap.)
2010-08-18 13:45:43 -07:00
Sage Weil
466c002f18 qa: add snaptest-snap-rm-cmp
This (usually) reproduced a bug where:

 - we write a big file
 - snap it
 - remove it.  this makes the mds cow it.
 - cp the snapped version.
   - mds syncs the head
   - client starts writeback
   - (sometimes!) client sends other caps back to the mds
     - mds does null flushsnap, not realizing a real one is still coming
2010-08-18 13:44:34 -07:00
Sage Weil
0bcdd0b499 mds: remove forward-on-nonauth-rdlock behavior
The problem is that we may be rdlocking items with a different auth than
the main item we are modifying, so forwarding based on lock state is
inconsistent with our requirement that we be on the modified item's auth.

Either we can somehow mark whether the locked item is the "main thing" we
are operating on, or we can drop the forward behavior from the locker and
put any forwarding heuristics elsewhere.  I'm opting for the latter.
2010-08-18 13:16:57 -07:00
Sage Weil
e8f56d3294 auth: fix skipping of ~/ if $HOME subst fails
We were breaking out of the loop entirely, and failing to check the rest
of the items in the path list.  Doh!
2010-08-18 12:57:13 -07:00
Sage Weil
28d7a40082 mds: oops, fix null snapflush fix 2010-08-18 10:38:40 -07:00
Sage Weil
9908c0ea65 mds: clean up {have,get}_inode() definitions 2010-08-18 10:27:51 -07:00
Sage Weil
625ffd3e67 mds: fix null snapflush inode lookup
Don't use pick_inode_snap is totally wrong (it depends on the current set
of snaps, etc.).. look up the inode directly via the ino and last snapid,
which we have.  Fixes a failure at the assert.

Reported-by: Thomas Mueller <thomas@chaschperli.ch>
Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-18 10:27:51 -07:00
Greg Farnum
9092d65b7b rgw: fix commit warning.
size_t is a long unsigned, not a long long unsigned.
2010-08-18 10:27:48 -07:00
Greg Farnum
5a89b8b2c9 qa: add simple snaprealm test script. 2010-08-17 17:01:43 -07:00
Sage Weil
6d0ccd9c7e mds: handle no flushsnap
We won't get a flushsnap when the client has EXCL/WR caps but no dirty
data.  The MDS needs to release the snapped inode's locks when it gets a
normal update but no FLUSHSNAP.
2010-08-17 16:38:20 -07:00
Sage Weil
9dd2ffd710 qa: snaptest-capwb check no snapflush case first 2010-08-17 14:29:30 -07:00
Sage Weil
d2205a9423 qa: snaptest-upchildreams.sh should clean up after itself 2010-08-17 14:29:30 -07:00
Sage Weil
2551651069 qa: add capwb check for case where client doesn't send flushsnap 2010-08-17 14:29:30 -07:00
Sage Weil
5f9cc443e7 mds: fix rdlock referral on snapped inode to head
Note: this still needs some fixing, as the head and snapped inodes may be
on different MDSs!
2010-08-17 14:29:26 -07:00
Sage Weil
60596c75a1 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-08-17 12:15:04 -07:00
Sage Weil
caec5d2b19 client: direct requests in snapped namespace based on nonsnap parent
We fixed snapdir before.. but we need to do the same for the entire snapped
portion of the namespace.
2010-08-17 12:00:10 -07:00
Sage Weil
a4930d9eea qa: add snaptest-estale.sh
Verify requests withing snapped namespace are directed to the proper
MDS.  We should never get ESTALE, only ENOENT.
2010-08-17 12:00:07 -07:00
Sage Weil
4b6deda441 qa: make snaptest-2 output less ugly 2010-08-16 16:45:26 -07:00
Sage Weil
945c62c687 mds: make inode first track dn first on rename
This mirrors the logic in cc8f5ac47c.  Make
the renamed inode first match the destdn to avoid problems down the line.
Do this after we've (potentially) cowed the inode in the journal_cow_dentry
on srcdn.
2010-08-16 16:45:14 -07:00
Sage Weil
cc8f5ac47c mds: make new inodes follow dn->first
We can get a dn->first that is greater than the parent dir's seq.  Notably,
when we do something like

 mkdir foo
 mkdir foo/.snap/a
 rmdir foo/.snap/a
 rmdir foo

Here, the foo dentry has a high seq, and subsequent mkdir foo should make
sure we give the new foo dir inode the same seq (and not a lower one from
the parent).  Otherwise, things get confused later on.
2010-08-16 16:01:30 -07:00
Sage Weil
2921e13506 mds: flush log on cap writeback if !dirty and unstable locks
The problem is if we revoke caps, nothing is dirty, but we do writeback
because we are adjusting max_size.  Then we have to wait for the log to
flush even though the revocation should proceed immediately.  To move
things along, flush the log immediately.

This still isn't ideal.. it would be nice to allow the locking to continue
and adjust max_size in parallel, but that isn't always possible, and will
require some more thought.
2010-08-16 14:51:25 -07:00
Sage Weil
18cf92aca2 mds: show cdentry authpin debug state 2010-08-16 14:51:25 -07:00
Sage Weil
eb5213eee0 qa: show rm/cp progress on snaptest-2 2010-08-16 14:51:25 -07:00
Sage Weil
4e9ae5d978 qa: add test that client updates realm children on snap update 2010-08-16 14:51:25 -07:00
Sage Weil
064c248654 client: correctly direct snapdir requests
Use real dir (and its caps), not the virtual snapdir.
2010-08-16 14:51:25 -07:00
Greg Farnum
ab2026952f qa: add snap-rm-diff.sh to look for issues with snapshot integrity.
Currently passes the script, although running these steps manually
(especially with smaller files) fails a fair percentage of the time for me.
2010-08-16 11:48:12 -07:00
Sage Weil
1a0ab55321 mds: only kick head on snap rdlock if in SNAP_SYNC state
We may, e.g., be in the SCAN state, which is totally unrelated to the
head!
2010-08-16 08:29:48 -07:00
Sage Weil
cdb8a98601 monclient: gracefully error out when given an invalid monmap path 2010-08-15 19:49:17 -07:00
Sage Weil
273319974d osd: update missing_loc earlier in push
This just avoids l=-1 from showing up in the logs, makes the logic a bit
cleaner (keeps missing and missing_loc in sync).

Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-13 20:40:09 -07:00
Sage Weil
e5c0912650 debian: fix tcmalloc dependency
Depend on libgoogle-perftools0, not libtcmalloc-minimal0, since we link
against libtcmalloc, not libtcmalloc-minimal.  Duh.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-13 15:12:34 -07:00
Sage Weil
165c5f274e client: fix xattr cap writeback 2010-08-13 15:02:12 -07:00
Sage Weil
0be7dcf5e8 client: fix capsnap writeback of uid/gid/mode/xattrs
Some metadata wasn't making it into CapSnap and was subsequently getting
written back zeroed to the MDS.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-08-13 15:02:07 -07:00
Sage Weil
a5e582df85 Merge branch 'tcmalloc' into unstable 2010-08-12 16:32:42 -07:00
Sage Weil
462d317406 ceph.spec.in: require, build with tcmalloc 2010-08-12 16:32:10 -07:00
Sage Weil
49f3ac468f debian: require tcmalloc 2010-08-12 16:32:01 -07:00
Sage Weil
9069b8e598 mds: only kick head on snap rdlock if auth
- If we are non-auth, stick with the snap, and the auth will do the
inference.
- If we are auth, the head had better exist, because our lock is
pinned in an unreadable state for some reason.  Assert as much.
2010-08-12 13:28:47 -07:00
Sage Weil
755aa4fd17 Merge branch 'testing' into unstable 2010-08-12 13:10:44 -07:00
Sage Weil
c5e5237f3e filestore: fix throttling on journal, op_queue for parallel and writeahead 2010-08-12 13:10:28 -07:00