]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
10 years agoAdded missing semaphore in libradosstriper AIO tests leading to potential memory... 2419/head
Sebastien Ponce [Thu, 9 Oct 2014 13:44:06 +0000 (15:44 +0200)]
Added missing semaphore in libradosstriper AIO tests leading to potential memory corruption and thus test failures

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
10 years agoFixed remaining part of the seg fault described in bug 9356 by adding reference count...
Sebastien Ponce [Wed, 15 Oct 2014 14:05:00 +0000 (16:05 +0200)]
Fixed remaining part of the seg fault described in bug 9356 by adding reference counting to CompletionData

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
10 years agoFixed part of the seg fault described in bug 9356 by adding reference counting on...
Sebastien Ponce [Mon, 8 Sep 2014 12:23:03 +0000 (14:23 +0200)]
Fixed part of the seg fault described in bug 9356 by adding reference counting on RadosReadCompletionData

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
10 years agoFixed part of the seg fault described in bug 9356 by cleaning reference counting...
Sebastien Ponce [Thu, 16 Oct 2014 09:56:52 +0000 (11:56 +0200)]
Fixed part of the seg fault described in bug 9356 by cleaning reference counting on MultiAioCompletionImpl

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
10 years agoCleanup up useless method release in MultiAioCompletionImpl. It was exactly equivalen...
Sebastien Ponce [Wed, 15 Oct 2014 13:50:35 +0000 (15:50 +0200)]
Cleanup up useless method release in MultiAioCompletionImpl. It was exactly equivalent to put

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
10 years agoMerge pull request #2757 from fgimenez/update-pool-names-in-dev-guide
Sage Weil [Mon, 20 Oct 2014 15:34:45 +0000 (08:34 -0700)]
Merge pull request #2757 from fgimenez/update-pool-names-in-dev-guide

doc: updated names of default pools created at startup

10 years agoUpdated names of default pools created at startup 2757/head
fgimenez [Mon, 20 Oct 2014 11:43:56 +0000 (13:43 +0200)]
Updated names of default pools created at startup

10 years agoMerge pull request #2751 from dachary/wip-warnings
John Spray [Mon, 20 Oct 2014 08:42:37 +0000 (09:42 +0100)]
Merge pull request #2751 from dachary/wip-warnings

client: fix signed/unsigned compilation warnings

Reviewed-by: John Spray <john.spray@redhat.com>
10 years agoclient: fix signed/unsigned compilation warnings 2751/head
Loic Dachary [Sun, 19 Oct 2014 16:04:02 +0000 (09:04 -0700)]
client: fix signed/unsigned compilation warnings

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2744 from ceph/wip-9794
Loic Dachary [Sat, 18 Oct 2014 15:43:40 +0000 (08:43 -0700)]
Merge pull request #2744 from ceph/wip-9794

mon: MDSMonitor: wait for osdmon to be writable when requesting proposal

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2746 from ceph/wip-adamcrume
Loic Dachary [Fri, 17 Oct 2014 22:13:28 +0000 (15:13 -0700)]
Merge pull request #2746 from ceph/wip-adamcrume

osdc: Fix compiler warning

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoosdc: Fix compiler warning 2746/head
Adam Crume [Fri, 17 Oct 2014 19:09:44 +0000 (12:09 -0700)]
osdc: Fix compiler warning

Was getting:

./osdc/ObjectCacher.h:169:51: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       uint64_t overlap_start = MAX(start, ex.start);
                                                   ^
./osdc/ObjectCacher.h:170:59: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       uint64_t overlap_end = MIN(end, ex.start + ex.length);
                                                           ^

Signed-off-by: Adam Crume <adamcrume@gmail.com>
10 years agomon: MDSMonitor: wait for osdmon to be writable when requesting proposal 2744/head
Joao Eduardo Luis [Fri, 17 Oct 2014 18:08:20 +0000 (19:08 +0100)]
mon: MDSMonitor: wait for osdmon to be writable when requesting proposal

Otherwise we may end up requesting the osdmon to propose while it is
mid-proposal.  We can't simply return EAGAIN to the user either because
then we would have to expect the user to be able to successfully race
with the whole cluster in finding a window in which 'mds fs new' command
would succeed -- which is not a realistic expectation.  Having the
command to osdmon()->wait_for_writable() guarantees that the command
will be added to a queue and that we will, eventually, tend to it.

Fixes: #9794
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: MDSMonitor: have management_command() returning int instead of bool
Joao Eduardo Luis [Fri, 17 Oct 2014 17:59:51 +0000 (18:59 +0100)]
mon: MDSMonitor: have management_command() returning int instead of bool

We can more easily differentiate between errors we get out of this
function, which makes the code a bit more versatile and readable.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: MDSMonitor: don't return -EINVAL if function is bool
Joao Eduardo Luis [Fri, 17 Oct 2014 17:01:05 +0000 (18:01 +0100)]
mon: MDSMonitor: don't return -EINVAL if function is bool

Returning -EINVAL on a function that expects bool and the error code to
be in a variable 'r' can only achieve one thing: if this path is ever
touched, instead of returning an error as it was supposed to, we're
returning 'true' with 'r = 0' and, for no apparent reason, the user will
think everything went smoothly but with no new fs created.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: MDSMonitor: check all conditions are met *before* osdmon proposal
Joao Eduardo Luis [Fri, 17 Oct 2014 16:43:33 +0000 (17:43 +0100)]
mon: MDSMonitor: check all conditions are met *before* osdmon proposal

We should not allow ourselves to request the osdmon to propose before we
know for sure that we meet the required conditions to go through with
our own state change.  Even if we still can't guarantee that our
proposal is going to be committed, we shouldn't just change the osdmon's
state just because we can.  This way, at least, we make sure that our
checks hold up before doing anything with side-effects.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: MDSMonitor: return if fs exists on 'fs new'
Joao Eduardo Luis [Fri, 17 Oct 2014 16:37:03 +0000 (17:37 +0100)]
mon: MDSMonitor: return if fs exists on 'fs new'

We were just setting return code to -EINVAL, while allowing the logic to
continue regardless.  If we are to return error, then we should abort
the operation as well and let the user know it went wrong instead of
continuing as if nothing had happened.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agoMerge pull request #2736 from dachary/wip-backfill-documentation
Loic Dachary [Fri, 17 Oct 2014 16:02:10 +0000 (09:02 -0700)]
Merge pull request #2736 from dachary/wip-backfill-documentation

doc: updates on Backfill Reservation

Reviewed-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
10 years agoMerge pull request #2743 from ceph/wip-mds-coverity
Sage Weil [Fri, 17 Oct 2014 15:16:18 +0000 (08:16 -0700)]
Merge pull request #2743 from ceph/wip-mds-coverity

mds: fix null dereference

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2738 from majianpeng/fix1
Sage Weil [Fri, 17 Oct 2014 15:11:45 +0000 (08:11 -0700)]
Merge pull request #2738 from majianpeng/fix1

Fix1 compile warning

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agomds: fix null dereference 2743/head
Yan, Zheng [Fri, 17 Oct 2014 14:07:33 +0000 (22:07 +0800)]
mds: fix null dereference

Server::handle_client_file_setlock() should return after calling
reply_request()

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agotest: fix compile warning in bufferlist.cc 2738/head
Jianpeng Ma [Fri, 17 Oct 2014 06:04:40 +0000 (14:04 +0800)]
test: fix compile warning in bufferlist.cc

test/bufferlist.cc: In member function ‘virtual void
Buffer_constructors_Test::TestBody()’:
test/bufferlist.cc:154:36: warning: ignoring return value of ‘int
system(const char*)’, declared with attribute warn_unused_result
[-Wunused-result]
     ::system("echo ABC > testfile");
                                    ^
test/bufferlist.cc: In member function ‘virtual void
TestRawPipe::SetUp()’:
test/bufferlist.cc:182:36: warning: ignoring return value of ‘int
system(const char*)’, declared with attribute warn_unused_result
[-Wunused-result]
     ::system("echo ABC > testfile");
                                    ^
test/bufferlist.cc: In member function ‘virtual void
BufferList_read_file_Test::TestBody()’:
test/bufferlist.cc:1768:53: warning: ignoring return value of ‘int
system(const char*)’, declared with attribute warn_unused_result
[-Wunused-result]
   ::system("echo ABC > testfile ; chmod 0 testfile");
                                                     ^
test/bufferlist.cc:1770:32: warning: ignoring return value of ‘int
system(const char*)’, declared with attribute warn_unused_result
[-Wunused-result]
   ::system("chmod +r testfile");
                                ^
test/bufferlist.cc: In member function ‘virtual void
BufferList_read_fd_Test::TestBody()’:
test/bufferlist.cc:1781:34: warning: ignoring return value of ‘int
system(const char*)’, declared with attribute warn_unused_result
[-Wunused-result]
   ::system("echo ABC > testfile");

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
10 years agolibrbd: fix compile warning in librbd/internal.cc.
Jianpeng Ma [Fri, 17 Oct 2014 05:19:59 +0000 (13:19 +0800)]
librbd: fix compile warning in librbd/internal.cc.

librbd/internal.cc: In function 'void
librbd::readahead(librbd::ImageCtx*, const std::vector<std::pair<long
unsigned int, long unsigned int> >&, const md_config_t*)':
librbd/internal.cc:3150:38: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
       ictx->total_bytes_read > conf->rbd_readahead_disable_after_bytes;
                                      ^

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
10 years agodoc: updates on Backfill Reservation 2736/head
Loic Dachary [Thu, 16 Oct 2014 23:23:17 +0000 (16:23 -0700)]
doc: updates on Backfill Reservation

The logic was changed by:

0985ae71bce32c4d9e0e9e9f68bed38eb3c26897
osd: prioritize backfill based on *how* degraded

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge remote-tracking branch 'origin/wip-rbd-readahead'
Josh Durgin [Thu, 16 Oct 2014 21:33:42 +0000 (14:33 -0700)]
Merge remote-tracking branch 'origin/wip-rbd-readahead'

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Conflicts:
src/client/Fh.h

10 years agoMerge pull request #2588 from xinxinsh/wip-9595
Josh Durgin [Thu, 16 Oct 2014 20:15:33 +0000 (13:15 -0700)]
Merge pull request #2588 from xinxinsh/wip-9595

Fix #9595

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
10 years agoMerge pull request #2628 from ceph/wip-client-flock
Gregory Farnum [Thu, 16 Oct 2014 13:57:34 +0000 (06:57 -0700)]
Merge pull request #2628 from ceph/wip-client-flock

Wip client flock

Add support for file locking to the userspace client, and improve blocked-lock cancellation so that it doesn't remove locks that succeeded when racing.

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agoMerge pull request #2732 from dachary/wip-9526-crush-rename-bucket
Loic Dachary [Thu, 16 Oct 2014 03:22:02 +0000 (20:22 -0700)]
Merge pull request #2732 from dachary/wip-9526-crush-rename-bucket

ceph osd crush rename-bucket srcname dstname

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2731 from dachary/wip-9790-display-auid
Loic Dachary [Thu, 16 Oct 2014 03:15:29 +0000 (20:15 -0700)]
Merge pull request #2731 from dachary/wip-9790-display-auid

auth: add display of auid to auth get / list when it is not the default

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agomon: unit tests for osd crush rename-bucket 2732/head
Loic Dachary [Thu, 16 Oct 2014 00:21:44 +0000 (17:21 -0700)]
mon: unit tests for osd crush rename-bucket

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agomon: add the osd crush rename-bucket command
Loic Dachary [Thu, 16 Oct 2014 00:14:53 +0000 (17:14 -0700)]
mon: add the osd crush rename-bucket command

The synopsis is:

 osd crush rename-bucket name1 name2

It is made idempotent by interpreting -EALREADY as returned by
CrushWrapper::rename_bucket return as success.

The crush_rename_bucket method first checks for errors with
CrushWrapper::can_rename_bucket if there is no pending crush so that it
can return early and avoid the creation of a pending crush map.

If renaming is possible, CrushWrapper::rename_bucket is called on the
pending crush map (and creates it indirectly if it does not already
exists).

http://tracker.ceph.com/issues/9526 Fixes: #9526

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agocrush: unit tests for CrushWrapper rename item/bucket methods
Loic Dachary [Thu, 16 Oct 2014 00:11:46 +0000 (17:11 -0700)]
crush: unit tests for CrushWrapper rename item/bucket methods

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agocrush: add CrushWrapper::rename_bucket and can_rename_bucket
Loic Dachary [Thu, 16 Oct 2014 00:08:13 +0000 (17:08 -0700)]
crush: add CrushWrapper::rename_bucket and can_rename_bucket

Rename a bucket and return -ENOTDIR if trying to rename an item. The
behavior is otherwise the same as rename_item and can_rename_item.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agocrush: add CrushWrapper::rename_item and can_rename_item
Loic Dachary [Thu, 16 Oct 2014 00:06:12 +0000 (17:06 -0700)]
crush: add CrushWrapper::rename_item and can_rename_item

The can_rename_item is a const method checking if renaming an item could
succeed. If not it returns a unique -errno code and a human readable
message message.

Trying to rename a non existent item into an existent item returns
-EALREADY which can be treated as success if renaming is to be
idempotent.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoadd unittest for Striper::get_num_objects 2588/head
xinxin shu [Wed, 15 Oct 2014 23:32:09 +0000 (07:32 +0800)]
add unittest for Striper::get_num_objects

Signed-off-by: xinxin shu <xinxin.shu@intel.com>
10 years agocrush: improve constness of CrushWrapper methods
Loic Dachary [Thu, 16 Oct 2014 00:02:58 +0000 (17:02 -0700)]
crush: improve constness of CrushWrapper methods

A number of CrushWrapper get methods or predicates were not const
because they need to maintain transparently the rmaps. Make the rmaps
mutable and update the constness of the methods to match what the caller
would expect.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agowhen non-default striping is used, internal methods can operate on extra objects
xinxin shu [Sat, 27 Sep 2014 19:57:20 +0000 (03:57 +0800)]
when non-default striping is used, internal methods can operate on extra objects

Fixes: #9595
Signed-off-by: xinxin shu <xinxin.shu@intel.com>
10 years agoMerge pull request #2712 from lpabon/bug-8766
Sage Weil [Wed, 15 Oct 2014 22:18:48 +0000 (15:18 -0700)]
Merge pull request #2712 from lpabon/bug-8766

Update vstart to setup users for s3-tests

10 years agoMerge pull request #2705 from xinxinsh/master
Sage Weil [Wed, 15 Oct 2014 22:16:00 +0000 (15:16 -0700)]
Merge pull request #2705 from xinxinsh/master

return value of handle_message for MSG_OSD_SUBOP/MSG_OSD_SUBOPREPLY shou...

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoauth: unit tests for auid display 2731/head
Loic Dachary [Wed, 15 Oct 2014 20:15:34 +0000 (13:15 -0700)]
auth: unit tests for auid display

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoauth: add display auid to KeyServer::encode_secrets
Loic Dachary [Wed, 15 Oct 2014 18:30:32 +0000 (11:30 -0700)]
auth: add display auid to KeyServer::encode_secrets

http://tracker.ceph.com/issues/9790 Fixes: #9790

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoauth: add display auid to KeyRing::encode_formatted
Loic Dachary [Wed, 15 Oct 2014 18:07:19 +0000 (11:07 -0700)]
auth: add display auid to KeyRing::encode_formatted

http://tracker.ceph.com/issues/9790 Fixes: #9790

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2726 from CzBiX/wip-doc-radosgw-federated-config
Loic Dachary [Wed, 15 Oct 2014 13:50:50 +0000 (06:50 -0700)]
Merge pull request #2726 from CzBiX/wip-doc-radosgw-federated-config

doc: correct command of `config push`

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agodoc: correct command of `config push` 2726/head
VRan Liu [Wed, 15 Oct 2014 09:03:49 +0000 (17:03 +0800)]
doc: correct command of `config push`

Signed-off-by: VRan Liu <gliuwr@gmail.com>
10 years agoqa/workunits/fs/misc: Add a workunit for file lock interruption 2628/head
Yan, Zheng [Wed, 15 Oct 2014 04:00:58 +0000 (12:00 +0800)]
qa/workunits/fs/misc: Add a workunit for file lock interruption

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agomds: fix neighbor lock check
Yan, Zheng [Wed, 15 Oct 2014 04:03:46 +0000 (12:03 +0800)]
mds: fix neighbor lock check

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoMerge pull request #2721 from wyllys66/wip-8942
Sage Weil [Tue, 14 Oct 2014 21:49:43 +0000 (14:49 -0700)]
Merge pull request #2721 from wyllys66/wip-8942

librados: osd: Fixed JSON output for stray OSDs

Backport: giant, firefly
Reviewed-by: Sage Weil <sage@redhat.com>
10 years agodoc/dev/sepia: notes about sepia email list and irc channels
Sage Weil [Tue, 14 Oct 2014 21:40:17 +0000 (14:40 -0700)]
doc/dev/sepia: notes about sepia email list and irc channels

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agodoc/release-notes: v0.80.7
Sage Weil [Tue, 14 Oct 2014 21:40:03 +0000 (14:40 -0700)]
doc/release-notes: v0.80.7

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2704 from almightybeeij/master
Gregory Farnum [Tue, 14 Oct 2014 18:49:26 +0000 (11:49 -0700)]
Merge pull request #2704 from almightybeeij/master

libcephfs.h libcephfs.cc : Defined error codes for the mount function

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agodoc: update lab notes
Sage Weil [Tue, 14 Oct 2014 17:57:37 +0000 (10:57 -0700)]
doc: update lab notes

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2720 from ceph/wip-5977
Josh Durgin [Tue, 14 Oct 2014 17:29:24 +0000 (10:29 -0700)]
Merge pull request #2720 from ceph/wip-5977

librbdpy: Added missing method docstrings

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
10 years agolibrbdpy: Added missing method docstrings 2720/head
Jason Dillaman [Tue, 14 Oct 2014 15:09:09 +0000 (11:09 -0400)]
librbdpy: Added missing method docstrings

Several methods were missing docstrings, preventing the methods
from appearing in the generated documentation.  Ensured all methods
now have appropriate docstrings.

Fixes: 5977
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agomds: reply -EOPNOTSUPP for unknown lock type
Yan, Zheng [Tue, 14 Oct 2014 14:02:41 +0000 (22:02 +0800)]
mds: reply -EOPNOTSUPP for unknown lock type

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoMerge pull request #2718 from henrycc/wip-henrycc-inotable
Yan, Zheng [Tue, 14 Oct 2014 06:54:32 +0000 (14:54 +0800)]
Merge pull request #2718 from henrycc/wip-henrycc-inotable

mds: fix inotable initialization/reset

10 years agomds: fix inotable initialization/reset 2718/head
Henry C Chang [Tue, 14 Oct 2014 02:06:04 +0000 (10:06 +0800)]
mds: fix inotable initialization/reset

interval_set::insert takes arguments start and len, not end.

Signed-off-by: Henry C Chang <henry.cy.chang@gmail.com>
10 years agoMerge pull request #2714 from ceph/wip-9730
John Wilkins [Mon, 13 Oct 2014 15:46:08 +0000 (08:46 -0700)]
Merge pull request #2714 from ceph/wip-9730

doc: `ceph-deploy mon create-initial` doesn't take arguments

Reviewed-by: John Wilkins <jowilkin@redhat.com>
10 years agoMerge pull request #2706 from dachary/wip-9747-ceph-spec
Sage Weil [Mon, 13 Oct 2014 15:16:14 +0000 (08:16 -0700)]
Merge pull request #2706 from dachary/wip-9747-ceph-spec

rpm: 95-ceph-osd-alt.rules is not needed for centos7 / rhel7

Backport: giant, firefly
Reviewed-by: Sage Weil <sage@redhat.com>
10 years agodoc: remove node requirement from 'mon create-initial' 2714/head
Alfredo Deza [Mon, 13 Oct 2014 15:10:10 +0000 (11:10 -0400)]
doc: remove node requirement from 'mon create-initial'

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
10 years agodoc: remove whitespace
Alfredo Deza [Mon, 13 Oct 2014 15:09:38 +0000 (11:09 -0400)]
doc: remove whitespace

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
10 years agoUpdate vstart to setup users for s3-tests 2712/head
Luis Pabón [Wed, 8 Oct 2014 05:04:07 +0000 (01:04 -0400)]
Update vstart to setup users for s3-tests

vstart.sh now creates the users for the default configuration
for the s3-tests, available on https://github.com/ceph/s3-tests.

Also updated the documentation to show the correct RadosGW port.

Signed-off-by: Luis Pabón <lpabon@redhat.com>
10 years agoMerge pull request #2591 from majianpeng/fix2
Sage Weil [Mon, 13 Oct 2014 13:01:22 +0000 (06:01 -0700)]
Merge pull request #2591 from majianpeng/fix2

os/FileStore: using FIEMAP_FLAGS_SYNC instead of fsync() before call fiemap

Backport: giant, firefly
Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoclient: use finisher to abort MDS request
Yan, Zheng [Mon, 13 Oct 2014 03:34:18 +0000 (11:34 +0800)]
client: use finisher to abort MDS request

When a request is interrupted, libfuse first locks an internal mutex,
then calls the interrupt callback. libfuse need to lock the same mutex
when unregistering interrupt callback. We unregister interrupt callback
while client_lock is locked, so we can't acquiring the client_lock in
the interrupt callback.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoclient: use atomic variable to track reference of MetaRequeset
Yan, Zheng [Thu, 9 Oct 2014 05:16:18 +0000 (13:16 +0800)]
client: use atomic variable to track reference of MetaRequeset

this allow us to increase reference count of MetaRequest while not holding
the client_lock

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoclient: allow interrupting blocked file lock operation
Yan, Zheng [Mon, 13 Oct 2014 02:44:46 +0000 (10:44 +0800)]
client: allow interrupting blocked file lock operation

This commit introduce two new types of setfilelock request. Unlike
setfilelock (UNLOCK) request, these two new types of setfilelock request
do not drop locks that have alread been acquired, they only interrupt
blocked setfilelock request.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoclient: register callback for fuse interrupt
Yan, Zheng [Thu, 9 Oct 2014 01:42:08 +0000 (09:42 +0800)]
client: register callback for fuse interrupt

libfuse allows program to reigster a callback for interrupt. When a file
system operation is interrupted, the fuse kernel driver sends interupt
request to libfuse. libfuse calls the interrupt callback when receiving
interrupt request.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoFileStore:Round offset of fiemap down aligned with CEPH_PAGE_SIZE. 2591/head
Jianpeng Ma [Mon, 13 Oct 2014 05:33:38 +0000 (13:33 +0800)]
FileStore:Round offset of fiemap down aligned with CEPH_PAGE_SIZE.

There is a bug on xfs about fiemap. If offset unsigned, the result of
fiemap will leak some data.
Kernel commit eedf32bfcace7d8e20cc66757d74fc68f3439ff7 fix this bug.
To avoid this bug on kernel which don't apply this commit, in ceph we
make the offset down aligned with CEPH_PAGE_SIZE.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
10 years agorpm: 95-ceph-osd-alt.rules is not needed for centos7 / rhel7 2706/head
Loic Dachary [Sat, 11 Oct 2014 16:20:36 +0000 (18:20 +0200)]
rpm: 95-ceph-osd-alt.rules is not needed for centos7 / rhel7

The || instead of && had it always installed. That was fixed in EPEL
already.

http://tracker.ceph.com/issues/9747 Fixes: #9747

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agolibcephfs.h libcephfs.cc : Defined error codes for the mount function 2704/head
BJ Lougee [Sat, 11 Oct 2014 07:44:17 +0000 (02:44 -0500)]
libcephfs.h libcephfs.cc : Defined error codes for the mount function
Used new error codes from libcephfs.h to replace the magic numbers in the mount functon found in libcephfs.cc.

Signed-off-by: BJ Lougee <almightybeeij@gmail.com>
10 years agoMerge pull request #2701 from ceph/wip-9716
Josh Durgin [Sat, 11 Oct 2014 03:51:33 +0000 (20:51 -0700)]
Merge pull request #2701 from ceph/wip-9716

librados: Fix function prototypes in librados.h

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
10 years agoMerge pull request #2678 from ceph/wip-8983
Josh Durgin [Sat, 11 Oct 2014 03:41:27 +0000 (20:41 -0700)]
Merge pull request #2678 from ceph/wip-8983

rados: Parse command-line arguments strictly

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoreturn value of handle_message for MSG_OSD_SUBOP/MSG_OSD_SUBOPREPLY should be true 2705/head
xinxin shu [Sat, 11 Oct 2014 01:29:42 +0000 (09:29 +0800)]
return value of handle_message for MSG_OSD_SUBOP/MSG_OSD_SUBOPREPLY should be true

if the return value is true , it will skip unnecessary checks

Signed-off-by: xinxin shu <xinxin.shu@intel.com>
10 years agoMerge pull request #2683 from ceph/wip-7796
Sage Weil [Fri, 10 Oct 2014 23:56:11 +0000 (16:56 -0700)]
Merge pull request #2683 from ceph/wip-7796

rgw: set length for keystone token validation request

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agorados: Use strict_strtoll instead of strtoll 2678/head
Adam Crume [Fri, 10 Oct 2014 23:52:32 +0000 (16:52 -0700)]
rados: Use strict_strtoll instead of strtoll

Signed-off-by: Adam Crume <adamcrume@gmail.com>
10 years agoMerge pull request #2672 from ceph/wip-9513
Josh Durgin [Fri, 10 Oct 2014 22:06:33 +0000 (15:06 -0700)]
Merge pull request #2672 from ceph/wip-9513

Fix read performance regression in ObjectCacher

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
10 years agolibrados: Fix function prototypes in librados.h 2701/head
Adam Crume [Fri, 10 Oct 2014 21:08:32 +0000 (14:08 -0700)]
librados: Fix function prototypes in librados.h

Fixes: 9716
Signed-off-by: Adam Crume <adamcrume@gmail.com>
10 years agorados: Add tests for CLI strict parsing
Adam Crume [Fri, 10 Oct 2014 20:33:39 +0000 (13:33 -0700)]
rados: Add tests for CLI strict parsing

Fixes: 8983
Signed-off-by: Adam Crume <adamcrume@gmail.com>
10 years agotest: Fix rmpool in test_rados_tool.sh
Adam Crume [Fri, 10 Oct 2014 17:25:02 +0000 (10:25 -0700)]
test: Fix rmpool in test_rados_tool.sh

Signed-off-by: Adam Crume <adamcrume@gmail.com>
10 years agoMerge pull request #2675 from ceph/wip-coverity-20141003
Sage Weil [Fri, 10 Oct 2014 16:13:02 +0000 (09:13 -0700)]
Merge pull request #2675 from ceph/wip-coverity-20141003

Fix issues from SCA and Coverity

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoclient: add helper function that updates lock state
Yan, Zheng [Sat, 4 Oct 2014 01:14:44 +0000 (09:14 +0800)]
client: add helper function that updates lock state

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agofuse: enable fuse_multithreaded by default
Yan, Zheng [Thu, 2 Oct 2014 12:21:36 +0000 (20:21 +0800)]
fuse: enable fuse_multithreaded by default

GETFILELOCK MDS request may block for a long time, so we need to
use multithread event loop,

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoclient: posix file lock support
Yan, Zheng [Thu, 2 Oct 2014 11:07:41 +0000 (19:07 +0800)]
client: posix file lock support

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agocommon: link mds/flock.o to libcommon
Yan, Zheng [Thu, 2 Oct 2014 10:02:50 +0000 (18:02 +0800)]
common: link mds/flock.o to libcommon

later commit will use this code to track file locks held by cephfs
client.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoMerge pull request #2685 from hejiantao5/patch-1
Loic Dachary [Fri, 10 Oct 2014 12:56:27 +0000 (14:56 +0200)]
Merge pull request #2685 from hejiantao5/patch-1

Check the pointer before deleting

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2688 from leseb/fix-warning-message-img-format
Loic Dachary [Fri, 10 Oct 2014 12:50:35 +0000 (14:50 +0200)]
Merge pull request #2688 from leseb/fix-warning-message-img-format

Fix error message when stripping with format 1

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoFixed JSON output for stray OSDs 2721/head
Wyllys Ingersoll [Fri, 10 Oct 2014 12:27:56 +0000 (08:27 -0400)]
Fixed JSON output for stray OSDs

10 years agoFix error message when stripping with format 1 2688/head
Sébastien Han [Fri, 10 Oct 2014 12:14:22 +0000 (14:14 +0200)]
Fix error message when stripping with format 1

Since the option '--format' for specifying the rbd image format is
deprecated, we should recommend '--image-format' instead.

Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
10 years agoCheck pointer before deleting 2685/head
hejiantao5 [Fri, 10 Oct 2014 07:57:05 +0000 (15:57 +0800)]
Check pointer before deleting

Here I think should check the pointer, to avoid potential risk

Signed-off-by: Jiantao He <hejiantao5@gmail.com>
10 years agoceph_erasure_code_benchmark: fix parameter handling 2675/head
Danny Al-Gaaf [Thu, 9 Oct 2014 16:09:41 +0000 (18:09 +0200)]
ceph_erasure_code_benchmark: fix parameter handling

Make sure k and m paramter are valid to prevent crash. Fix typo.

Fix for the following CID and other possible invalid combinations
of k/m parameter:

CID 1219466 (#1 of 1): Division or modulo by zero (DIVIDE_BY_ZERO)
 divide_by_zero: In expression rand() % (k + m), modulo by expression
 k + m which may be zero has undefined behavior.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agoMerge pull request #2686 from dachary/wip-client-dout
John Spray [Fri, 10 Oct 2014 09:05:44 +0000 (10:05 +0100)]
Merge pull request #2686 from dachary/wip-client-dout

client: add missing dendl and s/dout/ldout/

Reviewed-by: John Spray <john.spray@redhat.com>
10 years agoclient: add missing dendl and s/dout/ldout/ 2686/head
Loic Dachary [Fri, 10 Oct 2014 08:43:44 +0000 (10:43 +0200)]
client: add missing dendl and s/dout/ldout/

Introduced in ce4436c9d4206ff4a4af7fdc16e571dcc77cd8b4

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2671 from ceph/wip-da-fix-make_check
Loic Dachary [Fri, 10 Oct 2014 05:57:19 +0000 (07:57 +0200)]
Merge pull request #2671 from ceph/wip-da-fix-make_check

Makefile.am: make sure everything was build before make check

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2669 from ceph/wip-9692
Loic Dachary [Fri, 10 Oct 2014 05:54:22 +0000 (07:54 +0200)]
Merge pull request #2669 from ceph/wip-9692

qa/workunits/fs/misc: fix syntax error

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2676 from ceph/wip-print-mode
Yan, Zheng [Fri, 10 Oct 2014 01:36:59 +0000 (09:36 +0800)]
Merge pull request #2676 from ceph/wip-print-mode

client: print out mode, uid, gid if they are changed

10 years agoqa/workunits/fs/misc: fix syntax error 2669/head
Yan, Zheng [Wed, 8 Oct 2014 12:38:33 +0000 (20:38 +0800)]
qa/workunits/fs/misc: fix syntax error

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoMerge pull request #2677 from ceph/wip-mds-coverity
Yan, Zheng [Fri, 10 Oct 2014 01:16:58 +0000 (09:16 +0800)]
Merge pull request #2677 from ceph/wip-mds-coverity

Wip mds coverity

10 years agorgw: set length for keystone token validation request 2683/head
Yehuda Sadeh [Thu, 9 Oct 2014 17:20:27 +0000 (10:20 -0700)]
rgw: set length for keystone token validation request

Fixes: #7796
Backport: giany, firefly
Need to set content length to this request, as the server might not
handle a chunked request (even though we don't send anything).

Tested-by: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorados: Parse command-line arguments strictly
Adam Crume [Thu, 9 Oct 2014 21:04:34 +0000 (14:04 -0700)]
rados: Parse command-line arguments strictly

Many integers were parsed with functions that silently ignored junk at
the end of the string.  Extra characters now cause errors.

Fixes: 8983
Signed-off-by: Adam Crume <adamcrume@gmail.com>
10 years agomds: MDirUpdate: initialize discover count to 0 if we're not discovering 2677/head
Greg Farnum [Thu, 9 Oct 2014 17:41:45 +0000 (10:41 -0700)]
mds: MDirUpdate: initialize discover count to 0 if we're not discovering

Otherwise it's left uninitialized and could do who-knows-what!

CID 1244229:  Uninitialized scalar field  (UNINIT_CTOR)
/messages/MDirUpdate.h: 55 in MDirUpdate::MDirUpdate(mds_rank_t, dirfrag_t,
int, std::set<int, std::less<int>, std::allocator<int>> &, filepath &, bool)()

Signed-off-by: Greg Farnum <greg@inktank.com>
10 years agomds: MDSAuthCaps: init "read" param in default constructor
Greg Farnum [Thu, 9 Oct 2014 17:37:21 +0000 (10:37 -0700)]
mds: MDSAuthCaps: init "read" param in default constructor

CID 1244228:  Uninitialized scalar field  (UNINIT_CTOR)
/mds/MDSAuthCaps.h: 29 in MDSCapSpec::MDSCapSpec()()

Signed-off-by: Greg Farnum <greg@inktank.com>