<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/ceph, branch v3.10.32</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/ceph?h=v3.10.32</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/ceph?h=v3.10.32'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-01-09T20:24:26Z</updated>
<entry>
<title>libceph: add function to ensure notifies are complete</title>
<updated>2014-01-09T20:24:26Z</updated>
<author>
<name>Josh Durgin</name>
<email>josh.durgin@inktank.com</email>
</author>
<published>2013-08-29T04:43:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a2e5951b11b406a83f84c1eb3b5d722491f4d883'/>
<id>urn:sha1:a2e5951b11b406a83f84c1eb3b5d722491f4d883</id>
<content type='text'>
commit dd935f44a40f8fb02aff2cc0df2269c92422df1c upstream.

Without a way to flush the osd client's notify workqueue, a watch
event that is unregistered could continue receiving callbacks
indefinitely.

Unregistering the event simply means no new notifies are added to the
queue, but there may still be events in the queue that will call the
watch callback for the event. If the queue is flushed after the event
is unregistered, the caller can be sure no more watch callbacks will
occur for the canceled watch.

Signed-off-by: Josh Durgin &lt;josh.durgin@inktank.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>libceph: create_singlethread_workqueue() doesn't return ERR_PTRs</title>
<updated>2014-01-09T20:24:25Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2013-08-15T05:58:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3834fb30d260b8fa6401fff271c65cd29ba94424'/>
<id>urn:sha1:3834fb30d260b8fa6401fff271c65cd29ba94424</id>
<content type='text'>
commit dbcae088fa660086bde6e10d63bb3c9264832d85 upstream.

create_singlethread_workqueue() returns NULL on error, and it doesn't
return ERR_PTRs.

I tweaked the error handling a little to be consistent with earlier in
the function.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>libceph: potential NULL dereference in ceph_osdc_handle_map()</title>
<updated>2014-01-09T20:24:25Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2013-08-15T05:52:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=53341d7de3f013cc39a3692bdfd02032ce722dff'/>
<id>urn:sha1:53341d7de3f013cc39a3692bdfd02032ce722dff</id>
<content type='text'>
commit b72e19b9225d4297a18715b0998093d843d170fa upstream.

There are two places where we read "nr_maps" if both of them are set to
zero then we would hit a NULL dereference here.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>libceph: fix error handling in handle_reply()</title>
<updated>2014-01-09T20:24:25Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2013-08-15T05:51:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e9e4b13abe4e4a399ed115b858ba8471854a938b'/>
<id>urn:sha1:e9e4b13abe4e4a399ed115b858ba8471854a938b</id>
<content type='text'>
commit 1874119664dafda3ef2ed9b51b4759a9540d4a1a upstream.

We've tried to fix the error paths in this function before, but there
is still a hidden goto in the ceph_decode_need() macro which goes to the
wrong place.  We need to release the "req" and unlock a mutex before
returning.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>libceph: call r_unsafe_callback when unsafe reply is received</title>
<updated>2014-01-09T20:24:25Z</updated>
<author>
<name>Yan, Zheng</name>
<email>zheng.z.yan@intel.com</email>
</author>
<published>2013-06-24T06:41:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ef0b67e4b1f57d14f314a206338e5dd806a08b21'/>
<id>urn:sha1:ef0b67e4b1f57d14f314a206338e5dd806a08b21</id>
<content type='text'>
commit 61c5d6bf7074ee32d014dcdf7698dc8c59eb712d upstream.

We can't use !req-&gt;r_sent to check if OSD request is sent for the
first time, this is because __cancel_request() zeros req-&gt;r_sent
when OSD map changes. Rather than adding a new variable to struct
ceph_osd_request to indicate if it's sent for the first time, We
can call the unsafe callback only when unsafe OSD reply is received.
If OSD's first reply is safe, just skip calling the unsafe callback.

The purpose of unsafe callback is adding unsafe request to a list,
so that fsync(2) can wait for the safe reply. fsync(2) doesn't need
to wait for a write(2) that hasn't returned yet. So it's OK to add
request to the unsafe list when the first OSD reply is received.
(ceph_sync_write() returns after receiving the first OSD reply)

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>libceph: fix truncate size calculation</title>
<updated>2014-01-09T20:24:25Z</updated>
<author>
<name>Yan, Zheng</name>
<email>zheng.z.yan@intel.com</email>
</author>
<published>2013-06-02T10:40:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1f69fb068f24ac8bdf7b404dd49d0da7fb1a0d24'/>
<id>urn:sha1:1f69fb068f24ac8bdf7b404dd49d0da7fb1a0d24</id>
<content type='text'>
commit ccca4e37b1a912da3db68aee826557ea66145273 upstream.

check the "not truncated yet" case

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>libceph: fix safe completion</title>
<updated>2014-01-09T20:24:25Z</updated>
<author>
<name>Yan, Zheng</name>
<email>zheng.z.yan@intel.com</email>
</author>
<published>2013-05-31T07:54:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=aede2cb5c95588e703e358239a4f3842e21f103e'/>
<id>urn:sha1:aede2cb5c95588e703e358239a4f3842e21f103e</id>
<content type='text'>
commit eb845ff13a44477f8a411baedbf11d678b9daf0a upstream.

handle_reply() calls complete_request() only if the first OSD reply
has ONDISK flag.

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>libceph: add lingering request reference when registered</title>
<updated>2014-01-09T20:24:24Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@inktank.com</email>
</author>
<published>2013-05-23T01:54:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1d02ec7ffd7577d07c91d2cbb391386d9a129fda'/>
<id>urn:sha1:1d02ec7ffd7577d07c91d2cbb391386d9a129fda</id>
<content type='text'>
commit 96e4dac66f69d28af2b736e723364efbbdf9fdee upstream.

When an osd request is set to linger, the osd client holds onto the
request so it can be re-submitted following certain osd map changes.
The osd client holds a reference to the request until it is
unregistered.  This is used by rbd for watch requests.

Currently, the reference is taken when the request is marked with
the linger flag.  This means that if an error occurs after that
time but before the the request completes successfully, that
reference is leaked.

There's really no reason to take the reference until the request is
registered in the the osd client's list of lingering requests, and
that only happens when the lingering (watch) request completes
successfully.

So take that reference only when it gets registered following
succesful completion, and drop it (as before) when the request
gets unregistered.  This avoids the reference problem on error
in rbd.

Rearrange ceph_osdc_unregister_linger_request() to avoid using
the request pointer after it may have been freed.

And hold an extra reference in kick_requests() while handling
a linger request that has not yet been registered, to ensure
it doesn't go away.

This resolves:
    http://tracker.ceph.com/issues/3859

Signed-off-by: Alex Elder &lt;elder@inktank.com&gt;
Reviewed-by: Josh Durgin &lt;josh.durgin@inktank.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>libceph: use pg_num_mask instead of pgp_num_mask for pg.seed calc</title>
<updated>2013-09-27T00:18:29Z</updated>
<author>
<name>Sage Weil</name>
<email>sage@inktank.com</email>
</author>
<published>2013-08-29T00:17:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fd5e2dea537bbf0bfb09f79a8b34c148bb502735'/>
<id>urn:sha1:fd5e2dea537bbf0bfb09f79a8b34c148bb502735</id>
<content type='text'>
commit 9542cf0bf9b1a3adcc2ef271edbcbdba03abf345 upstream.

Fix a typo that used the wrong bitmask for the pg.seed calculation.  This
is normally unnoticed because in most cases pg_num == pgp_num.  It is, however,
a bug that is easily corrected.

Signed-off-by: Sage Weil &lt;sage@inktank.com&gt;
Reviewed-by: Alex Elder &lt;alex.elder@linary.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>libceph: unregister request in __map_request failed and nofail == false</title>
<updated>2013-09-27T00:18:29Z</updated>
<author>
<name>majianpeng</name>
<email>majianpeng@gmail.com</email>
</author>
<published>2013-07-16T07:45:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2ab0ad6af3a87818ea3525914be6779fca833801'/>
<id>urn:sha1:2ab0ad6af3a87818ea3525914be6779fca833801</id>
<content type='text'>
commit 73d9f7eef3d98c3920e144797cc1894c6b005a1e upstream.

For nofail == false request, if __map_request failed, the caller does
cleanup work, like releasing the relative pages.  It doesn't make any sense
to retry this request.

Signed-off-by: Jianpeng Ma &lt;majianpeng@gmail.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
