[Cluster-devel] [PATCH 13/20] gfs2: Minor gfs2_lookup_by_inum cleanup

2020-06-08 Thread Andreas Gruenbacher
Use a zero no_formal_ino instead of a NULL pointer to indicate that any inode generation number will qualify: a valid inode never has a zero no_formal_ino. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/export.c | 4 +++- fs/gfs2/glock.c | 2 +- fs/gfs2/inode.c | 11 +-- fs/gfs2

[Cluster-devel] [PATCH 15/20] gfs2: Check inode generation number in delete_work_func

2020-06-08 Thread Andreas Gruenbacher
in the inode. The same applies if another node that had the inode open managed to delete the inode before us. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 4 +++- fs/gfs2/incore.h | 5 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c

[Cluster-devel] [PATCH 04/20] gfs2: Only do glock put in gfs2_create_inode for free inodes

2020-06-08 Thread Andreas Gruenbacher
-by: Andreas Gruenbacher --- fs/gfs2/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 5acd3ce30759..e3a27fd284dd 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -780,7 +780,8 @@ static int gfs2_create_inode(struct inode *dir

[Cluster-devel] [PATCH 19/20] gfs2: new slab for transactions

2020-06-08 Thread Andreas Gruenbacher
, but for this initial patch I wanted to minimize the impact. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher --- fs/gfs2/log.c | 9 + fs/gfs2/main.c | 9 + fs/gfs2/trans.c | 19 +++ fs/gfs2/trans.h | 1 + fs/gfs2/util.c | 1 + fs/gfs2/util.h | 1 + 6

[Cluster-devel] [PATCH 17/20] gfs2: Smarter iopen glock waiting

2020-06-08 Thread Andreas Gruenbacher
for pointing out a locking bug in a previous version of this patch. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 34 -- fs/gfs2/super.c | 11 --- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index

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

2020-06-08 Thread Andreas Gruenbacher
-devel/2020-January/msg00064.html Thanks, Andreas Andreas Gruenbacher (9): gfs2: Keep track of deleted inode generations in LVBs gfs2: Turn gl_delete into a delayed work gfs2: Give up the iopen glock on contention gfs2: Try harder to delete inodes locally gfs2: Minor gfs2_lookup_by_inum

[Cluster-devel] [PATCH 02/20] gfs2: Don't ignore inode write errors during inode_go_sync

2020-06-08 Thread Andreas Gruenbacher
will take appropriate action and report the error. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glops.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 9e9c7a4b8c66..4862dae868a2 100644 --- a/fs/gfs2

[Cluster-devel] [PATCH 16/20] gfs2: Wake up when setting GLF_DEMOTE

2020-06-08 Thread Andreas Gruenbacher
Wake up the sdp->sd_async_glock_wait wait queue when setting the GLF_DEMOTE flag. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 711259f68d55..7ad06dd49

[Cluster-devel] [PATCH 14/20] gfs2: Move inode generation number check into gfs2_inode_lookup

2020-06-08 Thread Andreas Gruenbacher
Move the inode generation number check from gfs2_lookup_by_inum into gfs2_inode_lookup: gfs2_inode_lookup may be able to decide that an inode with the given inode generation number cannot exist without having to verify the block type or reading the inode from disk. Signed-off-by: Andreas

[Cluster-devel] [PATCH 05/20] gfs2: print mapping->nrpages in glock dump for address space glocks

2020-06-08 Thread Andreas Gruenbacher
From: Bob Peterson This patch makes the glock dumps in debugfs print the number of pages (nrpages) for address space glocks. This will aid in debugging. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 25 - 1 file changed, 16

[Cluster-devel] [PATCH 10/20] gfs2: Turn gl_delete into a delayed work

2020-06-08 Thread Andreas Gruenbacher
works before reusing iopen glocks. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 47 +-- fs/gfs2/glock.h | 4 fs/gfs2/glops.c | 9 - fs/gfs2/incore.h | 5 +++-- fs/gfs2/inode.c | 2 ++ fs/gfs2/rgrp.c | 2 +- fs/gfs2

[Cluster-devel] [PATCH 09/20] gfs2: Keep track of deleted inode generations in LVBs

2020-06-08 Thread Andreas Gruenbacher
the resource group glock in order to verify the block type. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 19 +++ fs/gfs2/glock.h | 3 +++ fs/gfs2/glops.c | 2 +- fs/gfs2/super.c | 3 +++ include/uapi/linux

[Cluster-devel] [PATCH 20/20] gfs2: fix use-after-free on transaction ail lists

2020-06-08 Thread Andreas Gruenbacher
off-by: Andreas Gruenbacher --- fs/gfs2/log.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index a7415ab91c5f..3e4734431783 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c @@ -1018,8 +1018,10 @@ void gfs2_log_flush(struct gfs2_sbd *

[Cluster-devel] [PATCH 18/20] gfs2: initialize transaction tr_ailX_lists earlier

2020-06-08 Thread Andreas Gruenbacher
the transaction is first created. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glops.c | 2 ++ fs/gfs2/log.c | 2 -- fs/gfs2/trans.c | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 4862dae868a2..224fb3bd503c

[Cluster-devel] [PATCH 01/20] docs: filesystems: convert gfs2-glocks.txt to ReST

2020-06-08 Thread Andreas Gruenbacher
From: Mauro Carvalho Chehab - Add a SPDX header; - Adjust document and section titles; - Some whitespace fixes and new line breaks; - Add table markups; - Use notes markups; - Add it to filesystems/index.rst. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Andreas Gruenbacher

[Cluster-devel] [PATCH 11/20] gfs2: Give up the iopen glock on contention

2020-06-08 Thread Andreas Gruenbacher
. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 51 fs/gfs2/incore.h | 1 + fs/gfs2/super.c | 7 +-- 3 files changed, 57 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 0332086f7ab9..bf7daa35f73f

[Cluster-devel] [PATCH 03/20] gfs2: Allow lock_nolock mount to specify jid=X

2020-06-08 Thread Andreas Gruenbacher
on Signed-off-by: Andreas Gruenbacher --- fs/gfs2/ops_fstype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index e2b69ffcc6a8..094f5fe7c009 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -880,7 +880,7 @@

[Cluster-devel] [PATCH 08/20] gfs2: Allow ASPACE glocks to also have an lvb

2020-06-08 Thread Andreas Gruenbacher
From: Bob Peterson Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index bf70e3b14938..86e9e621f346 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2

[Cluster-devel] [PATCH 06/20] gfs2: introduce new gfs2_glock_assert_withdraw

2020-06-08 Thread Andreas Gruenbacher
Peterson Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 7 --- fs/gfs2/glock.h | 9 + 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 9a5dadc93cfc..64541d8bf9ad 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -164,7

[Cluster-devel] [PATCH 07/20] gfs2: instrumentation wrt log_flush stuck

2020-06-08 Thread Andreas Gruenbacher
From: Bob Peterson This adds checks for gfs2_log_flush being stuck, similarly to the check in gfs2_ail1_flush. To faciliate this and make the strings easy to grep we move the ail1 emptying to its own function, empty_ail1_list. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher

Re: [Cluster-devel] [PATCH 6/8] gfs2: instrumentation wrt log_flush stuck

2020-06-05 Thread Andreas Gruenbacher
On Fri, Jun 5, 2020 at 4:49 PM Bob Peterson wrote: > Hi Andreas, > > - Original Message - > (snip) > > > @@ -970,7 +969,16 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct > > > gfs2_glock *gl, u32 flags) > > > > > > if (!(flags & GFS2_LOG_HEAD_FLUSH_NORMAL)) { > > >

Re: [Cluster-devel] [PATCH 7/8] gfs2: Add new trace point for glock ail management

2020-06-05 Thread Andreas Gruenbacher
Bob, this very much looks like a debugging trace point that has no business in production code. Thanks, Andreas

Re: [Cluster-devel] [PATCH 6/8] gfs2: instrumentation wrt log_flush stuck

2020-06-05 Thread Andreas Gruenbacher
On Fri, Jun 5, 2020 at 6:15 PM Bob Peterson wrote: > - Original Message - > > On Fri, Jun 5, 2020 at 4:49 PM Bob Peterson wrote: > > > Hi Andreas, > > > > > > - Original Message - > > > (snip) > > > > > @@ -970,7 +969,16 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct > > > >

Re: [Cluster-devel] [PATCH 0/8] Misc Patch Collection

2020-06-05 Thread Andreas Gruenbacher
Hi Bob, On Tue, May 26, 2020 at 3:07 PM Bob Peterson wrote: > Andreas expressed some concerns about some of the others. For example, he > didn't like that the new "status" sysfs file was taking "try" locks, but > if the lock is held, I don't know of a better way to do this. walking a linked

Re: [Cluster-devel] [PATCH 6/8] gfs2: instrumentation wrt log_flush stuck

2020-06-05 Thread Andreas Gruenbacher
Hi Bob, On Tue, May 26, 2020 at 3:05 PM Bob Peterson wrote: > This adds checks for gfs2_log_flush being stuck, similarly to the check > in gfs2_ail1_flush. > > Signed-off-by: Bob Peterson > --- > fs/gfs2/log.c | 14 +++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > > diff

[Cluster-devel] [GIT PULL] GFS2 fix for v5.7-rc7

2020-05-29 Thread Andreas Gruenbacher
0:24 +0200) Fix the previous, flawed gfs2_find_jhead commit -------- Andreas Gruenbacher (1): gfs2: Even more gfs2_find_jhead fixes fs/gfs2/lops.c | 15 +-- 1 file

[Cluster-devel] [GIT PULL] GFS2 fixes for 5.7

2020-05-12 Thread Andreas Gruenbacher
filesystem withdraw logic. -------- Andreas Gruenbacher (3): gfs2: Another gfs2_walk_metadata fix gfs2: More gfs2_find_jhead fixes gfs2: Grab glock reference sooner in gfs2_add_revoke Bob Peterson (11): gfs2: fix withdra

[Cluster-devel] [PATCH] gfs2: More gfs2_find_jhead fixes

2020-04-29 Thread Andreas Gruenbacher
g # v5.2+ Signed-off-by: Andreas Gruenbacher --- fs/gfs2/lops.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index 5ea96757afc4..48b54ec1c793 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c @@ -263,7 +263,7

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

2020-04-29 Thread Andreas Gruenbacher
Make sure we don't walk past the end of the metadata in gfs2_walk_metadata: the inode holds fewer pointers than indirect blocks. Slightly clean up gfs2_iomap_get. Fixes: a27a0c9b6a20 ("gfs2: gfs2_walk_metadata fix") Cc: sta...@vger.kernel.org # v5.3+ Signed-off-by: Andreas Gruenbache

Re: [Cluster-devel] [PATCH] fs/gfs2:lock a spinlock always before returning from do_xmote()

2020-04-28 Thread Andreas Gruenbacher
Hi, On Tue, Apr 28, 2020 at 5:30 AM Wu Bo wrote: > The call stack is as follows: > finish_xmote() > ... > spin_lock(>gl_lockref.lock); > ... > --> do_xmote() > spin_unlock(>gl_lockref.lock); > ... > return; > ... >

Re: [Cluster-devel] [gfs2:gfs2-iopen 12/12] fs/gfs2/util.c:126:3: error: implicit declaration of function

2020-04-17 Thread Andreas Gruenbacher
Hi Bob, On Fri, Apr 17, 2020 at 3:09 PM Bob Peterson wrote: > - Original Message - > > Bob, > > > > commit "gfs2: Force withdraw to replay journals and wait for it to > > finish" adds three new users of gfs2_glock_dq_wait in function > > signal_our_withdraw. Is the waiting there done for

Re: [Cluster-devel] [gfs2:gfs2-iopen 12/12] fs/gfs2/util.c:126:3: error: implicit declaration of function 'gfs2_glock_dq_wait'; did you mean 'gfs2_glock_nq_init'?

2020-04-17 Thread Andreas Gruenbacher
Bob, On Fri, Apr 17, 2020 at 9:37 AM kbuild test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git > gfs2-iopen > head: c748e1ec9bd20d71265a148042f6bc97ffc5f343 > commit: c748e1ec9bd20d71265a148042f6bc97ffc5f343 [12/12] gfs2: Remove unused > function

Re: [Cluster-devel] [PATCH 18/34] docs: filesystems: convert gfs2-glocks.txt to ReST

2020-04-15 Thread Andreas Gruenbacher
Hi Mauro, I've pushed this to for-next. Thanks, Andreas

Re: [Cluster-devel] [GFS2 PATCH] gfs2: Fix oversight in gfs2_ail1_flush

2020-03-30 Thread Andreas Gruenbacher
Hi Bob, On Mon, Mar 30, 2020 at 2:42 PM Bob Peterson wrote: > Under ordinary circumstances, function gfs2_ail1_start_one will start > an item from the ail1 list writing, then return -EBUSY. This causes > gfs2_ail1_flush to loop around and try again. However, it never > clears the -EBUSY return

Re: [Cluster-devel] [GFS2 PATCH 4/5] gfs2: special log flush sequence to protect jdata writes

2020-03-27 Thread Andreas Gruenbacher
Hi Bob, On Thu, Mar 26, 2020 at 7:40 PM Bob Peterson wrote: > This patch implements Ben Marzinkski's idea of using two locks > as different layers of protection inside the gfs2_log_flush. > To quote Ben: this is all looking rather promising, but could you please describe what problem this and

[Cluster-devel] [PATCH] gfs2: Switch to list_{first,last}_entry

2020-03-16 Thread Andreas Gruenbacher
Replace open-coded versions of list_first_entry and list_last_entry with those functions. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/bmap.c | 4 ++-- fs/gfs2/glock.c| 10 +- fs/gfs2/log.c | 9 - fs/gfs2/lops.c | 6 +++--- fs/gfs2/quota.c| 6

[Cluster-devel] [PATCH] gfs2: Clean up inode initialization and teardown

2020-03-16 Thread Andreas Gruenbacher
things that gfs2_evict_inode will already tear down. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/inode.c | 18 ++ fs/gfs2/super.c | 28 +--- 2 files changed, 19 insertions(+), 27 deletions(-) diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index

Re: [Cluster-devel] [GFS2 PATCH 0/2 v2] Clean up and fix quota data allocate and free

2020-03-02 Thread Andreas Gruenbacher
On Fri, Feb 28, 2020 at 8:47 PM Bob Peterson wrote: > > This patch set cleans up a recently discovered race between file close > and chown. The problem was that file close would free the quota data > structures attached to the in-core inode, but chown relied on them to > exist. So if the timing

Re: [Cluster-devel] [GFS2 PATCH 1/3] gfs2: free quota data struct during evict, not file close

2020-02-26 Thread Andreas Gruenbacher
On Wed, Feb 26, 2020 at 4:49 PM Bob Peterson wrote: > Before this patch, whenever a file was closed, if it was the last > process out, it freed the quota data via gfs2_qa_delete(). However, > that created race conditions between closers and other operations > like chown that relied upon the

[Cluster-devel] [GIT PULL] GFS2 changes for the 5.6 merge window (2)

2020-02-07 Thread Andreas Gruenbacher
Das (1): gfs2: fix gfs2_find_jhead that returns uninitialized jhead with seq 0 Andreas Gruenbacher (1): gfs2: fix O_SYNC write handling Christoph Hellwig (1): gfs2: move setting current->backing_dev_info fs/gfs2/file.c |

Re: [Cluster-devel] [PATCH] gfs2: Clean up gfs2_file_write_iter and fix O_SYNC write handling

2020-02-06 Thread Andreas Gruenbacher
On Thu, Feb 6, 2020 at 5:34 PM Christoph Hellwig wrote: > > if (iocb->ki_flags & IOCB_DIRECT) { > > struct address_space *mapping = file->f_mapping; > > + ssize_t buffered, ret2; > > > > + ret = gfs2_file_direct_write(iocb, from); > > + if

[Cluster-devel] [PATCH] gfs2: Clean up gfs2_file_write_iter and fix O_SYNC write handling

2020-02-06 Thread Andreas Gruenbacher
on a proposed fix by Christoph Hellwig . Signed-off-by: Andreas Gruenbacher --- fs/gfs2/file.c | 51 +- 1 file changed, 21 insertions(+), 30 deletions(-) diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index 21d032c4b077..d68530b12706 100644 --- a/fs/gfs2/file.c

Re: [Cluster-devel] [PATCH 05/12] gfs2: fix O_SYNC write handling

2020-02-06 Thread Andreas Gruenbacher
Hi Christoph, thanks for this patch, and sorry for taking so long to react. On Tue, Jan 14, 2020 at 5:54 PM Christoph Hellwig wrote: > Don't ignore the return value from generic_write_sync for the direct to > buffered I/O callback case when written is non-zero. Also don't bother > to call

Re: [Cluster-devel] [GFS2 PATCH v2] gfs2: fix gfs2_find_jhead that returns uninitialized jhead with seq 0

2020-02-04 Thread Andreas Gruenbacher
Hi Abhi, On Tue, Feb 4, 2020 at 9:15 PM Abhi Das wrote: > When the first log header in a journal happens to have a sequence > number of 0, a bug in gfs2_find_jhead() causes it to prematurely exit, > and return an uninitialized jhead with seq 0. This can cause failures > in the caller. For

[Cluster-devel] [GIT PULL] GFS2 changes for the 5.6 merge window

2020-01-31 Thread Andreas Gruenbacher
(2): fs/gfs2: remove unused IS_DINODE and IS_LEAF macros gfs2: remove unused LBIT macros Andreas Gruenbacher (4): gfs2: Another gfs2_find_jhead fix gfs2: Avoid access time thrashing in gfs2_inode_lookup gfs2: Fix incorrect variable name gfs2: Remove GFS2_MIN_LVB_SIZ

Re: [Cluster-devel] [GFS2 v8 PATCH 16/22] gfs2: new slab for transactions

2020-01-23 Thread Andreas Gruenbacher
On Mon, Dec 9, 2019 at 4:38 PM Bob Peterson wrote: > This patch adds a new slab for gfs2 transactions. That allows us to > have an initialization function and protect against some errors. The added checks in gfs2_trans_free actually have nothing to do with > > Signed-off-by: Bob Peterson > ---

Re: [Cluster-devel] [PATCH 08/11] gfs2: Move inode generation number check into gfs2_inode_lookup

2020-01-23 Thread Andreas Gruenbacher
As it turns out, this patch needs the following fix. Thanks, Andreas diff --git b/fs/gfs2/inode.c a/fs/gfs2/inode.c index e12e694a1bbb..9c06680c798f 100644 --- b/fs/gfs2/inode.c +++ a/fs/gfs2/inode.c @@ -202,8 +202,12 @@ struct inode *gfs2_inode_lookup(struct super_block *sb, unsigned int type,

[Cluster-devel] [PATCH 08/11] gfs2: Move inode generation number check into gfs2_inode_lookup

2020-01-20 Thread Andreas Gruenbacher
Move the inode generation number check from gfs2_lookup_by_inum into gfs2_inode_lookup: gfs2_inode_lookup may be able to decide that an inode with the given inode generation number cannot exist without having to verify the block type or reading the inode from disk. Signed-off-by: Andreas

[Cluster-devel] [PATCH 10/11] gfs2: Wake up when setting GLF_DEMOTE

2020-01-20 Thread Andreas Gruenbacher
Wake up the sdp->sd_async_glock_wait wait queue when setting the GLF_DEMOTE flag. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 1f906a3281b0..5c3dfec99

[Cluster-devel] [PATCH 07/11] gfs2: Minor gfs2_lookup_by_inum cleanup

2020-01-20 Thread Andreas Gruenbacher
Use a zero no_formal_ino instead of a NULL pointer to indicate that any inode generation number will qualify: a valid inode never has a zero no_formal_ino. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/export.c | 4 +++- fs/gfs2/glock.c | 2 +- fs/gfs2/inode.c | 11 +-- fs/gfs2

[Cluster-devel] [PATCH 06/11] gfs2: Try harder to delete inodes locally

2020-01-20 Thread Andreas Gruenbacher
locking request if there is contention on the inode glock, and we can also switch to performing the delete asynchronously in that case. Those will the the subjects of future patches. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/super.c | 53 +++-- 1

[Cluster-devel] [PATCH 02/11] gfs2: Don't add glocks to the LRU while still in use

2020-01-20 Thread Andreas Gruenbacher
Only add glocks to the LRU once they're no longer in use. They will outlive the inode they are associated with if they are cached (not GL_NOCACHE) or if they have some pending work attached. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 2 +- fs/gfs2/glock.h | 1 - fs/gfs2/super.c

[Cluster-devel] [PATCH 11/11] gfs2: Smarter iopen glock waiting

2020-01-20 Thread Andreas Gruenbacher
in reasonable time. To make this work even better, poke the inode glock when we notice contention on the iopen glock and we can't evict the corresponsing inode and release the iopen glock immediately. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 34 -- fs/gfs2

[Cluster-devel] [PATCH 00/11] gfs2: iopen glock locking scheme rework

2020-01-20 Thread Andreas Gruenbacher
lock value block (LVB) to get around that. Thanks, Andreas Andreas Gruenbacher (10): gfs2: Don't add glocks to the LRU while still in use gfs2: Keep track of deletes in inode LVBs gfs2: Turn gl_delete into a delayed work gfs2: Give up the iopen glock on contention gfs2: Try harder

[Cluster-devel] [PATCH 04/11] gfs2: Turn gl_delete into a delayed work

2020-01-20 Thread Andreas Gruenbacher
We'll want to queue a delayed work in a future patch. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 5 +++-- fs/gfs2/glops.c | 3 ++- fs/gfs2/incore.h | 4 ++-- fs/gfs2/rgrp.c | 3 ++- fs/gfs2/super.c | 3 ++- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/fs

[Cluster-devel] [PATCH 09/11] gfs2: Check inode generation number in delete_work_func

2020-01-20 Thread Andreas Gruenbacher
in the inode. The same applies if another node that had the inode open as well managed to delete the inode before us. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 4 +++- fs/gfs2/incore.h | 5 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2

[Cluster-devel] [PATCH 05/11] gfs2: Give up the iopen glock on contention

2020-01-20 Thread Andreas Gruenbacher
-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 52 fs/gfs2/incore.h | 1 + fs/gfs2/super.c | 7 +-- 3 files changed, 58 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index e71f23ebb99b..38ba77b35b50 100644

[Cluster-devel] [PATCH 03/11] gfs2: Keep track of deletes in inode LVBs

2020-01-20 Thread Andreas Gruenbacher
the resource group glock in order to verify the block type. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 19 +++ fs/gfs2/glock.h | 3 +++ fs/gfs2/glops.c | 2 +- fs/gfs2/super.c | 3 +++ include/uapi/linux

[Cluster-devel] [PATCH 01/11] gfs2: Allow ASPACE glocks to also have an lvb

2020-01-20 Thread Andreas Gruenbacher
From: Bob Peterson Signed-off-by: Bob Peterson --- fs/gfs2/glock.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index b7123de7c180..cabffdc126fd 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -125,12 +125,11 @@ static void

[Cluster-devel] [PATCH] gfs2: Fix incorrect variable name

2020-01-17 Thread Andreas Gruenbacher
Rename sd_log_commited_revoke to sd_log_committed_revoke. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/incore.h | 2 +- fs/gfs2/log.c| 10 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 0c4decdd3277..a64146896c4c 100644

[Cluster-devel] [PATCH] gfs2: Don't add glocks to the LRU while still in use

2020-01-17 Thread Andreas Gruenbacher
Only add glocks to the LRU once they're no longer in use. They will outlive the inode they are associated with if they are cached (not GL_NOCACHE) or if they have some pending work attached. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 2 +- fs/gfs2/glock.h | 1 - fs/gfs2/super.c

[Cluster-devel] [PATCH] gfs2: Remove GFS2_MIN_LVB_SIZE define

2020-01-17 Thread Andreas Gruenbacher
The dlm lockspace is set up to have lock value blocks of GDLM_LVB_SIZE bytes, and dlm is the only lock manager we support, so there is no point in claiming that the lock value block could have any other size. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 2 +- fs/gfs2/incore.h | 2

Re: [Cluster-devel] [PATCH] Move struct gfs2_rgrp_lvb out of gfs2_ondisk.h

2020-01-15 Thread Andreas Gruenbacher
On Wed, Jan 15, 2020 at 9:58 AM Steven Whitehouse wrote: > On 15/01/2020 08:49, Andreas Gruenbacher wrote: > > There's no point in sharing the internal structure of lock value blocks > > with user space. > > The reason that is in ondisk is that changing that structure is &

[Cluster-devel] [PATCH] Move struct gfs2_rgrp_lvb out of gfs2_ondisk.h

2020-01-15 Thread Andreas Gruenbacher
There's no point in sharing the internal structure of lock value blocks with user space. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.h | 1 + fs/gfs2/incore.h | 1 + fs/gfs2/rgrp.c | 10 ++ include/uapi/linux/gfs2_ondisk.h

Re: [Cluster-devel] [PATCH] gfs2: Avoid access time trashing in gfs2_inode_lookup

2020-01-15 Thread Andreas Gruenbacher
Oops, sorry for the duplicate post. Andreas

[Cluster-devel] [PATCH] gfs2: Avoid access time trashing in gfs2_inode_lookup

2020-01-15 Thread Andreas Gruenbacher
all gfs2_inode_refresh. In addition, only initialize ip->i_no_formal_ino from no_formal_ino when actually needed. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/inode.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index dafef1

[Cluster-devel] [PATCH] gfs2: Avoid access time trashing in gfs2_inode_lookup

2020-01-15 Thread Andreas Gruenbacher
all gfs2_inode_refresh. In addition, only initialize ip->i_no_formal_ino from no_formal_ino when actually needed. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/inode.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index dafef1

Re: [Cluster-devel] [GFS2 PATCH 1/6] gfs2: revoke cleanup: leaf_dealloc

2020-01-10 Thread Andreas Gruenbacher
Bob, On Fri, Jan 3, 2020 at 4:33 PM Bob Peterson wrote: > Several gfs2 functions failed to reserve enough revoke entries for their > transactions in the journal. Function gfs2_trans_remove_revoke unconditionally > decrements tr->tr_num_revoke, and if not enough revokes are reserved, the > value

Re: [Cluster-devel] [GFS2 PATCH 0/6] gfs2: jdata transactions not reserving enough revokes

2020-01-07 Thread Andreas Gruenbacher
Hi Bob, On Fri, Jan 3, 2020 at 4:33 PM Bob Peterson wrote: > Before this patch set, several gfs2 functions failed to reserve enough > revoke entries in the journal. Some examples: > > 1. gfs2_dinode_dealloc failed to reserve a revoke for the dinode >being deleted. that sounds like a bug. >

[Cluster-devel] [PATCH] iomap: Export iomap_page_create and iomap_set_range_uptodate

2019-12-10 Thread Andreas Gruenbacher
These two functions are needed by filesystems for converting inline ("stuffed") inodes into non-inline inodes. Signed-off-by: Andreas Gruenbacher --- fs/iomap/buffered-io.c | 6 -- include/linux/iomap.h | 5 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git

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

2019-12-10 Thread Andreas Gruenbacher
Hi Christoph, On Mon, Sep 30, 2019 at 10:49 PM Andreas Gruenbacher wrote: > 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: > here are the changes we currently need on top of what you've posted

[Cluster-devel] [PATCH v2] gfs2: Another gfs2_find_jhead fix

2019-12-10 Thread Andreas Gruenbacher
") Cc: sta...@vger.kernel.org # v5.2+ Signed-off-by: Andreas Gruenbacher --- fs/gfs2/lops.c | 68 -- 1 file changed, 44 insertions(+), 24 deletions(-) diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index 55fed7daf2b1..12696133618c 100644 --- a/fs/g

[Cluster-devel] [PATCH] gfs2: Another gfs2_find_jhead fix

2019-12-08 Thread Andreas Gruenbacher
calculation logic in gfs2_log_alloc_bio. In gfs2_find_jhead, simplify the disk block and offset calculation logic and fix a variable name. Fixes: f4686c26ecc3 ("gfs2: read journal in large chunks") Cc: sta...@vger.kernel.org # v5.2+ Signed-off-by: Andreas Gruenbacher --- fs/gfs2/l

[Cluster-devel] [GIT PULL] GFS2 changes for the 5.5 merge window

2019-12-05 Thread Andreas Gruenbacher
gfs2_fs_parameters static - Some whitespace cleanups - removed unnecessary semicolon Aliasgar Surti (1): gfs2: removed unnecessary semicolon Andreas Gruenbacher (6): gfs2: Some whitespace cleanups gfs2: Improve mmap

Re: [Cluster-devel] [PATCH] mm/filemap: do not allocate cache pages beyond end of file at read

2019-11-27 Thread Andreas Gruenbacher
On Wed, Nov 27, 2019 at 4:42 PM Steven Whitehouse wrote: > Hi, > > On 25/11/2019 17:05, Linus Torvalds wrote: > > On Mon, Nov 25, 2019 at 2:53 AM Steven Whitehouse > > wrote: > >> Linus, is that roughly what you were thinking of? > > So the concept looks ok, but I don't really like the new

[Cluster-devel] [RFC PATCH 2/3] fs: Add FAULT_FLAG_CACHED flag for filemap_fault

2019-11-22 Thread Andreas Gruenbacher
to tentatively satisfy a minor page fault out of the page cache, and to retry the operation after taking the necessary steps when that isn't possible. Signed-off-by: Andreas Gruenbacher --- include/linux/mm.h | 4 +++- mm/filemap.c | 43 ++- 2 files changed

[Cluster-devel] [RFC PATCH 3/3] gfs2: Rework read and page fault locking

2019-11-22 Thread Andreas Gruenbacher
n that fails, take the lock and repeat the opeation. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/aops.c | 36 ++- fs/gfs2/file.c | 66 -- 2 files changed, 71 insertions(+), 31 deletions(-) diff --git a/fs/gfs2/aops.c b/fs

[Cluster-devel] [RFC PATCH 1/3] fs: Add IOCB_CACHED flag for generic_file_read_iter

2019-11-22 Thread Andreas Gruenbacher
(with IOCB_NOWAIT). Signed-off-by: Andreas Gruenbacher --- include/linux/fs.h | 1 + mm/filemap.c | 17 ++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index e0d909d35763..4ca5e2885452 100644 --- a/include/linux/fs.h +++ b

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

[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) >

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.

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

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

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

2019-11-08 Thread Andreas Gruenbacher
elated 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 changed, 19 i

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

2019-11-08 Thread Andreas Gruenbacher
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.c b/fs/gfs2/file.c index

[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+ Signed-off-b

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

2019-11-08 Thread Andreas Gruenbacher
, 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 +++ b/fs/gfs2

[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:

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

[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:

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 > > Cc: linux-k

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 > > on

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 replies.

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