Re: [Cluster-devel] [GFS2 PATCH] gfs2: Don't write log headers after file system withdraw

2019-11-21 Thread Andreas Gruenbacher
Hi Bob, On Wed, Nov 20, 2019 at 2:53 PM Bob Peterson wrote: > Before this patch, when a node withdrew a gfs2 file system, it > wrote a (clean) unmount log header. That's wrong. You don't want > to write anything to the journal once you're withdrawn because > that's acknowledging that the transact

[Cluster-devel] [PATCH] gfs2: Further gfs2_create_inode cleanups

2019-11-19 Thread Andreas Gruenbacher
Remove a duplicate call to gfs2_set_inode_blocks. Rename the error labels to a consistent scheme to make the function slightly easier to review. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/inode.c | 48 +++- 1 file changed, 23 insertions(+), 25

Re: [Cluster-devel] [GFS2 PATCH v3] gfs2: clean up iopen glock mess in gfs2_create_inode

2019-11-19 Thread Andreas Gruenbacher
Bob, On Tue, Nov 19, 2019 at 5:41 PM Bob Peterson wrote: > Before this patch, gfs2_create_inode had a use-after-free for the > iopen glock in some error paths because it did this: > > gfs2_glock_put(io_gl); > fail_gunlock2: > if (io_gl) > clear_bit(GLF_INODE_CREATI

Re: [Cluster-devel] [GFS2 PATCH v2] gfs2: Introduce function gfs2_withdrawn

2019-11-18 Thread Andreas Gruenbacher
On Fri, Nov 15, 2019 at 3:39 PM Bob Peterson wrote: > This version incorporates Andreas's suggestion. Okay, pushed. Thanks, Andreas

Re: [Cluster-devel] [GFS2 PATCH v2] gfs2: Abort gfs2_freeze if io error is seen

2019-11-18 Thread Andreas Gruenbacher
On Fri, Nov 15, 2019 at 3:42 PM Bob Peterson wrote: > Revised to implement Andreas's suggestions. Okay, pushed. Thanks, Andreas

Re: [Cluster-devel] [GFS2 PATCH] gfs2: Close timing window with GLF_INVALIDATE_IN_PROGRESS

2019-11-18 Thread Andreas Gruenbacher
Ok, pushed. Thanks, Andreas

Re: [Cluster-devel] [GFS2 PATCH v2] gfs2: if finish_open returns error, clean up iopen glock mess

2019-11-15 Thread Andreas Gruenbacher
Bob, On Fri, Nov 15, 2019 at 5:03 PM Bob Peterson wrote: > Just noticed (and fixed) the redundant clear_bit. Sorry. > --- > Before this patch, if anything went wrong in function gfs2_create_inode > it would goto fail_gunlock3 and clean up the iopen glock it had just > created and locked. However,

Re: [Cluster-devel] [GFS2 PATCH] gfs2: Close timing window with GLF_INVALIDATE_IN_PROGRESS

2019-11-15 Thread Andreas Gruenbacher
On Fri, Nov 15, 2019 at 4:45 PM Bob Peterson wrote: > > Hi, > > This patch closes a timing window in which two processes compete > and overlap in the execution of do_xmote for the same glock: > > Process A Process B >---

Re: [Cluster-devel] [GFS2 PATCH] gfs2: Abort gfs2_freeze if io error is seen

2019-11-14 Thread Andreas Gruenbacher
On Thu, Nov 14, 2019 at 6:13 PM Bob Peterson wrote: > Before this patch, an io error, such as -EIO writing to the journal > would cause function gfs2_freeze to go into an infinite loop, > continuously retrying the freeze operation. But nothing ever clears > the -EIO except unmount after withdraw,

Re: [Cluster-devel] [GFS2 PATCH] gfs2: Introduce function gfs2_withdrawn

2019-11-14 Thread Andreas Gruenbacher
On Thu, Nov 14, 2019 at 7:53 PM Bob Peterson wrote: > Well, I can certainly do that, but this patch is a predecessor to > another that checks two bits instead of one. I could or them, of course. Yes, what's wrong with return A || B? Thanks, Andreas

Re: [Cluster-devel] [GFS2 PATCH] gfs2: initialize tr_ail1_list when creating transactions

2019-11-14 Thread Andreas Gruenbacher
On Thu, Nov 14, 2019 at 6:10 PM Bob Peterson wrote: > In function gfs2_trans_begin, new transactions were created but their > ail1 list, tr_ail1_list was never initialized. Therefore it relied > upon other circumstances when the list became empty. > This patch adds proper initialization of the lis

Re: [Cluster-devel] [GFS2 PATCH] gfs2: Introduce function gfs2_withdrawn

2019-11-14 Thread Andreas Gruenbacher
On Thu, Nov 14, 2019 at 3:52 PM Bob Peterson wrote: > This patch adds function gfs2_withdrawn and replaces all checks > for the SDF_WITHDRAWN bit to call it. This does not change the > logic or function of gfs2, and it facilitates later improvements > to the withdraw sequence. This looks mostly o

[Cluster-devel] [PATCH] gfs2: Remove active journal side effect from gfs2_write_log_header

2019-11-08 Thread Andreas Gruenbacher
is is related to commit 7c70b896951c ("gfs2: clean_journal improperly set sd_log_flush_head"). Signed-off-by: Andreas Gruenbacher --- fs/gfs2/log.c | 3 ++- fs/gfs2/lops.c | 29 +++-- fs/gfs2/lops.h | 3 ++- fs/gfs2/recovery.c | 2 -- 4 files cha

[Cluster-devel] [PATCH 2/2] gfs2: Fix end-of-file handling in gfs2_page_mkwrite

2019-11-08 Thread Andreas Gruenbacher
gfs2_page_mkwrite to avoid weird side effects like unstuffing when we're not. Fixes xfstest generic/263. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/file.c | 40 ++-- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/fs/gfs2/file

[Cluster-devel] [PATCH 1/2] gfs2: Multi-block allocations in gfs2_page_mkwrite

2019-11-08 Thread Andreas Gruenbacher
In gfs2_page_mkwrite's gfs2_allocate_page_backing helper, try to allocate as many blocks at once as we need. Pass in the size of the requested allocation. Fixes: 35af80aef99b ("gfs2: don't use buffer_heads in gfs2_allocate_page_backing") Cc: sta...@vger.kernel.org # v5.3+ Si

[Cluster-devel] [PATCH] gfs2: Improve mmap write vs. punch_hole consistency

2019-11-08 Thread Andreas Gruenbacher
apped, page_mkwrite won't be called.) Fixes xfstest generic/567. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/bmap.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index f63df54a08c6..bb0113a0b0f4 100644 --- a/fs/gfs2/bmap.c +++

[Cluster-devel] [GIT PULL] gfs2: Fix remounting (broken in -rc1)

2019-10-30 Thread Andreas Gruenbacher
Hi Linus, could you please pull the following fix for gfs2? Thanks, Andreas The following changes since commit d6d5df1db6e9d7f8f76d2911707f7d5877251b02: Linux 5.4-rc5 (2019-10-27 13:19:19 -0400) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/lin

Re: [Cluster-devel] [PATCH] gfs2: Fix initialisation of args for remount

2019-10-29 Thread Andreas Gruenbacher
On Tue, Oct 29, 2019 at 9:10 PM Andrew Price wrote: > When gfs2 was converted to use fs_context, the initialisation of the > mount args structure to the currently active args was lost with the > removal of gfs2_remount_fs(), so the checks of the new args on remount > became checks against the defa

[Cluster-devel] [GIT PULL] gfs2: Fix a memory leak introduced in -rc1

2019-10-24 Thread Andreas Gruenbacher
Hi Linus, please consider pulling the following fix for gfs2. Thanks, Andreas The following changes since commit 7d194c2100ad2a6dded545887d02754948ca5241: Linux 5.4-rc4 (2019-10-20 15:56:22 -0400) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/l

Re: [Cluster-devel] [PATCH] gfs2: make gfs2_fs_parameters static

2019-10-17 Thread Andreas Gruenbacher
; fs/gfs2/ops_fstype.c:1331:39: warning: symbol 'gfs2_fs_parameters' was not > > declared. Should it be static? > > > > Signed-off-by: Ben Dooks > > --- > > Cc: Bob Peterson > > Cc: Andreas Gruenbacher > > Cc: cluster-devel@redhat.com > > C

Re: [Cluster-devel] [PATCH 15/15] gfs2: use iomap for buffered I/O in ordered and writeback mode

2019-09-30 Thread Andreas Gruenbacher
Hi Christoph, On Tue, Aug 6, 2019 at 7:30 AM Christoph Hellwig wrote: > On Mon, Aug 05, 2019 at 02:27:21PM +0200, Andreas Gruenbacher wrote: > > Christoph, > > > > thanks again for this patch and the rest of the patch queue. There's > > one minor bug her

Re: [Cluster-devel] [GIT PULL] gfs2 changes

2019-09-22 Thread Andreas Gruenbacher
On Sat, Sep 21, 2019 at 11:53 PM Linus Torvalds wrote: > On Sat, Sep 21, 2019 at 9:51 AM Andreas Gruenbacher > wrote: > > > > please consider pulling the following changes for gfs2. > > Merged. Thanks. > But I notice that you're not getting any pr-tracker repl

[Cluster-devel] [GIT PULL] gfs2 changes

2019-09-21 Thread Andreas Gruenbacher
use iomap_zero_range to replace gfs2 specific code. - Various other minor fixes and cleanups. Andreas Gruenbacher (9): gfs2: gfs2_walk_metadata fix gfs2: gfs2_iomap_begin cleanup gfs2: Add support for IOMAP_ZERO

Re: [Cluster-devel] [GFS2 PATCH] gfs2: clear buf_in_tr when ending a transaction in sweep_bh_for_rgrps

2019-09-17 Thread Andreas Gruenbacher
On Thu, Sep 12, 2019 at 7:59 PM Bob Peterson wrote: > Hi, > > In function sweep_bh_for_rgrps, which is a helper for punch_hole, > it uses variable buf_in_tr to keep track of when it needs to commit > pending block frees on a partial delete that overflows the > transaction created for the delete. T

Re: [Cluster-devel] [Q] gfs2: mmap write vs. punch_hole consistency

2019-09-06 Thread Andreas Gruenbacher
On Fri, Sep 6, 2019 at 11:28 PM Dave Chinner wrote: > On Fri, Sep 06, 2019 at 10:52:41PM +0200, Andreas Gruenbacher wrote: > > Hi, > > > > I've just fixed a mmap write vs. truncate consistency issue on gfs on > > filesystems with a block size smaller that the pag

[Cluster-devel] [Q] gfs2: mmap write vs. punch_hole consistency

2019-09-06 Thread Andreas Gruenbacher
write vs. punch_hole consistency Fixes xfstest generic/567. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/bmap.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 9ef543dd38e2..e677e813be4c 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -24

[Cluster-devel] [PATCH] gfs2: Improve mmap write vs. truncate consistency

2019-09-06 Thread Andreas Gruenbacher
the end of the file will result in SIGBUS instead of growing the file.) Fixes xfstests generic/029, generic/030 on filesystems with a block size smaller than PAGE_SIZE. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/bmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs

Re: [Cluster-devel] [PATCH] gfs2: Minor PAGE_SIZE arithmetic cleanups

2019-09-04 Thread Andreas Gruenbacher
On Tue, Sep 3, 2019 at 9:49 AM Andreas Gruenbacher wrote: > diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c > index 69c4b77f127b..f95606f2157a 100644 > --- a/fs/gfs2/quota.c > +++ b/fs/gfs2/quota.c > @@ -774,7 +774,7 @@ static int gfs2_write_disk_quota(struct gfs2_inode *ip, >

[Cluster-devel] [PATCH] gfs2: Minor PAGE_SIZE arithmetic cleanups

2019-09-03 Thread Andreas Gruenbacher
Replace divisions by PAGE_SIZE with shifts by PAGE_SHIFT and similar. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/aops.c | 4 ++-- fs/gfs2/file.c | 2 +- fs/gfs2/quota.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index

Re: [Cluster-devel] [GFS2 PATCH v6 14/26] gfs2: Ignore dlm recovery requests if gfs2 is withdrawn

2019-08-27 Thread Andreas Gruenbacher
Bob, On Thu, May 23, 2019 at 3:05 PM Bob Peterson wrote: > When a node fails, user space informs dlm of the node failure, > and dlm instructs gfs2 on the surviving nodes to perform journal > recovery. It does this by calling various callback functions in > lock_dlm.c. To mark its progress, it kee

[Cluster-devel] [PATCH] gfs2: Get rid of gfs2_io_error_bh_wd

2019-08-26 Thread Andreas Gruenbacher
ip the withdraw. This reverts the rest of commit 9e1a9ecd13b9. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/log.c | 4 ++-- fs/gfs2/lops.c| 2 +- fs/gfs2/meta_io.c | 4 ++-- fs/gfs2/util.c| 8 +++- fs/gfs2/util.h| 8 ++-- 5 files changed, 10 insertions(+), 16 deletions(-)

[Cluster-devel] [PATCH] gfs2: Fix recovery slot bumping

2019-08-26 Thread Andreas Gruenbacher
Get rid of the assumption that the number of slots can at most increase by RECOVER_SIZE_INC (16) in set_recover_size. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/lock_dlm.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c

Re: [Cluster-devel] [GFS2 PATCH v6 11/26] gfs2: log error reform

2019-08-20 Thread Andreas Gruenbacher
Bob, On Thu, May 23, 2019 at 3:05 PM Bob Peterson wrote: > Before this patch, gfs2 kept track of journal io errors in two > places sd_log_error and the SDF_AIL1_IO_ERROR flag in sd_flags. > This patch consolidates the two into sd_log_error so that it > reflects the first error encountered writing

Re: [PATCH v5 03/18] gfs2: add compat_ioctl support

2019-08-19 Thread Andreas Gruenbacher
On Mon, Aug 19, 2019 at 11:09 AM Arnd Bergmann wrote: > On Sun, Aug 18, 2019 at 10:17 PM Andreas Grünbacher > wrote: > > Am So., 18. Aug. 2019 um 21:32 Uhr schrieb Arnd Bergmann : > > > On Fri, Aug 16, 2019 at 7:32 PM Andreas Gruenbacher > > > wrote: > >

Re: [Cluster-devel] [PATCH v5 03/18] gfs2: add compat_ioctl support

2019-08-16 Thread Andreas Gruenbacher
Arnd, On Wed, Aug 14, 2019 at 10:45 PM Arnd Bergmann wrote: > > Out of the four ioctl commands supported on gfs2, only FITRIM > works in compat mode. > > Add a proper handler based on the ext4 implementation. > > Fixes: 6ddc5c3ddf25 ("gfs2: getlabel support") > Signed-off-by: Arnd Bergmann > ---

Re: [Cluster-devel] [GFS2 PATCH] gfs2: untangle the logic in gfs2_drevalidate

2019-08-13 Thread Andreas Gruenbacher
On Tue, 6 Aug 2019 at 20:01, Bob Peterson wrote: > > Hi, > > Before this patch, function gfs2_drevalidate was a horrific tangle of > unreadable labels, cases and goto statements. This patch tries to > simplify the logic and make it more readable. > > Signed-off-by: Bob Peterson > --- > fs/gfs2/d

Re: [Cluster-devel] GFS2 deadlock in 4.19 (iomap/writeback?)

2019-08-13 Thread Andreas Gruenbacher
Hi Edwin and all, On Wed, 6 Mar 2019 at 12:08, Edwin Török wrote: > > Hello, > > I've been trying to debug a GFS2 deadlock that we see in our lab quite > frequently with a 4.19 kernel. With 4.4 and older kernels we were not able to > reproduce this. > See below for lockdep dumps and stacktraces

[Cluster-devel] [GIT PULL] Fix incorrect lseek / fiemap results

2019-08-10 Thread Andreas Gruenbacher
Andreas Gruenbacher (1): gfs2: gfs2_walk_metadata fix fs/gfs2/bmap.c | 164 +++-- 1 file changed, 101 insertions(+), 63 deletions(-)

[Cluster-devel] [PATCH] gfs2: Always mark inode dirty in fallocate

2019-08-08 Thread Andreas Gruenbacher
like xfs and ext4 always update the timestamps, so make gfs2 behave the same way. Fixes fstest generic/483. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/file.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index 52fa1ef8400b

[Cluster-devel] [PATCH v2] gfs2: gfs2_walk_metadata fix

2019-08-08 Thread Andreas Gruenbacher
. (This obsoletes the previous version of this patch as well as "gfs2: gfs2_walk_metadata cleanup".) Fixes fstest generic/490. Signed-off-by: Andreas Gruenbacher Reviewed-by: Bob Peterson --- fs/gfs2/bmap.c | 164 ++--- 1 file changed, 101

Re: [Cluster-devel] [PATCH 15/15] gfs2: use iomap for buffered I/O in ordered and writeback mode

2019-08-05 Thread Andreas Gruenbacher
Christoph, thanks again for this patch and the rest of the patch queue. There's one minor bug here (see below). With that and the gfs2_walk_metadata fix I've just posted to cluster-devel, this is now all working nicely. On Mon, 1 Jul 2019 at 23:56, Christoph Hellwig wrote: > Switch to using the

[Cluster-devel] [PATCH] gfs2: gfs2_walk_metadata fix

2019-08-05 Thread Andreas Gruenbacher
In gfs2_walk_metadata, always reset mp->mp_list when decreasing the current height. Otherwise, gfs2_walk_metadata can end up skipping metadata. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/bmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/gfs2/bmap.c b/fs/g

[Cluster-devel] [PATCH] gfs2: gfs2_walk_metadata cleanup

2019-08-05 Thread Andreas Gruenbacher
Simplify the code a bit and add an additional assertion. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/bmap.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 9fe1793ebf6f..5bfc20e9052d 100644 --- a/fs/gfs2/bmap.c +++ b

[Cluster-devel] [GIT PULL] Fix gfs2 cluster coherency bug

2019-08-01 Thread Andreas Gruenbacher
Andreas Gruenbacher (1): gfs2: Inode dirtying fix fs/gfs2/bmap.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-)

[Cluster-devel] [PATCH] gfs2: Inode dirtying fix

2019-08-01 Thread Andreas Gruenbacher
adata to change here, but let's err on the safe side. Fixes: d0a22a4b03b8 ("gfs2: Fix iomap write page reclaim deadlock"); Signed-off-by: Andreas Gruenbacher --- fs/gfs2/bmap.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/fs/gfs2/bmap.c

Re: [Cluster-devel] [PATCH] fs: gfs2: Fix a null-pointer dereference in gfs2_alloc_inode()

2019-07-24 Thread Andreas Gruenbacher
On Wed, 24 Jul 2019 at 12:55, Steven Whitehouse wrote: > On 24/07/2019 11:27, Christoph Hellwig wrote: > > On Wed, Jul 24, 2019 at 11:22:46AM +0100, Steven Whitehouse wrote: > >> and it would have the same effect, so far as I can tell. I don't mind > >> changing it, if that is perhaps a clearer wa

[GIT PULL] gfs2: 5.3 merge

2019-07-10 Thread Andreas Gruenbacher
from Kefeng Wang (Huawei). - Another minor fix and cleanup by me. Andreas Gruenbacher (2): gfs2: Clean up freeing struct gfs2_sbd gfs2: Remove unused gfs2_iomap_alloc argument Bob Peterson (8): gfs2: kthrea

[Cluster-devel] [GFS2 PATCH 03/18] gfs2: kthread and remount improvements

2019-07-09 Thread Andreas Gruenbacher
nt at the bottom of the function. This removes that bypass in favor of just running the whole function, then returning the error. That way, unmounts and remounts won't hang forever. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher --- fs/gfs2/super.c | 21 ++-

[Cluster-devel] [GFS2 PATCH 05/18] gfs2: log which portion of the journal is replayed

2019-07-09 Thread Andreas Gruenbacher
journalX. The resulting output looks something like this: jid=1: Replaying journal...0x28b7 to 0x2beb This will allow us to better debug file system corruption problems. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher --- fs/gfs2/recovery.c | 3 ++- 1 file changed, 2 insertions

[Cluster-devel] [GFS2 PATCH 13/18] gfs2: merge gfs2_writeback_aops and gfs2_ordered_aops

2019-07-09 Thread Andreas Gruenbacher
one. Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher --- fs/gfs2/aops.c | 28 +++- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index d82b919ce70f..210e4a8d4e7b 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2

[Cluster-devel] [GFS2 PATCH 11/18] gfs2: use page_offset in gfs2_page_mkwrite

2019-07-09 Thread Andreas Gruenbacher
From: Christoph Hellwig Without casting page->index to a guaranteed 64-bit type, the value might be treated as 32-bit on 32-bit platforms and thus get truncated. Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher --- fs/gfs2/file.c | 2 +- 1 file changed, 1 insertion(+)

[Cluster-devel] [GFS2 PATCH 10/18] gfs2: replace more printk with calls to fs_info and friends

2019-07-09 Thread Andreas Gruenbacher
From: Bob Peterson This patch replaces a few leftover printk errors with calls to fs_info and similar, so that the file system having the error is properly logged. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher --- fs/gfs2/bmap.c | 5 ++--- fs/gfs2/glops.c | 3 ++- fs/gfs2

[Cluster-devel] [GFS2 PATCH 09/18] gfs2: dump fsid when dumping glock problems

2019-07-09 Thread Andreas Gruenbacher
: Bob Peterson Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 34 +- fs/gfs2/glock.h | 11 +++ fs/gfs2/glops.c | 7 +-- fs/gfs2/incore.h | 3 ++- fs/gfs2/lops.c | 2 +- fs/gfs2/rgrp.c | 21 ++--- fs/gfs2/rgrp.h | 3 ++

[Cluster-devel] [GFS2 PATCH 08/18] gfs2: simplify gfs2_freeze by removing case

2019-07-09 Thread Andreas Gruenbacher
From: Bob Peterson Function gfs2_freeze had a case statement that simply checked the error code, but the break statements just made the logic hard to read. This patch simplifies the logic in favor of a simple if. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher --- fs/gfs2

[Cluster-devel] [GFS2 PATCH 07/18] gfs2: Rename SDF_SHUTDOWN to SDF_WITHDRAWN

2019-07-09 Thread Andreas Gruenbacher
From: Bob Peterson Before this patch, the superblock flag indicating when a file system is withdrawn was called SDF_SHUTDOWN. This patch simply renames it to the more obvious SDF_WITHDRAWN. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher --- fs/gfs2/aops.c | 4 ++-- fs

[Cluster-devel] [GFS2 PATCH 04/18] gfs2: eliminate tr_num_revoke_rm

2019-07-09 Thread Andreas Gruenbacher
: Bob Peterson Signed-off-by: Andreas Gruenbacher --- fs/gfs2/incore.h | 1 - fs/gfs2/log.c| 3 +-- fs/gfs2/trans.c | 6 +++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index c9af93ac6c73..6b7cfc278ce2 100644 --- a/fs/gfs2/incore.h

[Cluster-devel] [GFS2 PATCH 17/18] gfs2: don't use buffer_heads in gfs2_allocate_page_backing

2019-07-09 Thread Andreas Gruenbacher
From: Christoph Hellwig Rewrite gfs2_allocate_page_backing to call gfs2_iomap_get_alloc and operate on struct iomap directly. Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher --- fs/gfs2/file.c | 33 - 1 file changed, 16 insertions(+), 17

[Cluster-devel] [GFS2 PATCH 18/18] gfs2: Remove unused gfs2_iomap_alloc argument

2019-07-09 Thread Andreas Gruenbacher
Remove the unused flags argument of gfs2_iomap_alloc. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/bmap.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 3b761a0ba6ab..bd0b0cd38dbe 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2

[Cluster-devel] [GFS2 PATCH 01/18] gfs2: Clean up freeing struct gfs2_sbd

2019-07-09 Thread Andreas Gruenbacher
Add a free_sbd function for freeing a struct gfs2_sbd. Use that for freeing a super-block descriptor, either directly or via kobject_put. Free sd_lkstats inside the kobject release function: that way, gfs2_put_super will no longer leak sd_lkstats. Signed-off-by: Andreas Gruenbacher --- fs/gfs2

[Cluster-devel] [GFS2 PATCH 00/18] Pre-pull patch posting (merge window)

2019-07-09 Thread Andreas Gruenbacher
for short writes Thanks, Andreas -- Andreas Gruenbacher (2): gfs2: Clean up freeing struct gfs2_sbd gfs2: Remove unused gfs2_iomap_alloc argument Bob Peterson (8): gfs2: kthread and remount improvements gfs2: eliminate tr_num_revoke_rm gfs2: log which portion of the journal is replayed

[Cluster-devel] [GFS2 PATCH 16/18] gfs2: use iomap_bmap instead of generic_block_bmap

2019-07-09 Thread Andreas Gruenbacher
From: Christoph Hellwig No need to indirect through get_blocks and buffer_heads when we can just use the iomap version. Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher --- fs/gfs2/aops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/gfs2/aops.c b

[Cluster-devel] [GFS2 PATCH 15/18] gfs2: mark stuffed_readpage static

2019-07-09 Thread Andreas Gruenbacher
From: Christoph Hellwig Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher --- fs/gfs2/aops.c | 3 +-- fs/gfs2/aops.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index 4edf917752af..8f90d98a0aee 100644 --- a/fs/gfs2

[Cluster-devel] [GFS2 PATCH 02/18] gfs2: Use IS_ERR_OR_NULL

2019-07-09 Thread Andreas Gruenbacher
From: Kefeng Wang Use IS_ERR_OR_NULL where appropriate. (Several more places converted by Andreas.) Signed-off-by: Kefeng Wang Signed-off-by: Andreas Gruenbacher --- fs/gfs2/dir.c| 4 ++-- fs/gfs2/glock.c | 2 +- fs/gfs2/inode.c | 2 +- fs/gfs2/ops_fstype.c | 2 +- 4 files

[Cluster-devel] [GFS2 PATCH 06/18] gfs2: Warn when a journal replay overwrites a rgrp with buffers

2019-07-09 Thread Andreas Gruenbacher
it apparent that a corruption path still exists in gfs2. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher --- fs/gfs2/lops.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index 1921cda034fd..8c3678f42746 1

[Cluster-devel] [GFS2 PATCH 14/18] gfs2: merge gfs2_writepage_common into gfs2_writepage

2019-07-09 Thread Andreas Gruenbacher
From: Christoph Hellwig There is no need to keep these two functions separate. Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher --- fs/gfs2/aops.c | 32 ++-- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/fs/gfs2/aops.c b/fs/gfs2

[Cluster-devel] [GFS2 PATCH 12/18] gfs2: remove the unused gfs2_stuffed_write_end function

2019-07-09 Thread Andreas Gruenbacher
From: Christoph Hellwig This function was overlooked when the write_begin and write_end address space operations were removed as part of gfs2's iomap conversion. Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher --- fs/gfs2/aops.c

Re: [Cluster-devel] [PATCH 2/2] gfs2: Add support for IOMAP_ZERO

2019-07-08 Thread Andreas Gruenbacher
On Mon, 8 Jul 2019 at 19:06, Christoph Hellwig wrote: > Don't we actually need the write lock for zeroing as well? Hmm. For iomap_zero_range, we don't need the iov_iter_fault_in_readable / iov_iter_copy_from_user_atomic logic from iomap_write_actor, so we take the write lock outside of iomap_zero

Re: [Cluster-devel] RFC: use the iomap writepage path in gfs2

2019-07-08 Thread Andreas Gruenbacher
On Mon, 8 Jul 2019 at 18:04, Christoph Hellwig wrote: > On Thu, Jul 04, 2019 at 12:35:41AM +0200, Andreas Gruenbacher wrote: > > Patch "gfs2: implement gfs2_block_zero_range using iomap_zero_range" > > isn't quite ready: the gfs2 iomap operations don't handle I

[Cluster-devel] [PATCH 2/2] gfs2: Add support for IOMAP_ZERO

2019-07-05 Thread Andreas Gruenbacher
Add support for the IOMAP_ZERO flag, which indicates a request to write zeroes into a file without filling holes. Used by iomap_zero_range. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/bmap.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/fs/gfs2/bmap.c

[Cluster-devel] Make "gfs2: implement gfs2_block_zero_range using iomap_zero_range" work properly

2019-07-05 Thread Andreas Gruenbacher
d and writeback mode" on top of that. Thanks, Andreas Andreas Gruenbacher (2): gfs2: gfs2_iomap_begin cleanup gfs2: Add support for IOMAP_ZERO fs/gfs2/bmap.c | 64 -- 1 file changed, 36 insertions(+), 28 deletions(-) -- 2.20.1

[Cluster-devel] [PATCH 1/2] gfs2: gfs2_iomap_begin cleanup

2019-07-05 Thread Andreas Gruenbacher
Turn function gfs2_iomap_begin_write into something all iomap functions will go through (and rename it to __gfs2_iomap_begin). This will simplify adding support for IOMAP_ZERO. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/bmap.c | 53 +- 1 file

Re: [Cluster-devel] RFC: use the iomap writepage path in gfs2

2019-07-03 Thread Andreas Gruenbacher
Hi Christoph, On Mon, 1 Jul 2019 at 23:54, Christoph Hellwig wrote: > Hi all, > > in this straight from the jetplane edition I present the series to > convert gfs2 to full iomap usage for the ordered and writeback mode, > that is we use iomap_page everywhere and entirely get rid of > buffer_heads

[Cluster-devel] [PATCH v2 1/3] iomap: don't mark the inode dirty in iomap_write_end

2019-06-26 Thread Andreas Gruenbacher
inode size, and open code the rest of __generic_write_end. Partially based on code from Christoph Hellwig. Signed-off-by: Andreas Gruenbacher Reviewed-by: Christoph Hellwig --- fs/gfs2/bmap.c| 2 ++ fs/iomap.c| 15 ++- include/linux/iomap.h | 1 + 3 files change

[Cluster-devel] [PATCH v2 3/3] iomap: fix page_done callback for short writes

2019-06-26 Thread Andreas Gruenbacher
When we truncate a short write to have it retried, pass the truncated length to the page_done callback instead of the full length. Signed-off-by: Andreas Gruenbacher --- fs/iomap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/iomap.c b/fs/iomap.c index 97569064faaa

[Cluster-devel] [PATCH v2 2/3] fs: fold __generic_write_end back into generic_write_end

2019-06-26 Thread Andreas Gruenbacher
From: Christoph Hellwig This effectively reverts a6d639da63ae ("fs: factor out a __generic_write_end helper") as we now open code what is left of that helper in iomap. Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher --- fs/buffe

Re: [Cluster-devel] [PATCH 1/2] iomap: don't mark the inode dirty in iomap_write_end

2019-06-26 Thread Andreas Gruenbacher
On Wed, 26 Jun 2019 at 14:55, Christoph Hellwig wrote: > Doesn't the series also need a third patch reducing the amount > of mark_inode_dirty calls as per your initial proposal? The page dirtying already reduces from once per page to once per mapping, so that should be good enough. Thanks, Andre

Re: [Cluster-devel] [PATCH] fs: Move mark_inode_dirty out of __generic_write_end

2019-06-26 Thread Andreas Gruenbacher
On Wed, 26 Jun 2019 at 08:04, Christoph Hellwig wrote: > On Tue, Jun 25, 2019 at 08:13:29PM +0200, Andreas Gruenbacher wrote: > > On Tue, 25 Jun 2019 at 12:50, Christoph Hellwig wrote: > > > > > > > That seems way more complicated. I'd much rather go with so

[Cluster-devel] [PATCH 1/2] iomap: don't mark the inode dirty in iomap_write_end

2019-06-26 Thread Andreas Gruenbacher
inode size, and open code the rest of __generic_write_end. Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher --- fs/gfs2/bmap.c| 2 ++ fs/iomap.c| 15 ++- include/linux/iomap.h | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git

[Cluster-devel] [PATCH 2/2] fs: fold __generic_write_end back into generic_write_end

2019-06-26 Thread Andreas Gruenbacher
From: Christoph Hellwig This effectively reverts a6d639da63ae ("fs: factor out a __generic_write_end helper") as we now open code what is left of that helper in iomap. Signed-off-by: Christoph Hellwig --- fs/buffer.c | 62 --- fs/internal.h |

Re: [Cluster-devel] [PATCH] fs: Move mark_inode_dirty out of __generic_write_end

2019-06-25 Thread Andreas Gruenbacher
age copied into the page cache can be very ineffcient for file systems that use the VFS dirty inode tracking, and is completely pointless for those that don't use the VFS dirty tracking. Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher --- fs/gfs2/bmap.c| 2 +

Re: [Cluster-devel] [PATCH] fs: Move mark_inode_dirty out of __generic_write_end

2019-06-25 Thread Andreas Gruenbacher
On Tue, 25 Jun 2019 at 11:57, Christoph Hellwig wrote: > On Mon, Jun 24, 2019 at 08:22:43PM +0200, Andreas Gruenbacher wrote: > > That would work, but I don't like how this leaves us with a vfs function > > that updates i_size without bothering to dirty the inode very much.

Re: [Cluster-devel] [RFC][PATCH] wake_up_var() memory ordering

2019-06-25 Thread Andreas Gruenbacher
On Tue, 25 Jun 2019 at 12:36, Peter Zijlstra wrote: > On Tue, Jun 25, 2019 at 11:19:35AM +0200, Andreas Gruenbacher wrote: > > > diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c > > > index cf4c767005b1..29ea5da7 100644 > > > --- a/fs/gfs2/glops.c > > >

Re: [Cluster-devel] [RFC][PATCH] wake_up_var() memory ordering

2019-06-25 Thread Andreas Gruenbacher
Peter, thanks for the fixes. On Mon, 24 Jun 2019 at 18:53, Peter Zijlstra wrote: > Hi all, > > I tried using wake_up_var() today and accidentally noticed that it > didn't imply an smp_mb() and specifically requires it through > wake_up_bit() / waitqueue_active(). > > Now, wake_up_bit() doesn't i

Re: [Cluster-devel] [PATCH] fs: Move mark_inode_dirty out of __generic_write_end

2019-06-24 Thread Andreas Gruenbacher
On Mon, 24 Jun 2019 at 08:55, Christoph Hellwig wrote: > At least for xfs we don't need the mark_inode_dirty at all. Can you > solve your gfs2 requirements on top of something like the patch below? > Note that in general it seems like you should try to only update the > on-disk inode size in writ

[Cluster-devel] [PATCH] fs: Move mark_inode_dirty out of __generic_write_end

2019-06-18 Thread Andreas Gruenbacher
-by: Andreas Gruenbacher --- fs/buffer.c | 26 ++ fs/iomap.c | 42 ++ 2 files changed, 56 insertions(+), 12 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index e450c55f6434..1b51003bc9d2 100644 --- a/fs/buffer.c +++ b/fs

[Cluster-devel] [GIT PULL] gfs2: Fix rounding error in gfs2_iomap_page_prepare

2019-06-14 Thread Andreas Gruenbacher
9:07 +0200) Fix rounding error in gfs2_iomap_page_prepare -------- Andreas Gruenbacher (1): gfs2: Fix rounding error in gfs2_iomap_page_prepare fs/gfs2/bmap.c | 5 - 1 file changed, 4

[Cluster-devel] [PATCH] gfs2: Fix rounding error in gfs2_iomap_page_prepare

2019-06-14 Thread Andreas Gruenbacher
The pos and len arguments to the iomap page_prepare callback are not block aligned, so we need to take that into account when computing the number of blocks. Fixes: d0a22a4b03b8 ("gfs2: Fix iomap write page reclaim deadlock") Signed-off-by: Andreas Gruenbacher --- fs/gfs2/bmap.c |

Re: [PATCH] fs: gfs2: Use IS_ERR_OR_NULL

2019-06-11 Thread Andreas Gruenbacher
Kefeng, On Wed, 5 Jun 2019 at 16:17, Kefeng Wang wrote: > Use IS_ERR_OR_NULL where appropriate. It seems there are several more instances in which IS_ERR_OR_NULL should be used (see below). Thanks, Andreas --- fs/gfs2/dir.c| 2 +- fs/gfs2/glock.c | 2 +- fs/gfs2/inode.c | 2

Re: [Cluster-devel] [GFS2 PATCH 11/12] gfs2: Fix iomap write page reclaim deadlock

2019-06-08 Thread Andreas Gruenbacher
Hi Ross, On Fri, 7 Jun 2019 at 18:21, Ross Lagerwall wrote: > On 5/7/19 9:32 PM, Andreas Gruenbacher wrote: > > Since commit 64bc06bb32ee ("gfs2: iomap buffered write support"), gfs2 is > > doing > > buffered writes by starting a transaction in iomap_begin, wr

[GET PULL] Revert "gfs2: Replace gl_revokes with a GLF flag"

2019-06-06 Thread Andreas Gruenbacher
Hi Linus, could you please pull the following revert? The patch turned out to be broken. Thank you very much, Andreas The following changes since commit f2c7c76c5d0a443053e94adb9f0918fa2fb85c3a: Linux 5.2-rc3 (2019-06-02 13:55:33 -0700) are available in the Git repository at: git://git.ke

Re: [Cluster-devel] [GFS2 PATCH v6 08/26] gfs2: replace more printk with calls to fs_info and friends

2019-05-29 Thread Andreas Gruenbacher
On Thu, 23 May 2019 at 15:05, Bob Peterson wrote: > > This patch replaces a few leftover printk errors with calls to > fs_info and similar, so that the file system having the error is > properly logged. > > Signed-off-by: Bob Peterson > --- > fs/gfs2/bmap.c | 2 +- > fs/gfs2/glops.c | 3 ++- >

Re: [Cluster-devel] GFS2 filesystem corruption when mkfs block size (4k) does not match blockdevice blocksize (512 bytes)

2019-05-23 Thread Andreas Gruenbacher
Hi Edwin, On Wed, 27 Mar 2019 at 01:13, Andreas Gruenbacher wrote: > Hi Edwin, > > On Mon, 25 Mar 2019 at 20:07, Edwin Török wrote: > > On 20/03/2019 15:54, Edwin Török wrote: > > > Hello, > > > > > > The patch below to xfstests reliably reproduces

[GIT PULL] gfs2: Fix sign extension bug in gfs2_update_stats

2019-05-22 Thread Andreas Gruenbacher
. Andreas Gruenbacher (1): gfs2: Fix sign extension bug in gfs2_update_stats fs/gfs2/lock_dlm.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-)

[Cluster-devel] [PATCH 1/2] gfs2: Clean up freeing struct gfs2_sbd

2019-05-17 Thread Andreas Gruenbacher
Add a free_sbd function for freeing a struct gfs2_sbd. Use that for freeing a super-block descriptor, either directly or via kobject_put. Free sd_lkstats inside the kobject release function: that way, gfs2_put_super will no longer leak sd_lkstats. Signed-off-by: Andreas Gruenbacher --- fs/gfs2

[Cluster-devel] [PATCH 2/2] gfs2: Fix sign extension error in gfs2_update_stats

2019-05-17 Thread Andreas Gruenbacher
, which results in an incorrect variance estimate. Fixes: 4d207133e9c3 ("gfs2: Make statistics unsigned, suitable for use with do_div()") Signed-off-by: Andreas Gruenbacher --- fs/gfs2/lock_dlm.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/gfs2/lock_

Re: [Cluster-devel] [PATCH] gfs2: Fix error path kobject memory leak

2019-05-13 Thread Andreas Gruenbacher
On Tue, 14 May 2019 at 00:47, Linus Torvalds wrote: > On Mon, May 13, 2019 at 3:37 PM Andreas Gruenbacher > wrote: > > > > Sorry, I should have been more explicit. Would you mind taking this > > patch, please? If it's more convenient or more appropriate, I'

Re: [PATCH] gfs2: Fix error path kobject memory leak

2019-05-13 Thread Andreas Gruenbacher
On Tue, 14 May 2019 at 00:27, Linus Torvalds wrote: > Andreas, > did you intend for me to take this as a patch from the email, or will > I get a pull request with this later? Sorry, I should have been more explicit. Would you mind taking this patch, please? If it's more convenient or more approp

[Cluster-devel] [PATCH] gfs2: Fix error path kobject memory leak

2019-05-13 Thread Andreas Gruenbacher
nction and never free it manually. Remove call to kfree() and always call kobject_put() in the error path. Signed-off-by: Tobin C. Harding Reviewed-by: Greg Kroah-Hartman Signed-off-by: Andreas Gruenbacher --- fs/gfs2/sys.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff

Re: [Cluster-devel] [PATCH] gfs2: Fix error path kobject memory leak

2019-05-13 Thread Andreas Gruenbacher
On Mon, 13 May 2019 at 12:40, Tobin C. Harding wrote: > > On Mon, May 13, 2019 at 09:14:05AM +0200, Greg Kroah-Hartman wrote: > > On Mon, May 13, 2019 at 01:32:13PM +1000, Tobin C. Harding wrote: > > > If a call to kobject_init_and_add() fails we must call kobject_put() > > > otherwise we leak mem

Re: [Cluster-devel] GFS2: Pull Request

2019-05-08 Thread Andreas Gruenbacher
Linus, On Wed, 8 May 2019 at 20:06, Linus Torvalds wrote: > On Wed, May 8, 2019 at 10:55 AM Linus Torvalds > wrote: > > > > See what I'm saying? You would ask me to pull the un-merged state, but > > then say "I noticed a few merge conflicts when I did my test merge, > > and this is what I did" k

<    4   5   6   7   8   9   10   11   12   13   >