From 3148d3179824b18597ccff739a0cacc86d55da1b Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 7 Mar 2026 13:35:05 +0000 Subject: util/clarity: name the gbe file half size we need only declare it in the centralised gbe_file_offset function, which determines whether a write to the gbe file falls specifically within the 4KB range that is the gbe part. it is always half of the gbe file size, and then the first 4KB of each half stores the gbe part. Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 3a374e6c..c9d9b4ca 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -875,8 +875,10 @@ write_gbe_file_part(size_t p) static off_t gbe_file_offset(size_t p, const char *f_op) { + off_t gbe_file_half_size = gbe_file_size >> 1; + return gbe_x_offset(p, f_op, "file", - gbe_file_size >> 1, gbe_file_size); + gbe_file_half_size, gbe_file_size); } /* -- cgit v1.2.1