Re: [Cluster-devel] [PATCH] dlm/recoverd: recheck kthread_should_stop() before schedule()

2017-09-25 Thread David Teigland
On Mon, Sep 25, 2017 at 03:47:50PM +0800, Guoqing Jiang wrote:
> Call schedule() here could make the thread miss wake
> up from kthread_stop(), so it is better to recheck
> kthread_should_stop() before call schedule(), a symptom
> happened when I run indefinite test (which mostly created
> clustered raid1, assemble it in other nodes, then stop
> them) of clustered raid.

Thanks, I put this into the next branch in linux-dlm (which I also
moved onto -rc2.)



[Cluster-devel] GFS2: Please pull patch tagged gfs2-for-linus-4.14-rc3

2017-09-25 Thread Bob Peterson
Hi Linus,

Would you please pull this one-off patch from Andreas Gruenbacher
that fixes a GFS2 regression? Thanks.

Bob Peterson
---
The following changes since commit 46c1e79fee417f151547aa46fae04ab06cb666f4:

  Merge branch 'perf-urgent-for-linus' of 
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (2017-09-13 12:24:20 
-0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git 
tags/gfs2-for-linus-4.14-rc3

for you to fetch changes up to 10201655b085df8e000822e496e5d4016a167a36:

  gfs2: Fix debugfs glocks dump (2017-09-25 12:32:33 -0500)


GFS2: Fix an old regression in GFS2's debugfs interface

This tag is meant for pulling a patch called "gfs2: Fix
debugfs glocks dump" which fixes a regression introduced
by commit 88ffbf3e03. The regression caused the glock
dump in debugfs to not report all the glocks, which makes
debugging extremely difficult.


Andreas Gruenbacher (1):
  gfs2: Fix debugfs glocks dump

 fs/gfs2/glock.c | 14 +-
 1 file changed, 5 insertions(+), 9 deletions(-)



Re: [Cluster-devel] [PATCH] gfs2: Always update inode ctime in set_acl

2017-09-25 Thread Bob Peterson
- Original Message -
| Three-entry POSIX ACLs can be stored in the file mode permission bits,
| with no need to store them in extended attributes.  When a process sets
| such a minimal ACL, the kernel updates the file mode like chmod does,
| and removes any existing extended attributes for that ACL.  Make sure
| the ctime is always updated in that case.
| 
| Fixes xfstest generic/307.
| 
| Signed-off-by: Andreas Gruenbacher 
| ---
|  fs/gfs2/acl.c | 1 +
|  1 file changed, 1 insertion(+)
Hi,

Thanks. This is now pushed to the for-next branch of the linux-gfs2 tree:
https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git/commit/?h=for-next=7b532754bac64bc7fe67317205e248558cdd3d3b

Regards,

Bob Peterson
Red Hat File Systems



Re: [Cluster-devel] [PATCH] gfs2: Clarify gfs2_block_map

2017-09-25 Thread Bob Peterson
- Original Message -
| Add a comment about the logical block size for directories.  Rename
| "bsize" in gfs2_block_map to "factor".  Fix a typo in the description of
| metaptr1.
| 
| Signed-off-by: Andreas Gruenbacher 
| ---
|  fs/gfs2/bmap.c | 14 ++
|  1 file changed, 10 insertions(+), 4 deletions(-)

Hi,

Thanks. This is now pushed to the for-next branch of the linux-gfs2 tree:
https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git/commit/?h=for-next=3eaef9146f687e581ba563b24507ed620bf7f4c8

Regards,

Bob Peterson
Red Hat File Systems



Re: [Cluster-devel] [PATCH] gfs2: Support negative atimes

2017-09-25 Thread Bob Peterson
- Original Message -
| When inodes are read from disk, GFS2 will only update in-memory atimes
| older than the on-disk atimes; this prevents atimes from going
| backwards.  The atimes of newly allocated inodes are initialized to 0.
| This means that when an atime is explicitly set to a negative value,
| this value will not persist.
| 
| Fix by setting the atime of newly allocated inodes to the lowest
| possible value instead of 0.
| 
| Fixes xfstest generic/258.
| 
| Signed-off-by: Andreas Gruenbacher 
| ---
|  fs/gfs2/inode.c | 3 ++-
|  1 file changed, 2 insertions(+), 1 deletion(-)
Hi,

Thanks. This is now pushed to the for-next branch of the linux-gfs2 tree:
https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git/commit/?h=for-next=37f94616c0d01dc2c1d10e3b51559092882fbc4f

Regards,

Bob Peterson
Red Hat File Systems



Re: [Cluster-devel] [PATCH] gfs2: Update ctime in setflags ioctl

2017-09-25 Thread Bob Peterson
- Original Message -
| The FS_IOC_SETFLAGS ioctl is supposed to update the inode ctime.
| Fixes xfstests generic/277.
| 
| Signed-off-by: Andreas Gruenbacher 
| ---
|  fs/gfs2/file.c | 1 +
|  1 file changed, 1 insertion(+)
Hi,

Thanks. This is now pushed to the for-next branch of the linux-gfs2 tree:
https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git/commit/?h=for-next=07338c887d1d4e7889574f194dbeef6d56d094e8

Regards,

Bob Peterson
Red Hat File Systems



[Cluster-devel] [PATCH] dlm/recoverd: recheck kthread_should_stop() before schedule()

2017-09-25 Thread Guoqing Jiang
Call schedule() here could make the thread miss wake
up from kthread_stop(), so it is better to recheck
kthread_should_stop() before call schedule(), a symptom
happened when I run indefinite test (which mostly created
clustered raid1, assemble it in other nodes, then stop
them) of clustered raid.

linux175:~ # ps aux|grep md|grep D
root  4211  0.0  0.0  19760  2220 ?Ds   02:58   0:00 mdadm -Ssq
linux175:~ # cat /proc/4211/stack
[] kthread_stop+0x4d/0x150
[] dlm_recoverd_stop+0x15/0x20 [dlm]
[] dlm_release_lockspace+0x2ab/0x460 [dlm]
[] leave+0xbf/0x150 [md_cluster]
[] md_cluster_stop+0x18/0x30 [md_mod]
[] bitmap_free+0x12e/0x140 [md_mod]
[] bitmap_destroy+0x7f/0x90 [md_mod]
[] __md_stop+0x21/0xa0 [md_mod]
[] do_md_stop+0x15f/0x5c0 [md_mod]
[] md_ioctl+0xa65/0x18a0 [md_mod]
[] blkdev_ioctl+0x49e/0x8d0
[] block_ioctl+0x41/0x50
[] do_vfs_ioctl+0x96/0x5b0
[] SyS_ioctl+0x79/0x90
[] entry_SYSCALL_64_fastpath+0x1e/0xad

This maybe not resolve the issue completely since the
KTHREAD_SHOULD_STOP flag could be set between "break"
and "schedule", but at least the chance for the symptom
happen could be reduce a lot (The indefinite test runs
more than 20 hours without problem and it happens easily
without the change).

Signed-off-by: Guoqing Jiang 
---
 fs/dlm/recoverd.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fs/dlm/recoverd.c b/fs/dlm/recoverd.c
index 6859b4b..9fab490 100644
--- a/fs/dlm/recoverd.c
+++ b/fs/dlm/recoverd.c
@@ -290,8 +290,11 @@ static int dlm_recoverd(void *arg)
while (!kthread_should_stop()) {
set_current_state(TASK_INTERRUPTIBLE);
if (!test_bit(LSFL_RECOVER_WORK, >ls_flags) &&
-   !test_bit(LSFL_RECOVER_DOWN, >ls_flags))
+   !test_bit(LSFL_RECOVER_DOWN, >ls_flags)) {
+   if (kthread_should_stop())
+   break;
schedule();
+   }
set_current_state(TASK_RUNNING);
 
if (test_and_clear_bit(LSFL_RECOVER_DOWN, >ls_flags)) {
-- 
2.6.6