<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/block/drbd/drbd_bitmap.c, branch v3.10.26</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/block/drbd/drbd_bitmap.c?h=v3.10.26</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/block/drbd/drbd_bitmap.c?h=v3.10.26'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-03-23T00:13:59Z</updated>
<entry>
<title>drbd: cleanup ondisk meta data layout calculations and defines</title>
<updated>2013-03-23T00:13:59Z</updated>
<author>
<name>Lars Ellenberg</name>
<email>lars.ellenberg@linbit.com</email>
</author>
<published>2013-03-19T17:16:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ae8bf312e97d554b6aa32e7b2ceb993812ad0835'/>
<id>urn:sha1:ae8bf312e97d554b6aa32e7b2ceb993812ad0835</id>
<content type='text'>
Add a comment about our meta data layout variants,
and rename a few defines (e.g. MD_RESERVED_SECT -&gt; MD_128MB_SECT)
to make it clear that they are short hand for fixed constants,
and not arbitrarily to be redefined as one may see fit.

Properly pad struct meta_data_on_disk to 4kB,
and initialize to zero not only the first 512 Byte,
but all of it in drbd_md_sync().

Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>drbd: use copy_highpage</title>
<updated>2012-11-09T13:22:26Z</updated>
<author>
<name>Akinobu Mita</name>
<email>akinobu.mita@gmail.com</email>
</author>
<published>2012-11-09T00:12:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f1d6a328bbe63b528721a25251ad8f5f1e997804'/>
<id>urn:sha1:f1d6a328bbe63b528721a25251ad8f5f1e997804</id>
<content type='text'>
Use copy_highpage() to copy from one page to another.

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'drbd-8.4_ed6' into for-3.8-drivers-drbd-8.4_ed6</title>
<updated>2012-11-09T13:20:23Z</updated>
<author>
<name>Philipp Reisner</name>
<email>philipp.reisner@linbit.com</email>
</author>
<published>2012-11-09T13:18:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=986836503e49ccf7e84b813715d344964ec93566'/>
<id>urn:sha1:986836503e49ccf7e84b813715d344964ec93566</id>
<content type='text'>
</content>
</entry>
<entry>
<title>drbd: wait for meta data IO completion even with failed disk, unless force-detached</title>
<updated>2012-11-09T13:11:40Z</updated>
<author>
<name>Lars Ellenberg</name>
<email>lars.ellenberg@linbit.com</email>
</author>
<published>2012-09-27T13:07:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e34b677d09ce375a87acd0360537cbed33881b0c'/>
<id>urn:sha1:e34b677d09ce375a87acd0360537cbed33881b0c</id>
<content type='text'>
The intention of force-detach is to be able to deal with a completely
unresponsive lower level IO stack, which does not even deliver error
completions anymore, but no completion at all.

In all other cases, we must still wait for the meta data IO completion.

Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
</content>
</entry>
<entry>
<title>drbd: fix potential deadlock during bitmap (re-)allocation</title>
<updated>2012-11-09T13:11:39Z</updated>
<author>
<name>Lars Ellenberg</name>
<email>lars.ellenberg@linbit.com</email>
</author>
<published>2012-09-26T12:18:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bc891c9ae3fb2848922e0f0da22fd7de0d58dc1b'/>
<id>urn:sha1:bc891c9ae3fb2848922e0f0da22fd7de0d58dc1b</id>
<content type='text'>
The former comment arguing that GFP_KERNEL was good enough was wrong: it
did not take resize into account at all, and assumed the only path
leading here was the normal attach on a still secondary device, so no
deadlock would be possible.

Both resize on a Primary, or attach on a diskless Primary,
could potentially deadlock.

drbd_bm_resize() is called while IO to the respective device is
suspended, so we must use GFP_NOIO to avoid potential deadlock.

Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
</content>
</entry>
<entry>
<title>drbd: Write all pages of the bitmap after an online resize</title>
<updated>2012-11-09T13:05:51Z</updated>
<author>
<name>Philipp Reisner</name>
<email>philipp.reisner@linbit.com</email>
</author>
<published>2012-08-14T09:46:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fef45d297e447d710abcf0cd0bdbf8738ff469eb'/>
<id>urn:sha1:fef45d297e447d710abcf0cd0bdbf8738ff469eb</id>
<content type='text'>
We need to write the whole bitmap after we moved the meta data
due to an online resize operation.

With the support for one peta byte devices bitmap IO was optimized
to only write out touched pages. This optimization must be turned
off when writing the bitmap after an online resize.

This issue was introduced with drbd-8.3.10.

The impact of this bug is that after an online resize, the next
resync could become larger than expected.

Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
</content>
</entry>
<entry>
<title>drbd: differentiate between normal and forced detach</title>
<updated>2012-11-08T15:58:39Z</updated>
<author>
<name>Lars Ellenberg</name>
<email>lars.ellenberg@linbit.com</email>
</author>
<published>2012-07-30T07:07:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0c849666016cbf541c1030eec55f5f8dd1fba513'/>
<id>urn:sha1:0c849666016cbf541c1030eec55f5f8dd1fba513</id>
<content type='text'>
Aborting local requests (not waiting for completion from the lower level
disk) is dangerous: if the master bio has been completed to upper
layers, data pages may be re-used for other things already.
If local IO is still pending and later completes,
this may cause crashes or corrupt unrelated data.

Only abort local IO if explicitly requested.
Intended use case is a lower level device that turned into a tarpit,
not completing io requests, not even doing error completion.

Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
</content>
</entry>
<entry>
<title>drbd: fix access of unallocated pages and kernel panic</title>
<updated>2012-11-08T15:58:32Z</updated>
<author>
<name>Lars Ellenberg</name>
<email>lars.ellenberg@linbit.com</email>
</author>
<published>2012-06-08T13:06:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1b6f19740da8e7ed2d1216dc69a972d10de4f0e9'/>
<id>urn:sha1:1b6f19740da8e7ed2d1216dc69a972d10de4f0e9</id>
<content type='text'>
BUG: unable to handle kernel NULL pointer dereference at (null)
...
 [&lt;d1e17561&gt;] ? _drbd_bm_set_bits+0x151/0x240 [drbd]
 [&lt;d1e236f8&gt;] ? receive_bitmap+0x4f8/0xbc0 [drbd]

This fixes an off-by-one error in the receive_bitmap() path,
if run-length encoded bitmap transfer is enabled.

If the bitmap is an exact multiple of PAGE_SIZE, which means the visible
capacity of the drbd device is an exact multiple of 128 MiB (for 4k page
size), and bitmap compression (use-rle) is enabled (which became default
with 8.4), and the very last bit is dirty and reported in an rle
comressed bitmap packet, we ended up trying to kmap_atomic a page pointer
that does not exist (bitmap-&gt;bm_pages[last index + 1]).

bug introduced by:
    Date:   Fri Jul 24 15:33:24 2009 +0200
    set bits: optimize for complete last word, fix off-by-one-word corner case

made effective by:
    Date:   Thu Dec 16 00:32:38 2010 +0100
    drbd: get rid of unused debug code

    Long time ago, we had paranoia code in the bitmap that allocated one
    extra word, assigned a magic value, and checked on every occasion that
    the magic value was still unchanged.

    That debug code is unused, the extra long word complicates code a bit.
    Get rid of it.

No-one triggered this bug in the last few years, because a large subset
of our userbase is unaffected:
 * typically the last few blocks of a device are not modified
   frequently, and remain unset
 * use-rle was disabled by default in drbd &lt; 8.4
 * those with slightly "odd" device sizes, or
 * drbd internal meta data (which will skew the device size slightly,
   thus makes it harder to have a bug relevant device size)

Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
</content>
</entry>
<entry>
<title>drbd: bm_page_async_io: properly initialize page-&gt;private</title>
<updated>2012-11-08T15:58:28Z</updated>
<author>
<name>Lars Ellenberg</name>
<email>lars.ellenberg@linbit.com</email>
</author>
<published>2012-05-07T11:04:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f66ee69746f6413cae41bdc8b26260e653f62402'/>
<id>urn:sha1:f66ee69746f6413cae41bdc8b26260e653f62402</id>
<content type='text'>
If bm_page_async_io is advised to use a new page for I/O
(BM_AIO_COPY_PAGES is set), it will get it from a mempool.
Once the mempool has to dip into its reserves the page is
not reinitialized, i.e. page-&gt;private contains garbage, which
will lead to various problems once the I/O completes (dereferences
of NULL pointers, the submitting thread getting stuck in D-state,
 ...).

Signed-off-by: Arne Redlich &lt;arne.redlich@googlemail.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
</content>
</entry>
<entry>
<title>drbd: allow bitmap to change during writeout from resync_finished</title>
<updated>2012-11-08T15:58:28Z</updated>
<author>
<name>Lars Ellenberg</name>
<email>lars.ellenberg@linbit.com</email>
</author>
<published>2012-05-07T10:07:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a220d291804233e3a5e3425abf79fa1e62e7bd35'/>
<id>urn:sha1:a220d291804233e3a5e3425abf79fa1e62e7bd35</id>
<content type='text'>
Symptom: messages similar to
 "FIXME asender in bm_change_bits_to,
  bitmap locked for 'write from resync_finished' by worker"

If a resync or verify is finished (or aborted), a full bitmap writeout
is triggered.  If we have ongoing local IO, the bitmap may still change
during that writeout, pending and not yet processed acks may cause bits
to be cleared, while new writes may cause bits to be to be set.

To fix this, introduce the drbd_bm_write_copy_pages() variant.

Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
</content>
</entry>
</feed>
