<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/ceph, branch v6.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-08-03T12:05:39Z</updated>
<entry>
<title>libceph: clean up ceph_osdc_start_request prototype</title>
<updated>2022-08-03T12:05:39Z</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@kernel.org</email>
</author>
<published>2022-06-30T20:21:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a8af0d682ae0c9cf62dd0ad6afdb1480951d6a10'/>
<id>urn:sha1:a8af0d682ae0c9cf62dd0ad6afdb1480951d6a10</id>
<content type='text'>
This function always returns 0, and ignores the nofail boolean. Drop the
nofail argument, make the function void return and fix up the callers.

Signed-off-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Reviewed-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: fix ceph_pagelist_reserve() comment typo</title>
<updated>2022-08-02T22:54:13Z</updated>
<author>
<name>Jason Wang</name>
<email>wangborong@cdjrlc.com</email>
</author>
<published>2022-07-24T20:11:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4f8861945562c507248fd000fde70d9af4d225d2'/>
<id>urn:sha1:4f8861945562c507248fd000fde70d9af4d225d2</id>
<content type='text'>
The double `without' is duplicated in the comment, remove one.

Signed-off-by: Jason Wang &lt;wangborong@cdjrlc.com&gt;
Reviewed-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: print fsid and epoch with osd id</title>
<updated>2022-08-02T22:54:12Z</updated>
<author>
<name>Daichi Mukai</name>
<email>daichi-mukai@cybozu.co.jp</email>
</author>
<published>2022-06-14T11:22:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=842d6b019b180f5b78d71aa445ee3c724e34d462'/>
<id>urn:sha1:842d6b019b180f5b78d71aa445ee3c724e34d462</id>
<content type='text'>
Print fsid and epoch in libceph log messages to distinct from which
each message come.

[ idryomov: don't bother with gid for now, print epoch instead ]

Signed-off-by: Satoru Takeuchi &lt;satoru.takeuchi@gmail.com&gt;
Signed-off-by: Daichi Mukai &lt;daichi-mukai@cybozu.co.jp&gt;
Reviewed-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: check pointer before assigned to "c-&gt;rules[]"</title>
<updated>2022-08-02T22:54:12Z</updated>
<author>
<name>Li Qiong</name>
<email>liqiong@nfschina.com</email>
</author>
<published>2022-06-14T07:10:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fc54cb8d876ae7b2d1bd0cf8a4d0b96a76318a91'/>
<id>urn:sha1:fc54cb8d876ae7b2d1bd0cf8a4d0b96a76318a91</id>
<content type='text'>
It should be better to check pointer firstly, then assign it
to c-&gt;rules[]. Refine code a little bit.

Signed-off-by: Li Qiong &lt;liqiong@nfschina.com&gt;
Reviewed-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: use swap() macro instead of taking tmp variable</title>
<updated>2022-05-25T18:45:13Z</updated>
<author>
<name>Guo Zhengkui</name>
<email>guozhengkui@vivo.com</email>
</author>
<published>2022-04-12T06:46:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d9d58f0402a8bd14b980e6f41a5aa28aa0ca0e04'/>
<id>urn:sha1:d9d58f0402a8bd14b980e6f41a5aa28aa0ca0e04</id>
<content type='text'>
Fix the following coccicheck warning:
net/ceph/crush/mapper.c:1077:8-9: WARNING opportunity for swap()

by using swap() for the swapping of variable values and drop
the tmp variable that is not needed any more.

Signed-off-by: Guo Zhengkui &lt;guozhengkui@vivo.com&gt;
Reviewed-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: fix misleading ceph_osdc_cancel_request() comment</title>
<updated>2022-05-18T19:21:29Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@gmail.com</email>
</author>
<published>2022-05-16T15:17:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d0bb883c6355bcb2cc149fb4d5c3b28ccd327a5e'/>
<id>urn:sha1:d0bb883c6355bcb2cc149fb4d5c3b28ccd327a5e</id>
<content type='text'>
cancel_request() never guaranteed that after its return the OSD
client would be completely done with the OSD request.  The callback
(if specified) can still be invoked and a ref can still be held.

Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Reviewed-by: Xiubo Li &lt;xiubli@redhat.com&gt;
</content>
</entry>
<entry>
<title>libceph: fix potential use-after-free on linger ping and resends</title>
<updated>2022-05-18T19:21:05Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@gmail.com</email>
</author>
<published>2022-05-14T10:16:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=75dbb685f4e8786c33ddef8279bab0eadfb0731f'/>
<id>urn:sha1:75dbb685f4e8786c33ddef8279bab0eadfb0731f</id>
<content type='text'>
request_reinit() is not only ugly as the comment rightfully suggests,
but also unsafe.  Even though it is called with osdc-&gt;lock held for
write in all cases, resetting the OSD request refcount can still race
with handle_reply() and result in use-after-free.  Taking linger ping
as an example:

    handle_timeout thread                     handle_reply thread

                                              down_read(&amp;osdc-&gt;lock)
                                              req = lookup_request(...)
                                              ...
                                              finish_request(req)  # unregisters
                                              up_read(&amp;osdc-&gt;lock)
                                              __complete_request(req)
                                                linger_ping_cb(req)

      # req-&gt;r_kref == 2 because handle_reply still holds its ref

    down_write(&amp;osdc-&gt;lock)
    send_linger_ping(lreq)
      req = lreq-&gt;ping_req  # same req
      # cancel_linger_request is NOT
      # called - handle_reply already
      # unregistered
      request_reinit(req)
        WARN_ON(req-&gt;r_kref != 1)  # fires
        request_init(req)
          kref_init(req-&gt;r_kref)

                   # req-&gt;r_kref == 1 after kref_init

                                              ceph_osdc_put_request(req)
                                                kref_put(req-&gt;r_kref)

            # req-&gt;r_kref == 0 after kref_put, req is freed

        &lt;further req initialization/use&gt; !!!

This happens because send_linger_ping() always (re)uses the same OSD
request for watch ping requests, relying on cancel_linger_request() to
unregister it from the OSD client and rip its messages out from the
messenger.  send_linger() does the same for watch/notify registration
and watch reconnect requests.  Unfortunately cancel_request() doesn't
guarantee that after it returns the OSD client would be completely done
with the OSD request -- a ref could still be held and the callback (if
specified) could still be invoked too.

The original motivation for request_reinit() was inability to deal with
allocation failures in send_linger() and send_linger_ping().  Switching
to using osdc-&gt;req_mempool (currently only used by CephFS) respects that
and allows us to get rid of request_reinit().

Cc: stable@vger.kernel.org
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Reviewed-by: Xiubo Li &lt;xiubli@redhat.com&gt;
Acked-by: Jeff Layton &lt;jlayton@kernel.org&gt;
</content>
</entry>
<entry>
<title>libceph: disambiguate cluster/pool full log message</title>
<updated>2022-04-25T08:45:15Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@gmail.com</email>
</author>
<published>2022-03-12T10:09:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dc9b0dc4561dedd44b2bf4b8e5ef1a8a040b2424'/>
<id>urn:sha1:dc9b0dc4561dedd44b2bf4b8e5ef1a8a040b2424</id>
<content type='text'>
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: drop else branches in prepare_read_data{,_cont}</title>
<updated>2022-03-01T17:26:36Z</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@kernel.org</email>
</author>
<published>2022-02-08T13:19:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=27884f4bce63ebb8821992787d3e687cc24d95a3'/>
<id>urn:sha1:27884f4bce63ebb8821992787d3e687cc24d95a3</id>
<content type='text'>
Just call set_in_bvec in the non-conditional part.

Signed-off-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Reviewed-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: optionally use bounce buffer on recv path in crc mode</title>
<updated>2022-02-02T17:50:36Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@gmail.com</email>
</author>
<published>2021-12-30T14:13:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=038b8d1d1ab1cce11a158d30bf080ff41a2cfd15'/>
<id>urn:sha1:038b8d1d1ab1cce11a158d30bf080ff41a2cfd15</id>
<content type='text'>
Both msgr1 and msgr2 in crc mode are zero copy in the sense that
message data is read from the socket directly into the destination
buffer.  We assume that the destination buffer is stable (i.e. remains
unchanged while it is being read to) though.  Otherwise, CRC errors
ensue:

  libceph: read_partial_message 0000000048edf8ad data crc 1063286393 != exp. 228122706
  libceph: osd1 (1)192.168.122.1:6843 bad crc/signature

  libceph: bad data crc, calculated 57958023, expected 1805382778
  libceph: osd2 (2)192.168.122.1:6876 integrity error, bad crc

Introduce rxbounce option to enable use of a bounce buffer when
receiving message data.  In particular this is needed if a mapped
image is a Windows VM disk, passed to QEMU.  Windows has a system-wide
"dummy" page that may be mapped into the destination buffer (potentially
more than once into the same buffer) by the Windows Memory Manager in
an effort to generate a single large I/O [1][2].  QEMU makes a point of
preserving overlap relationships when cloning I/O vectors, so krbd gets
exposed to this behaviour.

[1] "What Is Really in That MDL?"
    https://docs.microsoft.com/en-us/previous-versions/windows/hardware/design/dn614012(v=vs.85)
[2] https://blogs.msmvps.com/kernelmustard/2005/05/04/dummy-pages/

URL: https://bugzilla.redhat.com/show_bug.cgi?id=1973317
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
</content>
</entry>
</feed>
