<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/ceph, branch v3.16.46</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.16.46</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.16.46'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2016-06-15T20:29:27Z</updated>
<entry>
<title>libceph: make authorizer destruction independent of ceph_auth_client</title>
<updated>2016-06-15T20:29:27Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@gmail.com</email>
</author>
<published>2016-04-11T17:34:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5d740c28a3dc8ffb877d7ebcf2f07dd716aa47da'/>
<id>urn:sha1:5d740c28a3dc8ffb877d7ebcf2f07dd716aa47da</id>
<content type='text'>
commit 6c1ea260f89709e0021d2c59f8fd2a104b5b1123 upstream.

Starting the kernel client with cephx disabled and then enabling cephx
and restarting userspace daemons can result in a crash:

    [262671.478162] BUG: unable to handle kernel paging request at ffffebe000000000
    [262671.531460] IP: [&lt;ffffffff811cd04a&gt;] kfree+0x5a/0x130
    [262671.584334] PGD 0
    [262671.635847] Oops: 0000 [#1] SMP
    [262672.055841] CPU: 22 PID: 2961272 Comm: kworker/22:2 Not tainted 4.2.0-34-generic #39~14.04.1-Ubuntu
    [262672.162338] Hardware name: Dell Inc. PowerEdge R720/068CDY, BIOS 2.4.3 07/09/2014
    [262672.268937] Workqueue: ceph-msgr con_work [libceph]
    [262672.322290] task: ffff88081c2d0dc0 ti: ffff880149ae8000 task.ti: ffff880149ae8000
    [262672.428330] RIP: 0010:[&lt;ffffffff811cd04a&gt;]  [&lt;ffffffff811cd04a&gt;] kfree+0x5a/0x130
    [262672.535880] RSP: 0018:ffff880149aeba58  EFLAGS: 00010286
    [262672.589486] RAX: 000001e000000000 RBX: 0000000000000012 RCX: ffff8807e7461018
    [262672.695980] RDX: 000077ff80000000 RSI: ffff88081af2be04 RDI: 0000000000000012
    [262672.803668] RBP: ffff880149aeba78 R08: 0000000000000000 R09: 0000000000000000
    [262672.912299] R10: ffffebe000000000 R11: ffff880819a60e78 R12: ffff8800aec8df40
    [262673.021769] R13: ffffffffc035f70f R14: ffff8807e5b138e0 R15: ffff880da9785840
    [262673.131722] FS:  0000000000000000(0000) GS:ffff88081fac0000(0000) knlGS:0000000000000000
    [262673.245377] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [262673.303281] CR2: ffffebe000000000 CR3: 0000000001c0d000 CR4: 00000000001406e0
    [262673.417556] Stack:
    [262673.472943]  ffff880149aeba88 ffff88081af2be04 ffff8800aec8df40 ffff88081af2be04
    [262673.583767]  ffff880149aeba98 ffffffffc035f70f ffff880149aebac8 ffff8800aec8df00
    [262673.694546]  ffff880149aebac8 ffffffffc035c89e ffff8807e5b138e0 ffff8805b047f800
    [262673.805230] Call Trace:
    [262673.859116]  [&lt;ffffffffc035f70f&gt;] ceph_x_destroy_authorizer+0x1f/0x50 [libceph]
    [262673.968705]  [&lt;ffffffffc035c89e&gt;] ceph_auth_destroy_authorizer+0x3e/0x60 [libceph]
    [262674.078852]  [&lt;ffffffffc0352805&gt;] put_osd+0x45/0x80 [libceph]
    [262674.134249]  [&lt;ffffffffc035290e&gt;] remove_osd+0xae/0x140 [libceph]
    [262674.189124]  [&lt;ffffffffc0352aa3&gt;] __reset_osd+0x103/0x150 [libceph]
    [262674.243749]  [&lt;ffffffffc0354703&gt;] kick_requests+0x223/0x460 [libceph]
    [262674.297485]  [&lt;ffffffffc03559e2&gt;] ceph_osdc_handle_map+0x282/0x5e0 [libceph]
    [262674.350813]  [&lt;ffffffffc035022e&gt;] dispatch+0x4e/0x720 [libceph]
    [262674.403312]  [&lt;ffffffffc034bd91&gt;] try_read+0x3d1/0x1090 [libceph]
    [262674.454712]  [&lt;ffffffff810ab7c2&gt;] ? dequeue_entity+0x152/0x690
    [262674.505096]  [&lt;ffffffffc034cb1b&gt;] con_work+0xcb/0x1300 [libceph]
    [262674.555104]  [&lt;ffffffff8108fb3e&gt;] process_one_work+0x14e/0x3d0
    [262674.604072]  [&lt;ffffffff810901ea&gt;] worker_thread+0x11a/0x470
    [262674.652187]  [&lt;ffffffff810900d0&gt;] ? rescuer_thread+0x310/0x310
    [262674.699022]  [&lt;ffffffff810957a2&gt;] kthread+0xd2/0xf0
    [262674.744494]  [&lt;ffffffff810956d0&gt;] ? kthread_create_on_node+0x1c0/0x1c0
    [262674.789543]  [&lt;ffffffff817bd81f&gt;] ret_from_fork+0x3f/0x70
    [262674.834094]  [&lt;ffffffff810956d0&gt;] ? kthread_create_on_node+0x1c0/0x1c0

What happens is the following:

    (1) new MON session is established
    (2) old "none" ac is destroyed
    (3) new "cephx" ac is constructed
    ...
    (4) old OSD session (w/ "none" authorizer) is put
          ceph_auth_destroy_authorizer(ac, osd-&gt;o_auth.authorizer)

osd-&gt;o_auth.authorizer in the "none" case is just a bare pointer into
ac, which contains a single static copy for all services.  By the time
we get to (4), "none" ac, freed in (2), is long gone.  On top of that,
a new vtable installed in (3) points us at ceph_x_destroy_authorizer(),
so we end up trying to destroy a "none" authorizer with a "cephx"
destructor operating on invalid memory!

To fix this, decouple authorizer destruction from ac and do away with
a single static "none" authorizer by making a copy for each OSD or MDS
session.  Authorizers themselves are independent of ac and so there is
no reason for destroy_authorizer() to be an ac op.  Make it an op on
the authorizer itself by turning ceph_authorizer into a real struct.

Fixes: http://tracker.ceph.com/issues/15447

Reported-by: Alan Zhang &lt;alan.zhang@linux.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Reviewed-by: Sage Weil &lt;sage@redhat.com&gt;
[bwh: Backported to 3.16:
 - Implementation of ceph_x_destroy_authorizer() is different
 - Adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client</title>
<updated>2014-06-13T06:06:23Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-06-13T06:06:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6d87c225f5d82d29243dc124f1ffcbb0e14ec358'/>
<id>urn:sha1:6d87c225f5d82d29243dc124f1ffcbb0e14ec358</id>
<content type='text'>
Pull Ceph updates from Sage Weil:
 "This has a mix of bug fixes and cleanups.

  Alex's patch fixes a rare race in RBD.  Ilya's patches fix an ENOENT
  check when a second rbd image is mapped and a couple memory leaks.
  Zheng fixes several issues with fragmented directories and multiple
  MDSs.  Josh fixes a spin/sleep issue, and Josh and Guangliang's
  patches fix setting and unsetting RBD images read-only.

  Naturally there are several other cleanups mixed in for good measure"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (23 commits)
  rbd: only set disk to read-only once
  rbd: move calls that may sleep out of spin lock range
  rbd: add ioctl for rbd
  ceph: use truncate_pagecache() instead of truncate_inode_pages()
  ceph: include time stamp in every MDS request
  rbd: fix ida/idr memory leak
  rbd: use reference counts for image requests
  rbd: fix osd_request memory leak in __rbd_dev_header_watch_sync()
  rbd: make sure we have latest osdmap on 'rbd map'
  libceph: add ceph_monc_wait_osdmap()
  libceph: mon_get_version request infrastructure
  libceph: recognize poolop requests in debugfs
  ceph: refactor readpage_nounlock() to make the logic clearer
  mds: check cap ID when handling cap export message
  ceph: remember subtree root dirfrag's auth MDS
  ceph: introduce ceph_fill_fragtree()
  ceph: handle cap import atomically
  ceph: pre-allocate ceph_cap struct for ceph_add_cap()
  ceph: update inode fields according to issued caps
  rbd: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
  ...
</content>
</entry>
<entry>
<title>libceph: add ceph_monc_wait_osdmap()</title>
<updated>2014-06-06T01:29:57Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>ilya.dryomov@inktank.com</email>
</author>
<published>2014-05-13T07:19:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6044cde6f2a94d88142d4401624152a741866338'/>
<id>urn:sha1:6044cde6f2a94d88142d4401624152a741866338</id>
<content type='text'>
Add ceph_monc_wait_osdmap(), which will block until the osdmap with the
specified epoch is received or timeout occurs.

Export both of these as they are going to be needed by rbd.

Signed-off-by: Ilya Dryomov &lt;ilya.dryomov@inktank.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
</content>
</entry>
<entry>
<title>libceph: mon_get_version request infrastructure</title>
<updated>2014-06-06T01:29:57Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>ilya.dryomov@inktank.com</email>
</author>
<published>2014-05-13T07:19:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=513a8243d67f8e8d27f2883bd2f18bc87c7ca376'/>
<id>urn:sha1:513a8243d67f8e8d27f2883bd2f18bc87c7ca376</id>
<content type='text'>
Add support for mon_get_version requests to libceph.  This reuses much
of the ceph_mon_generic_request infrastructure, with one exception.
Older OSDs don't set mon_get_version reply hdr-&gt;tid even if the
original request had a non-zero tid, which makes it impossible to
lookup ceph_mon_generic_request contexts by tid in get_generic_reply()
for such replies.  As a workaround, we allocate a reply message on the
reply path.  This can probably interfere with revoke, but I don't see
a better way.

Signed-off-by: Ilya Dryomov &lt;ilya.dryomov@inktank.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
</content>
</entry>
<entry>
<title>ceph: update inode fields according to issued caps</title>
<updated>2014-06-06T01:29:52Z</updated>
<author>
<name>Yan, Zheng</name>
<email>zheng.z.yan@intel.com</email>
</author>
<published>2014-04-17T00:55:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f98a128a55ff85d0087de89f304f10bd75e792aa'/>
<id>urn:sha1:f98a128a55ff85d0087de89f304f10bd75e792aa</id>
<content type='text'>
Cap message and request reply from non-auth MDS may carry stale
information (corresponding locks are in LOCK states) even they
have the newest inode version. So client should update inode fields
according to issued caps.

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
</content>
</entry>
<entry>
<title>ceph_sync_read: stop poking into iov_iter guts</title>
<updated>2014-05-06T21:39:42Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2014-04-04T02:31:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2b777c9dd9ebbb2f8b6818d454cc5e6d7c1e3c8b'/>
<id>urn:sha1:2b777c9dd9ebbb2f8b6818d454cc5e6d7c1e3c8b</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>libceph: enable PRIMARY_AFFINITY feature bit</title>
<updated>2014-04-05T04:08:20Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>ilya.dryomov@inktank.com</email>
</author>
<published>2014-03-24T15:12:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=18cb95af2d7c69aa136ab13f02dd55188c120e75'/>
<id>urn:sha1:18cb95af2d7c69aa136ab13f02dd55188c120e75</id>
<content type='text'>
Announce our support for osdmaps with non-default primary affinity
values.

Signed-off-by: Ilya Dryomov &lt;ilya.dryomov@inktank.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
</content>
</entry>
<entry>
<title>libceph: return primary from ceph_calc_pg_acting()</title>
<updated>2014-04-05T04:08:14Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>ilya.dryomov@inktank.com</email>
</author>
<published>2014-03-24T15:12:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8008ab1080c1768b02d232dcfd9e161cd47cc9f7'/>
<id>urn:sha1:8008ab1080c1768b02d232dcfd9e161cd47cc9f7</id>
<content type='text'>
In preparation for adding support for primary_temp, stop assuming
primaryness: add a primary out parameter to ceph_calc_pg_acting() and
change call sites accordingly.  Primary is now specified separately
from the order of osds in the set.

Signed-off-by: Ilya Dryomov &lt;ilya.dryomov@inktank.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
</content>
</entry>
<entry>
<title>libceph: switch ceph_calc_pg_acting() to new helpers</title>
<updated>2014-04-05T04:08:13Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>ilya.dryomov@inktank.com</email>
</author>
<published>2014-03-24T15:12:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ac972230e20581b044f5ce66dcaf3c5af8d57444'/>
<id>urn:sha1:ac972230e20581b044f5ce66dcaf3c5af8d57444</id>
<content type='text'>
Switch ceph_calc_pg_acting() to new helpers: pg_to_raw_osds(),
raw_to_up_osds() and apply_temps().

Signed-off-by: Ilya Dryomov &lt;ilya.dryomov@inktank.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
</content>
</entry>
<entry>
<title>libceph: ceph_can_shift_osds(pool) and pool type defines</title>
<updated>2014-04-05T04:08:08Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>ilya.dryomov@inktank.com</email>
</author>
<published>2014-03-24T15:12:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2abebdbca7997422bfab6bf8b6559384a6b95294'/>
<id>urn:sha1:2abebdbca7997422bfab6bf8b6559384a6b95294</id>
<content type='text'>
Bring in pg_pool_t::can_shift_osds() counterpart along with pool type
defines.

Signed-off-by: Ilya Dryomov &lt;ilya.dryomov@inktank.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
</content>
</entry>
</feed>
