<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/block/rnbd, branch v5.9</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=v5.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-08-21T23:09:11Z</updated>
<entry>
<title>block/rnbd: Ensure err is always initialized in process_rdma</title>
<updated>2020-08-21T23:09:11Z</updated>
<author>
<name>Nathan Chancellor</name>
<email>natechancellor@gmail.com</email>
</author>
<published>2020-08-18T06:49:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=17bc10300c69bd51b82983cdadafa0a7791f074e'/>
<id>urn:sha1:17bc10300c69bd51b82983cdadafa0a7791f074e</id>
<content type='text'>
Clang warns:

drivers/block/rnbd/rnbd-srv.c:150:6: warning: variable 'err' is used
uninitialized whenever 'if' condition is true
[-Wsometimes-uninitialized]
        if (IS_ERR(bio)) {
            ^~~~~~~~~~~
drivers/block/rnbd/rnbd-srv.c:177:9: note: uninitialized use occurs here
        return err;
               ^~~
drivers/block/rnbd/rnbd-srv.c:150:2: note: remove the 'if' if its
condition is always false
        if (IS_ERR(bio)) {
        ^~~~~~~~~~~~~~~~~~
drivers/block/rnbd/rnbd-srv.c:126:9: note: initialize the variable 'err'
to silence this warning
        int err;
               ^
                = 0
1 warning generated.

err is indeed uninitialized when this statement is taken. Ensure that it
is assigned the error value of bio before jumping to the error handling
label.

Fixes: 735d77d4fd28 ("rnbd: remove rnbd_dev_submit_io")
Reported-by: Brooke Basile &lt;brookebasile@gmail.com&gt;
Signed-off-by: Nathan Chancellor &lt;natechancellor@gmail.com&gt;
Acked-by: Jack Wang &lt;jinpu.wang@cloud.ionos.com&gt;
Link: https://github.com/ClangBuiltLinux/linux/issues/1134
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>rnbd: no need to set bi_end_io in rnbd_bio_map_kern</title>
<updated>2020-08-06T13:30:04Z</updated>
<author>
<name>Guoqing Jiang</name>
<email>guoqing.jiang@cloud.ionos.com</email>
</author>
<published>2020-07-30T09:13:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d7aaeef293404bc41ea9d51c20a518945eb38366'/>
<id>urn:sha1:d7aaeef293404bc41ea9d51c20a518945eb38366</id>
<content type='text'>
Since we always set bi_end_io after call rnbd_bio_map_kern, so the
setting in rnbd_bio_map_kern is redundant.

Signed-off-by: Guoqing Jiang &lt;guoqing.jiang@cloud.ionos.com&gt;
Acked-by: Danil Kipnis &lt;danil.kipnis@cloud.ionos.com&gt;
Acked-by: Jack Wang &lt;jinpu.wang@cloud.ionos.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>rnbd: remove rnbd_dev_submit_io</title>
<updated>2020-08-06T13:30:04Z</updated>
<author>
<name>Guoqing Jiang</name>
<email>guoqing.jiang@cloud.ionos.com</email>
</author>
<published>2020-07-30T09:13:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=735d77d4fd28bd47db9998a3744346302f8c1ee9'/>
<id>urn:sha1:735d77d4fd28bd47db9998a3744346302f8c1ee9</id>
<content type='text'>
The function only has one caller, so let's open code it in process_rdma.
Another bonus is we can avoid push/pop stack, since we need to pass 8
arguments to rnbd_dev_submit_io.

Signed-off-by: Guoqing Jiang &lt;guoqing.jiang@cloud.ionos.com&gt;
Acked-by: Danil Kipnis &lt;danil.kipnis@cloud.ionos.com&gt;
Acked-by: Jack Wang &lt;jinpu.wang@cloud.ionos.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>RDMA/rnbd: Fix compilation error when CONFIG_MODULES is disabled</title>
<updated>2020-05-22T18:50:22Z</updated>
<author>
<name>Danil Kipnis</name>
<email>danil.kipnis@cloud.ionos.com</email>
</author>
<published>2020-05-21T18:59:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cdb685cb9158fa67f6f4584ea39279ed7ae39253'/>
<id>urn:sha1:cdb685cb9158fa67f6f4584ea39279ed7ae39253</id>
<content type='text'>
module_is_live function is only defined when CONFIG_MODULES is enabled.
Use try_module_get instead to check whether the module is being removed.

When module unload and manuall unmapping is happening in parallel, we can
try removing the symlink twice: rnbd_client_exit
vs. rnbd_clt_unmap_dev_store.

This is probably not the best way to deal with this race in general, but
for now this fixes the compilation issue when CONFIG_MODULES is disabled
and has no functional impact. Regression tests passed.

Fixes: 1eb54f8f5dd8 ("block/rnbd: client: sysfs interface functions")
Link: https://lore.kernel.org/r/20200521185909.457245-1-danil.kipnis@cloud.ionos.com
Reported-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Suggested-by: Guoqing Jiang &lt;guoqing.jiang@cloud.ionos.com&gt;
Signed-off-by: Danil Kipnis &lt;danil.kipnis@cloud.ionos.com&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>block/rnbd: Fix an IS_ERR() vs NULL check in find_or_create_sess()</title>
<updated>2020-05-22T14:51:36Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2020-05-19T12:03:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=47393fb57ba7b914c869f70010326c8b8940c3a0'/>
<id>urn:sha1:47393fb57ba7b914c869f70010326c8b8940c3a0</id>
<content type='text'>
The alloc_sess() function returns error pointers, it never returns NULL.

Fixes: f7a7a5c228d4 ("block/rnbd: client: main functionality")
Link: https://lore.kernel.org/r/20200519120347.GD42765@mwanda
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Jack Wang &lt;jinpu.wang@cloud.ionos.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>rnbd/rtrs: Pass max segment size from blk user to the rdma library</title>
<updated>2020-05-19T23:43:26Z</updated>
<author>
<name>Danil Kipnis</name>
<email>danil.kipnis@cloud.ionos.com</email>
</author>
<published>2020-05-19T11:14:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d6ea395072457153f2120e2361657e00f3c0958d'/>
<id>urn:sha1:d6ea395072457153f2120e2361657e00f3c0958d</id>
<content type='text'>
When Block Device Layer is disabled, BLK_MAX_SEGMENT_SIZE is undefined.
The rtrs is a transport library and should compile independently of the
block layer. The desired max segment size should be passed down by the
user.

Introduce max_segment_size parameter for the rtrs_clt_open() call.

Fixes: f7a7a5c228d4 ("block/rnbd: client: main functionality")
Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality")
Fixes: cb80329c9434 ("RDMA/rtrs: client: private header with client structs and functions")
Fixes: b5c27cdb094e ("RDMA/rtrs: public interface header to establish RDMA connections")
Link: https://lore.kernel.org/r/20200519111419.924170-1-danil.kipnis@cloud.ionos.com
Signed-off-by: Danil Kipnis &lt;danil.kipnis@cloud.ionos.com&gt;
Reported-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt; # build-tested
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>block/rnbd: a bit of documentation</title>
<updated>2020-05-17T21:57:17Z</updated>
<author>
<name>Jack Wang</name>
<email>jinpu.wang@cloud.ionos.com</email>
</author>
<published>2020-05-11T13:51:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aa4d16e44f607caccaa697fcb29f2c94672f08d5'/>
<id>urn:sha1:aa4d16e44f607caccaa697fcb29f2c94672f08d5</id>
<content type='text'>
README with description of major sysfs entries, sysfs documentation
are moved to ABI dir as Bart suggested.

Link: https://lore.kernel.org/r/20200511135131.27580-25-danil.kipnis@cloud.ionos.com
Signed-off-by: Danil Kipnis &lt;danil.kipnis@cloud.ionos.com&gt;
Signed-off-by: Jack Wang &lt;jinpu.wang@cloud.ionos.com&gt;
Reviewed-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Acked-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>block/rnbd: include client and server modules into kernel compilation</title>
<updated>2020-05-17T21:57:17Z</updated>
<author>
<name>Jack Wang</name>
<email>jinpu.wang@cloud.ionos.com</email>
</author>
<published>2020-05-11T13:51:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bc01885342e193e7943d86ccbd7bc3e8fee50a68'/>
<id>urn:sha1:bc01885342e193e7943d86ccbd7bc3e8fee50a68</id>
<content type='text'>
Add rnbd Makefile, Kconfig and also corresponding lines into upper block
layer files.

Link: https://lore.kernel.org/r/20200511135131.27580-24-danil.kipnis@cloud.ionos.com
Signed-off-by: Danil Kipnis &lt;danil.kipnis@cloud.ionos.com&gt;
Signed-off-by: Jack Wang &lt;jinpu.wang@cloud.ionos.com&gt;
Reviewed-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Acked-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>block/rnbd: server: sysfs interface functions</title>
<updated>2020-05-17T21:57:17Z</updated>
<author>
<name>Jack Wang</name>
<email>jinpu.wang@cloud.ionos.com</email>
</author>
<published>2020-05-11T13:51:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8cee532f469bbcdb6ac0ab161ebff36fbc6439d7'/>
<id>urn:sha1:8cee532f469bbcdb6ac0ab161ebff36fbc6439d7</id>
<content type='text'>
This is the sysfs interface to rnbd mapped devices on server side:

  /sys/class/rnbd-server/ctl/devices/&lt;device_name&gt;/
    |- block_dev
    |  *** link pointing to the corresponding block device sysfs entry
    |
    |- sessions/&lt;session-name&gt;/
    |  *** sessions directory
       |
       |- read_only
       |  *** is devices mapped as read only
       |
       |- mapping_path
          *** relative device path provided by the client during mapping

Link: https://lore.kernel.org/r/20200511135131.27580-23-danil.kipnis@cloud.ionos.com
Signed-off-by: Danil Kipnis &lt;danil.kipnis@cloud.ionos.com&gt;
Signed-off-by: Jack Wang &lt;jinpu.wang@cloud.ionos.com&gt;
Reviewed-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Acked-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>block/rnbd: server: functionality for IO submitting to block dev</title>
<updated>2020-05-17T21:57:17Z</updated>
<author>
<name>Jack Wang</name>
<email>jinpu.wang@cloud.ionos.com</email>
</author>
<published>2020-05-11T13:51:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f0aad9baadb5b2933e6f4fbb2fd3ffbdcc35b2cf'/>
<id>urn:sha1:f0aad9baadb5b2933e6f4fbb2fd3ffbdcc35b2cf</id>
<content type='text'>
This provides helper functions for IO submitting to block dev.

Link: https://lore.kernel.org/r/20200511135131.27580-22-danil.kipnis@cloud.ionos.com
Signed-off-by: Danil Kipnis &lt;danil.kipnis@cloud.ionos.com&gt;
Signed-off-by: Jack Wang &lt;jinpu.wang@cloud.ionos.com&gt;
Reviewed-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Acked-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
</feed>
