All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 6/8] libgfs2: Add support for rg_data0, rg_data and rg_bitbytes
Date: Thu,  7 Dec 2017 11:53:37 +0000	[thread overview]
Message-ID: <20171207115339.3797-7-anprice@redhat.com> (raw)
In-Reply-To: <20171207115339.3797-1-anprice@redhat.com>

Signed-off-by: Andrew Price <anprice@redhat.com>
---
 gfs2/libgfs2/meta.c   |  5 +++++
 gfs2/libgfs2/ondisk.c | 21 +++++++++++++++++++--
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/gfs2/libgfs2/meta.c b/gfs2/libgfs2/meta.c
index be91f0cc..1b771f30 100644
--- a/gfs2/libgfs2/meta.c
+++ b/gfs2/libgfs2/meta.c
@@ -207,6 +207,11 @@ FP(rg_skip, .points_to = (1 << LGFS2_MT_GFS2_RGRP))
 RF(__pad)
 #endif
 F(rg_igeneration)
+#ifdef GFS2_HAS_RG_RI_FIELDS
+FP(rg_data0, .points_to = ANY_GFS2_BLOCK|(1 << LGFS2_MT_FREE))
+F(rg_data, .flags = LGFS2_MFF_FSBLOCKS)
+F(rg_bitbytes, .flags = LGFS2_MFF_BYTES)
+#endif
 RF(rg_reserved)
 };
 
diff --git a/gfs2/libgfs2/ondisk.c b/gfs2/libgfs2/ondisk.c
index b5c62114..fd25a860 100644
--- a/gfs2/libgfs2/ondisk.c
+++ b/gfs2/libgfs2/ondisk.c
@@ -233,8 +233,14 @@ void gfs2_rgrp_in(struct gfs2_rgrp *rg, struct gfs2_buffer_head *bh)
 	CPIN_32(rg, str, __pad);
 #endif
 	CPIN_64(rg, str, rg_igeneration);
-
+#ifdef GFS2_HAS_RG_RI_FIELDS
+	CPIN_64(rg, str, rg_data0);
+	CPIN_32(rg, str, rg_data);
+	CPIN_32(rg, str, rg_bitbytes);
+	CPIN_08(rg, str, rg_reserved, 64);
+#else
 	CPIN_08(rg, str, rg_reserved, 80);
+#endif
 }
 
 void gfs2_rgrp_out(const struct gfs2_rgrp *rg, char *buf)
@@ -251,8 +257,14 @@ void gfs2_rgrp_out(const struct gfs2_rgrp *rg, char *buf)
 	CPOUT_32(rg, str, __pad);
 #endif
 	CPOUT_64(rg, str, rg_igeneration);
-
+#ifdef GFS2_HAS_RG_RI_FIELDS
+	CPOUT_64(rg, str, rg_data0);
+	CPOUT_32(rg, str, rg_data);
+	CPOUT_32(rg, str, rg_bitbytes);
+	CPOUT_08(rg, str, rg_reserved, 64);
+#else
 	CPOUT_08(rg, str, rg_reserved, 80);
+#endif
 }
 
 void gfs2_rgrp_out_bh(const struct gfs2_rgrp *rg, struct gfs2_buffer_head *bh)
@@ -273,6 +285,11 @@ void gfs2_rgrp_print(const struct gfs2_rgrp *rg)
 	pv(rg, __pad, "%u", "0x%x");
 #endif
 	pv(rg, rg_igeneration, "%llu", "0x%llx");
+#ifdef GFS2_HAS_RG_RI_FIELDS
+	pv(rg, rg_data0, "%llu", "0x%llx");
+	pv(rg, rg_data, "%u", "0x%x");
+	pv(rg, rg_bitbytes, "%u", "0x%x");
+#endif
 }
 
 void gfs2_quota_in(struct gfs2_quota *qu, char *buf)
-- 
2.13.6



  parent reply	other threads:[~2017-12-07 11:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07 11:53 [Cluster-devel] [PATCH 0/8] gfs2-utils: Add support for new resource group fields Andrew Price
2017-12-07 11:53 ` [Cluster-devel] [PATCH 1/8] gfs2-utils configure: Check for rg_skip Andrew Price
2017-12-07 11:53 ` [Cluster-devel] [PATCH 2/8] libgfs2: Add rgrp_skip support Andrew Price
2017-12-07 11:53 ` [Cluster-devel] [PATCH 3/8] mkfs.gfs2: Pull place_journals() out of place_rgrps() Andrew Price
2017-12-07 11:53 ` [Cluster-devel] [PATCH 4/8] mkfs.gfs2: Set the rg_skip field in new rgrps Andrew Price
2017-12-07 13:29   ` Bob Peterson
2017-12-07 14:14     ` Andrew Price
2017-12-07 11:53 ` [Cluster-devel] [PATCH 5/8] gfs2-utils configure: Check for rg_data0, rg_data and rg_bitbytes Andrew Price
2017-12-07 13:29   ` Bob Peterson
2017-12-07 11:53 ` Andrew Price [this message]
2017-12-07 13:30   ` [Cluster-devel] [PATCH 6/8] libgfs2: Add support " Bob Peterson
2017-12-07 11:53 ` [Cluster-devel] [PATCH 7/8] mkfs.gfs2: Set the rg_data0, rg_data and rg_bitbytes fields Andrew Price
2017-12-07 13:31   ` Bob Peterson
2017-12-07 11:53 ` [Cluster-devel] [PATCH 8/8] libgfs2: Add support for rg_crc Andrew Price
2017-12-07 12:06   ` Steven Whitehouse
2017-12-07 13:53   ` Bob Peterson
2017-12-07 15:42     ` Andrew Price

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171207115339.3797-7-anprice@redhat.com \
    --to=anprice@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.