All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH v2 0/3] gfs2: local statfs improvements
@ 2020-09-25  3:46 Abhi Das
  2020-09-25  3:46 ` [Cluster-devel] [PATCH v2 1/3] gfs2: Add fields for statfs info in struct gfs2_log_header_host Abhi Das
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Abhi Das @ 2020-09-25  3:46 UTC (permalink / raw)
  To: cluster-devel.redhat.com

This patchset allows gfs2 to sync statfs info from the journal to the
master statfs file during a log flush or during recovery. We still
write to the local statfs file to allow older versions to recover the
statfs info of newer kernels with this patchset.

Abhi Das (3):
  gfs2: Add fields for statfs info in struct gfs2_log_header_host
  gfs2: lookup local statfs inodes at mount time
  gfs2: Recover statfs info in journal head

 fs/gfs2/incore.h     | 11 +++++++
 fs/gfs2/lops.c       |  2 +-
 fs/gfs2/lops.h       |  1 +
 fs/gfs2/ops_fstype.c | 32 ++++++++++++++-----
 fs/gfs2/recovery.c   | 75 ++++++++++++++++++++++++++++++++++++++++++++
 fs/gfs2/super.c      | 30 ++++++++++++++++--
 fs/gfs2/super.h      |  5 +++
 7 files changed, 145 insertions(+), 11 deletions(-)

-- 
2.20.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Cluster-devel] [PATCH v2 1/3] gfs2: Add fields for statfs info in struct gfs2_log_header_host
  2020-09-25  3:46 [Cluster-devel] [PATCH v2 0/3] gfs2: local statfs improvements Abhi Das
@ 2020-09-25  3:46 ` Abhi Das
  2020-09-25  3:46 ` [Cluster-devel] [PATCH v2 2/3] gfs2: lookup local statfs inodes at mount time Abhi Das
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Abhi Das @ 2020-09-25  3:46 UTC (permalink / raw)
  To: cluster-devel.redhat.com

And read these in __get_log_header() from the log header.
Also make gfs2_statfs_change_out() non-static so it can be used
outside of super.c

Signed-off-by: Abhi Das <adas@redhat.com>
---
 fs/gfs2/incore.h   | 4 ++++
 fs/gfs2/recovery.c | 4 ++++
 fs/gfs2/super.c    | 2 +-
 fs/gfs2/super.h    | 2 ++
 4 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index ca2ec02436ec..9fc12206a3ad 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -41,6 +41,10 @@ struct gfs2_log_header_host {
 	u32 lh_flags;		/* GFS2_LOG_HEAD_... */
 	u32 lh_tail;		/* Block number of log tail */
 	u32 lh_blkno;
+
+	s64 lh_local_total;
+	s64 lh_local_free;
+	s64 lh_local_dinodes;
 };
 
 /*
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c
index 390ea79d682c..a8bb17e355b8 100644
--- a/fs/gfs2/recovery.c
+++ b/fs/gfs2/recovery.c
@@ -144,6 +144,10 @@ int __get_log_header(struct gfs2_sbd *sdp, const struct gfs2_log_header *lh,
 	head->lh_tail = be32_to_cpu(lh->lh_tail);
 	head->lh_blkno = be32_to_cpu(lh->lh_blkno);
 
+	head->lh_local_total = be64_to_cpu(lh->lh_local_total);
+	head->lh_local_free = be64_to_cpu(lh->lh_local_free);
+	head->lh_local_dinodes = be64_to_cpu(lh->lh_local_dinodes);
+
 	return 0;
 }
 /**
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 3d9daac44e1c..20554db4ccab 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -230,7 +230,7 @@ void gfs2_statfs_change_in(struct gfs2_statfs_change_host *sc, const void *buf)
 	sc->sc_dinodes = be64_to_cpu(str->sc_dinodes);
 }
 
-static void gfs2_statfs_change_out(const struct gfs2_statfs_change_host *sc, void *buf)
+void gfs2_statfs_change_out(const struct gfs2_statfs_change_host *sc, void *buf)
 {
 	struct gfs2_statfs_change *str = buf;
 
diff --git a/fs/gfs2/super.h b/fs/gfs2/super.h
index 51900554ed81..ed4f5cb29074 100644
--- a/fs/gfs2/super.h
+++ b/fs/gfs2/super.h
@@ -37,6 +37,8 @@ extern void gfs2_statfs_change(struct gfs2_sbd *sdp, s64 total, s64 free,
 			       s64 dinodes);
 extern void gfs2_statfs_change_in(struct gfs2_statfs_change_host *sc,
 				  const void *buf);
+extern void gfs2_statfs_change_out(const struct gfs2_statfs_change_host *sc,
+				   void *buf);
 extern void update_statfs(struct gfs2_sbd *sdp, struct buffer_head *m_bh,
 			  struct buffer_head *l_bh);
 extern int gfs2_statfs_sync(struct super_block *sb, int type);
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Cluster-devel] [PATCH v2 2/3] gfs2: lookup local statfs inodes at mount time
  2020-09-25  3:46 [Cluster-devel] [PATCH v2 0/3] gfs2: local statfs improvements Abhi Das
  2020-09-25  3:46 ` [Cluster-devel] [PATCH v2 1/3] gfs2: Add fields for statfs info in struct gfs2_log_header_host Abhi Das
@ 2020-09-25  3:46 ` Abhi Das
  2020-09-25  3:46 ` [Cluster-devel] [PATCH v2 3/3] gfs2: Recover statfs info in journal head Abhi Das
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Abhi Das @ 2020-09-25  3:46 UTC (permalink / raw)
  To: cluster-devel.redhat.com

We require these inodes during journal recovery when we attempt
to recover the statfs file. We are not able to lookup inodes at
that time due to locks being blocked so we pre-lookup these inodes
and save them in a linked list.

Signed-off-by: Abhi Das <adas@redhat.com>
---
 fs/gfs2/incore.h     |  7 +++++++
 fs/gfs2/ops_fstype.c | 32 ++++++++++++++++++++++++--------
 fs/gfs2/super.c      | 28 +++++++++++++++++++++++++++-
 fs/gfs2/super.h      |  3 +++
 4 files changed, 61 insertions(+), 9 deletions(-)

diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 9fc12206a3ad..313e35c14860 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -705,6 +705,12 @@ struct gfs2_pcpu_lkstats {
 	struct gfs2_lkstats lkstats[10];
 };
 
+struct lcl_statfs_inode {
+	struct list_head si_list;
+	struct inode *si_sc_inode;
+	unsigned int si_jid;
+};
+
 struct gfs2_sbd {
 	struct super_block *sd_vfs;
 	struct gfs2_pcpu_lkstats __percpu *sd_lkstats;
@@ -755,6 +761,7 @@ struct gfs2_sbd {
 	struct inode *sd_jindex;
 	struct inode *sd_statfs_inode;
 	struct inode *sd_sc_inode;
+	struct list_head sd_sc_inodes_list;
 	struct inode *sd_qc_inode;
 	struct inode *sd_rindex;
 	struct inode *sd_quota_inode;
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index 6d18d2c91add..042f3de79789 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -110,6 +110,8 @@ static struct gfs2_sbd *init_sbd(struct super_block *sb)
 	spin_lock_init(&sdp->sd_trunc_lock);
 	spin_lock_init(&sdp->sd_bitmap_lock);
 
+	INIT_LIST_HEAD(&sdp->sd_sc_inodes_list);
+
 	mapping = &sdp->sd_aspace;
 
 	address_space_init_once(mapping);
@@ -814,6 +816,7 @@ static int init_per_node(struct gfs2_sbd *sdp, int undo)
 	char buf[30];
 	int error = 0;
 	struct gfs2_inode *ip;
+	struct gfs2_jdesc *jd;
 	struct inode *master = d_inode(sdp->sd_master_dir);
 
 	if (sdp->sd_args.ar_spectator)
@@ -829,12 +832,26 @@ static int init_per_node(struct gfs2_sbd *sdp, int undo)
 		return error;
 	}
 
-	sprintf(buf, "statfs_change%u", sdp->sd_jdesc->jd_jid);
-	sdp->sd_sc_inode = gfs2_lookup_simple(pn, buf);
-	if (IS_ERR(sdp->sd_sc_inode)) {
-		error = PTR_ERR(sdp->sd_sc_inode);
-		fs_err(sdp, "can't find local \"sc\" file: %d\n", error);
-		goto fail;
+	list_for_each_entry(jd, &sdp->sd_jindex_list, jd_list) {
+		struct lcl_statfs_inode *lsi =
+			kmalloc(sizeof(struct lcl_statfs_inode), GFP_NOFS);
+		if (!lsi) {
+			error = -ENOMEM;
+			goto fail_ut_i;
+		}
+		sprintf(buf, "statfs_change%u", jd->jd_jid);
+		lsi->si_sc_inode = gfs2_lookup_simple(pn, buf);
+		if (IS_ERR(lsi->si_sc_inode)) {
+			error = PTR_ERR(lsi->si_sc_inode);
+			fs_err(sdp, "can't find local \"sc\" file #%u: %d\n",
+			       jd->jd_jid, error);
+			goto fail_ut_i;
+		}
+		lsi->si_jid = jd->jd_jid;
+		if (jd->jd_jid == sdp->sd_jdesc->jd_jid)
+			sdp->sd_sc_inode = lsi->si_sc_inode;
+
+		list_add_tail(&lsi->si_list, &sdp->sd_sc_inodes_list);
 	}
 
 	sprintf(buf, "quota_change%u", sdp->sd_jdesc->jd_jid);
@@ -873,8 +890,7 @@ static int init_per_node(struct gfs2_sbd *sdp, int undo)
 fail_qc_i:
 	iput(sdp->sd_qc_inode);
 fail_ut_i:
-	iput(sdp->sd_sc_inode);
-fail:
+	free_lcl_statfs_inodes(sdp);
 	iput(pn);
 	return error;
 }
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 20554db4ccab..ac5ad16e5c96 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -729,7 +729,7 @@ static void gfs2_put_super(struct super_block *sb)
 			gfs2_glock_dq_uninit(&sdp->sd_jinode_gh);
 		gfs2_glock_dq_uninit(&sdp->sd_sc_gh);
 		gfs2_glock_dq_uninit(&sdp->sd_qc_gh);
-		iput(sdp->sd_sc_inode);
+		free_lcl_statfs_inodes(sdp);
 		iput(sdp->sd_qc_inode);
 	}
 
@@ -1560,6 +1560,32 @@ static void gfs2_free_inode(struct inode *inode)
 	kmem_cache_free(gfs2_inode_cachep, GFS2_I(inode));
 }
 
+extern void free_lcl_statfs_inodes(struct gfs2_sbd *sdp)
+{
+	struct lcl_statfs_inode *lsi, *safe;
+
+	list_for_each_entry_safe(lsi, safe, &sdp->sd_sc_inodes_list, si_list) {
+		if (lsi->si_jid == sdp->sd_jdesc->jd_jid)
+			sdp->sd_sc_inode = NULL;
+		if (lsi->si_sc_inode)
+			iput(lsi->si_sc_inode);
+		list_del(&lsi->si_list);
+		kfree(lsi);
+	}
+}
+
+extern struct inode *find_lcl_statfs_inode(struct gfs2_sbd *sdp,
+					    unsigned int index)
+{
+	struct lcl_statfs_inode *lsi;
+
+	list_for_each_entry(lsi, &sdp->sd_sc_inodes_list, si_list) {
+		if (lsi->si_jid == index)
+			return lsi->si_sc_inode;
+	}
+	return NULL;
+}
+
 const struct super_operations gfs2_super_ops = {
 	.alloc_inode		= gfs2_alloc_inode,
 	.free_inode		= gfs2_free_inode,
diff --git a/fs/gfs2/super.h b/fs/gfs2/super.h
index ed4f5cb29074..b3e6ce502108 100644
--- a/fs/gfs2/super.h
+++ b/fs/gfs2/super.h
@@ -44,6 +44,9 @@ extern void update_statfs(struct gfs2_sbd *sdp, struct buffer_head *m_bh,
 extern int gfs2_statfs_sync(struct super_block *sb, int type);
 extern void gfs2_freeze_func(struct work_struct *work);
 
+extern void free_lcl_statfs_inodes(struct gfs2_sbd *sdp);
+extern struct inode *find_lcl_statfs_inode(struct gfs2_sbd *sdp,
+					    unsigned int index);
 extern void free_sbd(struct gfs2_sbd *sdp);
 
 extern struct file_system_type gfs2_fs_type;
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Cluster-devel] [PATCH v2 3/3] gfs2: Recover statfs info in journal head
  2020-09-25  3:46 [Cluster-devel] [PATCH v2 0/3] gfs2: local statfs improvements Abhi Das
  2020-09-25  3:46 ` [Cluster-devel] [PATCH v2 1/3] gfs2: Add fields for statfs info in struct gfs2_log_header_host Abhi Das
  2020-09-25  3:46 ` [Cluster-devel] [PATCH v2 2/3] gfs2: lookup local statfs inodes at mount time Abhi Das
@ 2020-09-25  3:46 ` Abhi Das
  2020-10-15 12:05 ` [Cluster-devel] [PATCH v2 0/3] gfs2: local statfs improvements Andreas Gruenbacher
  2020-10-15 14:49 ` Andreas Gruenbacher
  4 siblings, 0 replies; 6+ messages in thread
From: Abhi Das @ 2020-09-25  3:46 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Apply the outstanding statfs changes in the journal head to the
master statfs file. Zero out the local statfs file for good measure.

Signed-off-by: Abhi Das <adas@redhat.com>
---
 fs/gfs2/lops.c     |  2 +-
 fs/gfs2/lops.h     |  1 +
 fs/gfs2/recovery.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 73 insertions(+), 1 deletion(-)

diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index ed1da4323967..ed69298dd824 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -823,7 +823,7 @@ static int buf_lo_scan_elements(struct gfs2_jdesc *jd, u32 start,
  *
  */
 
-static void gfs2_meta_sync(struct gfs2_glock *gl)
+void gfs2_meta_sync(struct gfs2_glock *gl)
 {
 	struct address_space *mapping = gfs2_glock2aspace(gl);
 	struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
diff --git a/fs/gfs2/lops.h b/fs/gfs2/lops.h
index 9c5e4e491e03..4a3d8aecdf82 100644
--- a/fs/gfs2/lops.h
+++ b/fs/gfs2/lops.h
@@ -27,6 +27,7 @@ extern void gfs2_log_submit_bio(struct bio **biop, int opf);
 extern void gfs2_pin(struct gfs2_sbd *sdp, struct buffer_head *bh);
 extern int gfs2_find_jhead(struct gfs2_jdesc *jd,
 			   struct gfs2_log_header_host *head, bool keep_cache);
+extern void gfs2_meta_sync(struct gfs2_glock *gl);
 
 static inline unsigned int buf_limit(struct gfs2_sbd *sdp)
 {
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c
index a8bb17e355b8..21661c5e497e 100644
--- a/fs/gfs2/recovery.c
+++ b/fs/gfs2/recovery.c
@@ -296,6 +296,76 @@ static void gfs2_recovery_done(struct gfs2_sbd *sdp, unsigned int jid,
 		sdp->sd_lockstruct.ls_ops->lm_recovery_result(sdp, jid, message);
 }
 
+static int update_statfs_inode(struct gfs2_jdesc *jd,
+			       struct gfs2_log_header_host *head,
+			       struct inode *inode)
+{
+	struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
+	struct gfs2_inode *ip;
+	struct buffer_head *bh;
+	struct gfs2_statfs_change_host sc;
+	int error = 0;
+
+	BUG_ON(!inode);
+	ip = GFS2_I(inode);
+
+	error = gfs2_meta_inode_buffer(ip, &bh);
+	if (error)
+		goto out;
+
+	spin_lock(&sdp->sd_statfs_spin);
+
+	if (head) { /* Updating the master statfs inode */
+		gfs2_statfs_change_in(&sc, bh->b_data + sizeof(struct gfs2_dinode));
+		sc.sc_total += head->lh_local_total;
+		sc.sc_free += head->lh_local_free;
+		sc.sc_dinodes += head->lh_local_dinodes;
+		gfs2_statfs_change_out(&sc, bh->b_data + sizeof(struct gfs2_dinode));
+
+		fs_info(sdp, "jid=%u: Updated master statfs Total:%lld, "
+			"Free:%lld, Dinodes:%lld after change "
+			"[%+lld,%+lld,%+lld]\n", jd->jd_jid, sc.sc_total,
+			sc.sc_free, sc.sc_dinodes, head->lh_local_total,
+			head->lh_local_free, head->lh_local_dinodes);
+	} else { /* Zeroing out one of the local statfs inodes */
+		memset(bh->b_data + sizeof(struct gfs2_dinode), 0,
+		       sizeof(struct gfs2_statfs_change));
+		if (jd->jd_jid == sdp->sd_lockstruct.ls_jid) {
+			memset(&sdp->sd_statfs_local, 0,
+			       sizeof(struct gfs2_statfs_change_host));
+		}
+	}
+	spin_unlock(&sdp->sd_statfs_spin);
+
+	mark_buffer_dirty(bh);
+	brelse(bh);
+	gfs2_meta_sync(ip->i_gl);
+
+out:
+	return error;
+}
+
+static void recover_local_statfs(struct gfs2_jdesc *jd,
+				 struct gfs2_log_header_host *head)
+{
+	int error;
+	struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
+
+	if (!head->lh_local_total && !head->lh_local_free
+	    && !head->lh_local_dinodes) /* No change */
+		goto zero_local;
+
+	error = update_statfs_inode(jd, head, sdp->sd_statfs_inode);
+	if (error)
+		goto out;
+
+zero_local:
+	error = update_statfs_inode(jd, NULL,
+				    find_lcl_statfs_inode(sdp, jd->jd_jid));
+out:
+	return;
+}
+
 void gfs2_recover_func(struct work_struct *work)
 {
 	struct gfs2_jdesc *jd = container_of(work, struct gfs2_jdesc, jd_work);
@@ -415,6 +485,7 @@ void gfs2_recover_func(struct work_struct *work)
 				goto fail_gunlock_thaw;
 		}
 
+		recover_local_statfs(jd, &head);
 		clean_journal(jd, &head);
 		up_read(&sdp->sd_log_flush_lock);
 
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Cluster-devel] [PATCH v2 0/3] gfs2: local statfs improvements
  2020-09-25  3:46 [Cluster-devel] [PATCH v2 0/3] gfs2: local statfs improvements Abhi Das
                   ` (2 preceding siblings ...)
  2020-09-25  3:46 ` [Cluster-devel] [PATCH v2 3/3] gfs2: Recover statfs info in journal head Abhi Das
@ 2020-10-15 12:05 ` Andreas Gruenbacher
  2020-10-15 14:49 ` Andreas Gruenbacher
  4 siblings, 0 replies; 6+ messages in thread
From: Andreas Gruenbacher @ 2020-10-15 12:05 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi Abhi,

On Fri, Sep 25, 2020 at 5:46 AM Abhi Das <adas@redhat.com> wrote:
> This patchset allows gfs2 to sync statfs info from the journal to the
> master statfs file during a log flush or during recovery. We still
> write to the local statfs file to allow older versions to recover the
> statfs info of newer kernels with this patchset.

With these patches, I'm running into the following bug with xfstest generic/034:

[  461.763402] run fstests generic/034 at 2020-10-15 13:53:39
[  465.985914] gfs2: fsid=dm-2: Trying to join cluster "lock_nolock", "dm-2"
[  465.988445] gfs2: fsid=dm-2: Now mounting FS...
[  466.008824] gfs2: fsid=dm-2.0: journal 0 mapped with 1 extents in 0ms
[  466.011108] gfs2: fsid=dm-2.0: jid=0, already locked for use
[  466.013110] gfs2: fsid=dm-2.0: jid=0: Looking at journal...
[  466.044558] gfs2: fsid=dm-2.0: jid=0: Journal head lookup took 31ms
[  466.046846] gfs2: fsid=dm-2.0: jid=0: Done
[  466.048361] gfs2: fsid=dm-2.0: first mount done, others may mount
[  466.504743] gfs2: fsid=dm-2: Trying to join cluster "lock_nolock", "dm-2"
[  466.507442] gfs2: fsid=dm-2: Now mounting FS...
[  466.529999] gfs2: fsid=dm-2.0: journal 0 mapped with 1 extents in 0ms
[  466.532387] gfs2: fsid=dm-2.0: jid=0, already locked for use
[  466.534460] gfs2: fsid=dm-2.0: jid=0: Looking at journal...
[  466.566238] gfs2: fsid=dm-2.0: jid=0: Journal head lookup took 31ms
[  466.568601] gfs2: fsid=dm-2.0: jid=0: Acquiring the transaction lock...
[  466.571733] gfs2: fsid=dm-2.0: jid=0: Replaying journal...0x720 to 0x72a
[  466.576946] gfs2: fsid=dm-2.0: jid=0: Replayed 2 of 5 blocks
[  466.579126] gfs2: fsid=dm-2.0: jid=0: Found 3 revoke tags
[  466.581231] ------------[ cut here ]------------
[  466.582941] kernel BUG at fs/gfs2/recovery.c:309!
[  466.584694] invalid opcode: 0000 [#1] SMP PTI
[  466.586255] CPU: 5 PID: 37 Comm: kworker/5:0 Kdump: loaded Tainted:
G        W         5.9.0+ #435
[  466.589389] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009),
BIOS 1.13.0-2.fc32 04/01/2014
[  466.592443] Workqueue: gfs_recovery gfs2_recover_func [gfs2]
[  466.594451] RIP: 0010:update_statfs_inode.isra.7+0x35/0x17e [gfs2]
[  466.596607] Code: 41 56 41 55 41 54 53 48 83 ec 30 65 48 8b 04 25
28 00 00 00 48 89 45 d0 31 c0 48 8b 47 28 48 8b 98 60 06 00 00 48 85
c9 75 02 <0f> 0b 49 89 cc 49 89 d7 48 8b 91 f0 03 00 00 49 89 f6 48 8d
4d b0
[  466.603068] RSP: 0018:ffffb97b401dfc08 EFLAGS: 00010246
[  466.604899] RAX: ffff9143979fc000 RBX: ffff914395bb4000 RCX: 0000000000000000
[  466.607423] RDX: ffffb97b401dfcf0 RSI: ffff914376c1cf80 RDI: ffff914375fb6a50
[  466.609907] RBP: ffffb97b401dfc60 R08: ffff914395bb4000 R09: 0000000000000001
[  466.612402] R10: 00000000bdc64e7c R11: 00000000ab4460f4 R12: ffff914376c1cf00
[  466.614850] R13: ffff914395bb4000 R14: 0000006c91d3605f R15: ffff914376c1cf80
[  466.617346] FS:  0000000000000000(0000) GS:ffff91439f680000(0000)
knlGS:0000000000000000
[  466.620155] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  466.622161] CR2: 00007ff80367cf1e CR3: 0000000825712003 CR4: 0000000000370ee0
[  466.624674] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  466.627145] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  466.629628] Call Trace:
[  466.630532]  ? gfs2_revoke_clean+0x6d/0x90 [gfs2]
[  466.632206]  gfs2_recover_func.cold.13+0x8fe/0x912 [gfs2]
[  466.634122]  ? lock_acquire+0xcb/0x3a0
[  466.635454]  ? process_one_work+0x1ad/0x560
[  466.636949]  ? gfs2_recover_func.cold.13+0x26c/0x912 [gfs2]
[  466.638910]  process_one_work+0x22c/0x560
[  466.640366]  ? process_one_work+0x22c/0x560
[  466.641846]  worker_thread+0x37/0x390
[  466.643143]  ? process_one_work+0x560/0x560
[  466.644626]  kthread+0x13d/0x160
[  466.645774]  ? kthread_park+0x90/0x90
[  466.647049]  ret_from_fork+0x22/0x30
[  466.648234] Modules linked in: dm_flakey gfs2 dlm nft_fib_inet
nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv6
nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack rfkill
nf_defrag_ipv6 nf_defrag_ipv4 ip6_tables nft_compat ip_set nf_tables
nfnetlink intel_rapl_msr intel_rapl_common kvm_intel kvm irqbypass
crct10dif_pclmul snd_hda_codec_generic crc32_pclmul ledtrig_audio
snd_hda_intel snd_intel_dspcfg ghash_clmulni_intel iTCO_wdt
iTCO_vendor_support snd_hda_codec rapl snd_hda_core snd_hwdep i2c_i801
snd_pcm joydev pcspkr i2c_smbus lpc_ich snd_timer virtio_balloon snd
qxl soundcore drm_ttm_helper ttm drm_kms_helper cec drm xfs libcrc32c
crc32c_intel serio_raw virtio_net net_failover virtio_blk
virtio_console failover qemu_fw_cfg
[  466.667870] ---[ end trace 2cdb0867c48ce2a7 ]---

That's the BUG_ON(!inode) in update_statfs_inode. I've pushed the
kernel I've been using to
https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git/log/?h=local-statfs-improvements;
that's for-next + v5.9 + iomap-5.10-merge-2 from the xfs tree.

Thanks,
Andreas



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Cluster-devel] [PATCH v2 0/3] gfs2: local statfs improvements
  2020-09-25  3:46 [Cluster-devel] [PATCH v2 0/3] gfs2: local statfs improvements Abhi Das
                   ` (3 preceding siblings ...)
  2020-10-15 12:05 ` [Cluster-devel] [PATCH v2 0/3] gfs2: local statfs improvements Andreas Gruenbacher
@ 2020-10-15 14:49 ` Andreas Gruenbacher
  4 siblings, 0 replies; 6+ messages in thread
From: Andreas Gruenbacher @ 2020-10-15 14:49 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Abhi,

On Fri, Sep 25, 2020 at 5:46 AM Abhi Das <adas@redhat.com> wrote:
> This patchset allows gfs2 to sync statfs info from the journal to the
> master statfs file during a log flush or during recovery. We still
> write to the local statfs file to allow older versions to recover the
> statfs info of newer kernels with this patchset.

I can't find any documentation about how the whole statfs mechanism
works in the code, so things that should be documented include:

* How did the statfs mechanism work historically (globally, per
resource group, per node)?
* How did adding statfs information to the journal help?
* How does this patch set improve upon that?

Thanks,
Andreas



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-10-15 14:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-25  3:46 [Cluster-devel] [PATCH v2 0/3] gfs2: local statfs improvements Abhi Das
2020-09-25  3:46 ` [Cluster-devel] [PATCH v2 1/3] gfs2: Add fields for statfs info in struct gfs2_log_header_host Abhi Das
2020-09-25  3:46 ` [Cluster-devel] [PATCH v2 2/3] gfs2: lookup local statfs inodes at mount time Abhi Das
2020-09-25  3:46 ` [Cluster-devel] [PATCH v2 3/3] gfs2: Recover statfs info in journal head Abhi Das
2020-10-15 12:05 ` [Cluster-devel] [PATCH v2 0/3] gfs2: local statfs improvements Andreas Gruenbacher
2020-10-15 14:49 ` Andreas Gruenbacher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.