<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/md/md-cluster.c, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-10-18T16:41:25Z</updated>
<entry>
<title>md-cluster: remove suspend_info</title>
<updated>2018-10-18T16:41:25Z</updated>
<author>
<name>Guoqing Jiang</name>
<email>gqjiang@suse.com</email>
</author>
<published>2018-10-18T08:37:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ea89238c0a7b346bc90552e0244e87edf3311920'/>
<id>urn:sha1:ea89238c0a7b346bc90552e0244e87edf3311920</id>
<content type='text'>
Previously, we allow multiple nodes can resync device, but we
had changed it to only support one node can do resync at one
time, but suspend_info is still used.

Now, let's remove the structure and use suspend_lo/hi to record
the range.

Reviewed-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Guoqing Jiang &lt;gqjiang@suse.com&gt;
Signed-off-by: Shaohua Li &lt;shli@fb.com&gt;
</content>
</entry>
<entry>
<title>md-cluster: send BITMAP_NEEDS_SYNC message if reshaping is interrupted</title>
<updated>2018-10-18T16:40:48Z</updated>
<author>
<name>Guoqing Jiang</name>
<email>gqjiang@suse.com</email>
</author>
<published>2018-10-18T08:37:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=cb9ee154317b084a96a7c2b771d1688f39fc714c'/>
<id>urn:sha1:cb9ee154317b084a96a7c2b771d1688f39fc714c</id>
<content type='text'>
We need to continue the reshaping if it was interrupted in
original node. So original node should call resync_bitmap
in case reshaping is aborted.

Then BITMAP_NEEDS_SYNC message is broadcasted to other nodes,
node which continues the reshaping should restart reshape from
mddev-&gt;reshape_position instead of from the first beginning.

Reviewed-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Guoqing Jiang &lt;gqjiang@suse.com&gt;
Signed-off-by: Shaohua Li &lt;shli@fb.com&gt;
</content>
</entry>
<entry>
<title>md-cluster/bitmap: don't call md_bitmap_sync_with_cluster during reshaping stage</title>
<updated>2018-10-18T16:40:01Z</updated>
<author>
<name>Guoqing Jiang</name>
<email>gqjiang@suse.com</email>
</author>
<published>2018-10-18T08:37:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=cbce6863b6d04f6eac6b144bcfaaf11a189d6533'/>
<id>urn:sha1:cbce6863b6d04f6eac6b144bcfaaf11a189d6533</id>
<content type='text'>
When reshape is happening in one node, other nodes could receive
lots of RESYNCING messages, so md_bitmap_sync_with_cluster is called.

Since the resyncing window is typically small in these RESYNCING
messages, so WARN is always triggered, so we should not call the
func when reshape is happening.

Reviewed-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Guoqing Jiang &lt;gqjiang@suse.com&gt;
Signed-off-by: Shaohua Li &lt;shli@fb.com&gt;
</content>
</entry>
<entry>
<title>md-cluster: introduce resync_info_get interface for sanity check</title>
<updated>2018-10-18T16:36:35Z</updated>
<author>
<name>Guoqing Jiang</name>
<email>gqjiang@suse.com</email>
</author>
<published>2018-10-18T08:37:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5ebaf80bc8d5826edcc2d1cea26a7d5a4b8f01dd'/>
<id>urn:sha1:5ebaf80bc8d5826edcc2d1cea26a7d5a4b8f01dd</id>
<content type='text'>
Since the resync region from suspend_info means one node
is reshaping this area, so the position of reshape_progress
should be included in the area.

Reviewed-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Guoqing Jiang &lt;gqjiang@suse.com&gt;
Signed-off-by: Shaohua Li &lt;shli@fb.com&gt;
</content>
</entry>
<entry>
<title>md-cluster/raid10: resize all the bitmaps before start reshape</title>
<updated>2018-10-18T16:30:58Z</updated>
<author>
<name>Guoqing Jiang</name>
<email>gqjiang@suse.com</email>
</author>
<published>2018-10-18T08:37:41Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=afd75628608337cf427a1f9ca0e46698a74f25d8'/>
<id>urn:sha1:afd75628608337cf427a1f9ca0e46698a74f25d8</id>
<content type='text'>
To support add disk under grow mode, we need to resize
all the bitmaps of each node before reshape, so that we
can ensure all nodes have the same view of the bitmap of
the clustered raid.

So after the master node resized the bitmap, it broadcast
a message to other slave nodes, and it checks the size of
each bitmap are same or not by compare pages. We can only
continue the reshaping after all nodes update the bitmap
to the same size (by checking the pages), otherwise revert
bitmap size to previous value.

The resize_bitmaps interface and BITMAP_RESIZE message are
introduced in md-cluster.c for the purpose.

Reviewed-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Guoqing Jiang &lt;gqjiang@suse.com&gt;
Signed-off-by: Shaohua Li &lt;shli@fb.com&gt;
</content>
</entry>
<entry>
<title>md-cluster: release RESYNC lock after the last resync message</title>
<updated>2018-09-01T00:38:10Z</updated>
<author>
<name>Guoqing Jiang</name>
<email>gqjiang@suse.com</email>
</author>
<published>2018-08-31T02:05:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=41a95041126522a921fb73df22cbdd520dfdebad'/>
<id>urn:sha1:41a95041126522a921fb73df22cbdd520dfdebad</id>
<content type='text'>
All the RESYNC messages are sent with resync lock held, the only
exception is resync_finish which releases resync_lockres before
send the last resync message, this should be changed as well.
Otherwise, we can see deadlock issue as follows:

clustermd2-gqjiang2:~ # cat /proc/mdstat
Personalities : [raid10] [raid1]
md0 : active raid1 sdg[0] sdf[1]
      134144 blocks super 1.2 [2/2] [UU]
      [===================&gt;.]  resync = 99.6% (134144/134144) finish=0.0min speed=26K/sec
      bitmap: 1/1 pages [4KB], 65536KB chunk

unused devices: &lt;none&gt;
clustermd2-gqjiang2:~ # ps aux|grep md|grep D
root     20497  0.0  0.0      0     0 ?        D    16:00   0:00 [md0_raid1]
clustermd2-gqjiang2:~ # cat /proc/20497/stack
[&lt;ffffffffc05ff51e&gt;] dlm_lock_sync+0x8e/0xc0 [md_cluster]
[&lt;ffffffffc05ff7e8&gt;] __sendmsg+0x98/0x130 [md_cluster]
[&lt;ffffffffc05ff900&gt;] sendmsg+0x20/0x30 [md_cluster]
[&lt;ffffffffc05ffc35&gt;] resync_info_update+0xb5/0xc0 [md_cluster]
[&lt;ffffffffc0593e84&gt;] md_reap_sync_thread+0x134/0x170 [md_mod]
[&lt;ffffffffc059514c&gt;] md_check_recovery+0x28c/0x510 [md_mod]
[&lt;ffffffffc060c882&gt;] raid1d+0x42/0x800 [raid1]
[&lt;ffffffffc058ab61&gt;] md_thread+0x121/0x150 [md_mod]
[&lt;ffffffff9a0a5b3f&gt;] kthread+0xff/0x140
[&lt;ffffffff9a800235&gt;] ret_from_fork+0x35/0x40
[&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

clustermd-gqjiang1:~ # ps aux|grep md|grep D
root     20531  0.0  0.0      0     0 ?        D    16:00   0:00 [md0_raid1]
root     20537  0.0  0.0      0     0 ?        D    16:00   0:00 [md0_cluster_rec]
root     20676  0.0  0.0      0     0 ?        D    16:01   0:00 [md0_resync]
clustermd-gqjiang1:~ # cat /proc/mdstat
Personalities : [raid10] [raid1]
md0 : active raid1 sdf[1] sdg[0]
      134144 blocks super 1.2 [2/2] [UU]
      [===================&gt;.]  resync = 97.3% (131072/134144) finish=8076.8min speed=0K/sec
      bitmap: 1/1 pages [4KB], 65536KB chunk

unused devices: &lt;none&gt;
clustermd-gqjiang1:~ # cat /proc/20531/stack
[&lt;ffffffffc080974d&gt;] metadata_update_start+0xcd/0xd0 [md_cluster]
[&lt;ffffffffc079c897&gt;] md_update_sb.part.61+0x97/0x820 [md_mod]
[&lt;ffffffffc079f15b&gt;] md_check_recovery+0x29b/0x510 [md_mod]
[&lt;ffffffffc0816882&gt;] raid1d+0x42/0x800 [raid1]
[&lt;ffffffffc0794b61&gt;] md_thread+0x121/0x150 [md_mod]
[&lt;ffffffff9e0a5b3f&gt;] kthread+0xff/0x140
[&lt;ffffffff9e800235&gt;] ret_from_fork+0x35/0x40
[&lt;ffffffffffffffff&gt;] 0xffffffffffffffff
clustermd-gqjiang1:~ # cat /proc/20537/stack
[&lt;ffffffffc0813222&gt;] freeze_array+0xf2/0x140 [raid1]
[&lt;ffffffffc080a56e&gt;] recv_daemon+0x41e/0x580 [md_cluster]
[&lt;ffffffffc0794b61&gt;] md_thread+0x121/0x150 [md_mod]
[&lt;ffffffff9e0a5b3f&gt;] kthread+0xff/0x140
[&lt;ffffffff9e800235&gt;] ret_from_fork+0x35/0x40
[&lt;ffffffffffffffff&gt;] 0xffffffffffffffff
clustermd-gqjiang1:~ # cat /proc/20676/stack
[&lt;ffffffffc080951e&gt;] dlm_lock_sync+0x8e/0xc0 [md_cluster]
[&lt;ffffffffc080957f&gt;] lock_token+0x2f/0xa0 [md_cluster]
[&lt;ffffffffc0809622&gt;] lock_comm+0x32/0x90 [md_cluster]
[&lt;ffffffffc08098f5&gt;] sendmsg+0x15/0x30 [md_cluster]
[&lt;ffffffffc0809c0a&gt;] resync_info_update+0x8a/0xc0 [md_cluster]
[&lt;ffffffffc08130ba&gt;] raid1_sync_request+0xa9a/0xb10 [raid1]
[&lt;ffffffffc079b8ea&gt;] md_do_sync+0xbaa/0xf90 [md_mod]
[&lt;ffffffffc0794b61&gt;] md_thread+0x121/0x150 [md_mod]
[&lt;ffffffff9e0a5b3f&gt;] kthread+0xff/0x140
[&lt;ffffffff9e800235&gt;] ret_from_fork+0x35/0x40
[&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

Reviewed-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Guoqing Jiang &lt;gqjiang@suse.com&gt;
Signed-off-by: Shaohua Li &lt;shli@fb.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input</title>
<updated>2018-08-18T23:48:07Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2018-08-18T23:48:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=08b5fa819970c318e58ab638f497633c25971813'/>
<id>urn:sha1:08b5fa819970c318e58ab638f497633c25971813</id>
<content type='text'>
Pull input updates from Dmitry Torokhov:

 - a new driver for Rohm BU21029 touch controller

 - new bitmap APIs: bitmap_alloc, bitmap_zalloc and bitmap_free

 - updates to Atmel, eeti. pxrc and iforce drivers

 - assorted driver cleanups and fixes.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (57 commits)
  MAINTAINERS: Add PhoenixRC Flight Controller Adapter
  Input: do not use WARN() in input_alloc_absinfo()
  Input: mark expected switch fall-throughs
  Input: raydium_i2c_ts - use true and false for boolean values
  Input: evdev - switch to bitmap API
  Input: gpio-keys - switch to bitmap_zalloc()
  Input: elan_i2c_smbus - cast sizeof to int for comparison
  bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free()
  md: Avoid namespace collision with bitmap API
  dm: Avoid namespace collision with bitmap API
  Input: pm8941-pwrkey - add resin entry
  Input: pm8941-pwrkey - abstract register offsets and event code
  Input: iforce - reorganize joystick configuration lists
  Input: atmel_mxt_ts - move completion to after config crc is updated
  Input: atmel_mxt_ts - don't report zero pressure from T9
  Input: atmel_mxt_ts - zero terminate config firmware file
  Input: atmel_mxt_ts - refactor config update code to add context struct
  Input: atmel_mxt_ts - config CRC may start at T71
  Input: atmel_mxt_ts - remove unnecessary debug on ENOMEM
  Input: atmel_mxt_ts - remove duplicate setup of ABS_MT_PRESSURE
  ...
</content>
</entry>
<entry>
<title>md: Avoid namespace collision with bitmap API</title>
<updated>2018-08-01T22:49:39Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2018-08-01T22:20:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e64e4018d572710c44f42c923d4ac059f0a23320'/>
<id>urn:sha1:e64e4018d572710c44f42c923d4ac059f0a23320</id>
<content type='text'>
bitmap API (include/linux/bitmap.h) has 'bitmap' prefix for its methods.

On the other hand MD bitmap API is special case.
Adding 'md' prefix to it to avoid name space collision.

No functional changes intended.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Acked-by: Shaohua Li &lt;shli@kernel.org&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;</content>
</entry>
<entry>
<title>md-cluster: don't send msg if array is closing</title>
<updated>2018-07-05T18:17:02Z</updated>
<author>
<name>Guoqing Jiang</name>
<email>gqjiang@suse.com</email>
</author>
<published>2018-07-02T08:26:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=df8c676418e1eb6f7bbafc1e01983f3538584894'/>
<id>urn:sha1:df8c676418e1eb6f7bbafc1e01983f3538584894</id>
<content type='text'>
If we close an array which resync thread is running,
then we don't need the node to send msg since another
node would launch the resync thread to continue the
rest works. Also send a message is time consuming,
we should avoid it.

Signed-off-by: Guoqing Jiang &lt;gqjiang@suse.com&gt;
Reviewed-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Shaohua Li &lt;shli@fb.com&gt;
</content>
</entry>
<entry>
<title>md-cluster: show array's status more accurate</title>
<updated>2018-07-05T18:17:01Z</updated>
<author>
<name>Guoqing Jiang</name>
<email>gqjiang@suse.com</email>
</author>
<published>2018-07-02T08:26:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0357ba27bd611ff496390fdb172fdb31ca475398'/>
<id>urn:sha1:0357ba27bd611ff496390fdb172fdb31ca475398</id>
<content type='text'>
When resync or recovery is happening in one node,
other nodes don't show the appropriate info now.

For example, when create an array in master node
without "--assume-clean", then assemble the array
in slave nodes, you can see "resync=PENDING" when
read /proc/mdstat in slave nodes. However, the info
is confusing since "PENDING" status is introduced
for start array in read-only mode.

We introduce RESYNCING_REMOTE flag to indicate that
resync thread is running in remote node. The flags
is set when node receive RESYNCING msg. And we clear
the REMOTE flag in following cases:

1. resync or recover is finished in master node,
   which means slaves receive msg with both lo
   and hi are set to 0.
2. node continues resync/recovery in recover_bitmaps.
3. when resync_finish is called.

Then we show accurate information in status_resync
by check REMOTE flags and with other conditions.

Signed-off-by: Guoqing Jiang &lt;gqjiang@suse.com&gt;
Reviewed-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Shaohua Li &lt;shli@fb.com&gt;
</content>
</entry>
</feed>
