Don't fork. (Already fixed in master branch by the start_with_nonce
refactor, so this is just for 0.27.1.)
Signed-off-by: Sage Weil <sage@newdream.net>
The fuse layer passes through "encoded" dev_t values (probably for
compatibility reasons or something). I copied the encode/decode methods
from the kernel and encode/decode the st_rdev values where appropriate
(where struct stat is exposed directory or via the fuse_entry_param
struct).
Fixes: #1031
Signed-off-by: Sage Weil <sage@newdream.net>
Order this op wrt reads the same way a read-modify-write would be.
(Otherwise we may get a fast/stale read result on a not-yet-complete
write.)
This fixes a problem where the Filer was marking a probe stat as a write
to get this same effect, but the OSD would EINVAL if it was a snapped
object (which happens in certain cases where the MDS is recovering the
file size of a snapped file).
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
We were seeing weird trim errors because expire_pos was getting moved
backwards after a standby-replay -> replay transition. Make sure the two
places that update the expire_pos only move it forward--never backward.
Fixes: #1023
Signed-off-by: Sage Weil <sage@newdream.net>
When we re-read the head we may get an expire_pos that has moved forward in
time. That is the appropriate time to trim segments during standby-replay.
Signed-off-by: Sage Weil <sage@newdream.net>
lenny doesn't have a suitable libgoogle-perftools-dev, and
release.sh edits it out of build-deps. Detect that and tell
configure that not having tcmalloc is ok.
This should make 05c281bfa9
unnecessary.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
This is not strictly needed as of 05c281bfa9,
but that reverting is hopefully only temporary.
Without this, with 05c281 undone, non-mainstream architectures
would fail to build.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
These are added to the LogSegment list on the slaves, but also need to be
removed from that list when we replay a COMMIT|ROLLBACK or when the op's
fate is determined during the resolve stage.
This fixes a crash like
./include/elist.h: In function 'elist<T>::item::~item() [with T =
MDSlaveUpdate*]', in thread '0x7fb2004d5700'
./include/elist.h: 39: FAILED assert(!is_on_list())
ceph version 0.26 (commit:9981ff90968398da43c63106694d661f5e3d07d5)
1: (MDSlaveUpdate::~MDSlaveUpdate()+0x59) [0x4d9fe9]
2: (ESlaveUpdate::replay(MDS*)+0x422) [0x4d2772]
3: (MDLog::_replay_thread()+0xb90) [0x67f850]
4: (MDLog::ReplayThread::entry()+0xd) [0x4b89ed]
5: (()+0x7971) [0x7fb20564a971]
6: (clone()+0x6d) [0x7fb2042e692d]
ceph version 0.26 (commit:9981ff90968398da43c63106694d661f5e3d07d5)
1: (MDSlaveUpdate::~MDSlaveUpdate()+0x59) [0x4d9fe9]
2: (ESlaveUpdate::replay(MDS*)+0x422) [0x4d2772]
3: (MDLog::_replay_thread()+0xb90) [0x67f850]
4: (MDLog::ReplayThread::entry()+0xd) [0x4b89ed]
5: (()+0x7971) [0x7fb20564a971]
Fixes: #1019
Signed-off-by: Sage Weil <sage@newdream.net>
Fixes bug where oi.size gets out of sync with the object size because we
actually write zeros. (This explains #933.)
Signed-off-by: Sage Weil <sage@newdream.net>
finish_export_inode changes states! That's not good for our checks,
so just handle unpinning and stuff before we finish_export_inode.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
We need to handle locks and pins on exported inodes but we
were using a separate if block with its own (non-matching!) check
for no good reason.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Otherwise these pins are never dropped from the inode since we
don't go through our normal xlock teardown code. Now we do!
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
We don't want auth_pins on the locallocks (they're never auth_pinned)
and we only want new auth_pins that are for locks on the inode that we
imported -- not for each xlock that the mdr has everywhere (like,
say, on the srcdn)!
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Because we can do an inode import during a rename that skips the usual
channels, we were getting into an odd state with the xlocks (which we
did as a slave for an inode that we exported away). Clean up the
record of these xlocks for inodes before we get into the request
cleanup (at which point we are labeled as no-longer-auth, and the
standard cleanup routines will break).
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Because we can do an inode import during a rename that skips the usual
channels, we were getting into an odd state with the xlocks (which
were formerly remote and are now local). Clean up the record of
those remote xlocks.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
This was broken a while ago during the last refactor. Whoops! Clean it
up to be smarter (and work at all).
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
rename all the get_uid_by_* to get_user_info_by_*, remove get_user_info()
and call the appropriate function instead (either the by_uid or by_access_key).
In that case we get ENOSYS. This also implies an old version of the client
and that we should fall back.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
We previously dropped the request but that was inappropriate for that
one case because the replica has no way to trigger a resend.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>