<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/md/dm-bufio.c, branch linux-4.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-04-30T15:51:39Z</updated>
<entry>
<title>dm bufio: fix buffer alignment</title>
<updated>2018-04-30T15:51:39Z</updated>
<author>
<name>Mikulas Patocka</name>
</author>
<published>2018-04-19T12:33:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f7879b4cea4b7867e7382efdbd805fbe35835337'/>
<id>urn:sha1:f7879b4cea4b7867e7382efdbd805fbe35835337</id>
<content type='text'>
Commit 6b5e718cc138 ("dm bufio: relax alignment constraint on slab
cache") relaxed alignment on dm-bufio cache, however it may break
dm-crypt or dm-integrity.

dm-crypt and dm-integrity require that the size of bio vector entries
(bv_len) is aligned on its sector size. bv_offset doesn't have to be
aligned, but bv_len must be. XFS sends unaligned bios, but they do not
cross page boundary, so the requirement for aligned bv_len is met.

Commit 6b5e718cc138 made dm-bufio send unaligned bios that cross page
boundary, this could break dm-crypt and dm-integrity.

Reinstates the alignment. Note that misaligned entries only happen when
we use slab/slub debugging. Without debugging, the entries are always
aligned.

Fixes: 6b5e718cc138 ("dm bufio: relax alignment constraint on slab cache")
Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm bufio: don't embed a bio in the dm_buffer structure</title>
<updated>2018-04-03T19:04:29Z</updated>
<author>
<name>Mikulas Patocka</name>
</author>
<published>2018-03-26T18:29:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=45354f1eb67224669a1de94dbfcb8bb226be1f74'/>
<id>urn:sha1:45354f1eb67224669a1de94dbfcb8bb226be1f74</id>
<content type='text'>
The bio structure consumes a substantial part of dm_buffer.  The bio
structure is only needed when doing I/O on the buffer, thus we don't
have to embed it in the buffer.

Allocate the bio structure only when doing I/O.

We don't need to create a bio_set because, in case of allocation
failure, dm-bufio falls back to using dm-io (which keeps its own
bio_set).

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm bufio: support non-power-of-two block sizes</title>
<updated>2018-04-03T19:04:28Z</updated>
<author>
<name>Mikulas Patocka</name>
</author>
<published>2018-03-26T18:29:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f51f2e0a7fb17af57634c65687c985c9b3449263'/>
<id>urn:sha1:f51f2e0a7fb17af57634c65687c985c9b3449263</id>
<content type='text'>
Support block sizes that are not a power-of-two (but they must be a
multiple of 512b).  As always, a slab cache is used for allocations.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm bufio: use slab cache for dm_buffer structure allocations</title>
<updated>2018-04-03T19:04:27Z</updated>
<author>
<name>Mikulas Patocka</name>
</author>
<published>2018-03-26T18:29:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=359dbf19ab524652a2208a2a2cddccec2eede2ad'/>
<id>urn:sha1:359dbf19ab524652a2208a2a2cddccec2eede2ad</id>
<content type='text'>
kmalloc padded to the next power of two, using a slab cache avoids this.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm bufio: reorder fields in dm_buffer structure</title>
<updated>2018-04-03T19:04:26Z</updated>
<author>
<name>Mikulas Patocka</name>
</author>
<published>2018-03-26T18:29:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=03b02939593700caf391dc02b86b23b0d7aac2e5'/>
<id>urn:sha1:03b02939593700caf391dc02b86b23b0d7aac2e5</id>
<content type='text'>
Reorder fields in dm_buffer structure to improve packing and reduce
structure size.  The compiler allocates 32-bit integer for field 'enum
data_mode', so change it to unsigned char.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm bufio: relax alignment constraint on slab cache</title>
<updated>2018-04-03T19:04:25Z</updated>
<author>
<name>Mikulas Patocka</name>
</author>
<published>2018-03-15T21:22:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6b5e718cc138ef691e91685535e3ba776acc4893'/>
<id>urn:sha1:6b5e718cc138ef691e91685535e3ba776acc4893</id>
<content type='text'>
The I/O buffer doesn't have to be aligned on block size granularity,
relax alignment to ARCH_KMALLOC_MINALIGN (required to allow DMA from
slab cache memory on some architectures).

Also, set SLAB_RECLAIM_ACCOUNT so that the memory allocated from the
cache is accounted as reclaimable and doesn't inflate the 'used' entry
in the free command.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm bufio: remove code that merges slab caches</title>
<updated>2018-04-03T19:04:25Z</updated>
<author>
<name>Mikulas Patocka</name>
</author>
<published>2018-03-26T18:29:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=21bb13276768da7925c0b532037e071877e4fb4d'/>
<id>urn:sha1:21bb13276768da7925c0b532037e071877e4fb4d</id>
<content type='text'>
All slab allocators can merge duplicate caches.  So dm-bufio doesn't
need extra slab merging logic.  Instead it can just allocate one slab
cache per client and let the allocator merge them.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm bufio: get rid of slab cache name allocations</title>
<updated>2018-04-03T19:04:24Z</updated>
<author>
<name>Mikulas Patocka</name>
</author>
<published>2018-03-15T21:16:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eeb67a0ba04dfb80ec1a956fa6345f4ca5b9c937'/>
<id>urn:sha1:eeb67a0ba04dfb80ec1a956fa6345f4ca5b9c937</id>
<content type='text'>
dm-bufio keeps the dm_bufio_cache_names array that holds names of the
slab caches.

Since the commit db265eca7700 ("mm/sl[aou]b: Move duping of slab name to
slab_common.c"), the kernel automatically duplicates the slab cache name
when creating the slab cache, so we no longer have to keep the name
allocated.

Remove the code that allocates the slab names and keeps them around.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm bufio: move dm-bufio.h to include/linux/</title>
<updated>2018-04-03T19:04:23Z</updated>
<author>
<name>Mikulas Patocka</name>
</author>
<published>2018-03-15T20:02:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=afa53df869121fd4f6f1265cbe794d64387890ae'/>
<id>urn:sha1:afa53df869121fd4f6f1265cbe794d64387890ae</id>
<content type='text'>
Move dm-bufio.h to include/linux/ so that external GPL'd DM target
modules can use it.

It is better to allow the use of dm-bufio than force external modules
to implement the equivalent buffered IO mechanism in some new way.  The
hope is this will encourage the use of dm-bufio; which will then make it
easier for a GPL'd external DM target module to be included upstream.

A couple dm-bufio EXPORT_SYMBOL exports have also been updated to use
EXPORT_SYMBOL_GPL.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm bufio: delete outdated comment</title>
<updated>2018-04-03T19:04:22Z</updated>
<author>
<name>Mikulas Patocka</name>
</author>
<published>2018-03-04T06:53:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1f013174b352057557e47321f23a33e39e752bd4'/>
<id>urn:sha1:1f013174b352057557e47321f23a33e39e752bd4</id>
<content type='text'>
This comment was true when dm-bufio was written but, since 4.3, bios can
now have arbitrary size and the driver splits them.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
</feed>
