<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">https://lore.kernel.org/linux-xfs/20250221185757.79333-1-preichl@redhat.com/

From: Pavel Reichl &lt;preichl@redhat.com&gt;
To: aalbersh@redhat.com
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH v2] xfsprogs: Fix mismatched return type of filesize()
Date: Fri, 21 Feb 2025 19:57:57 +0100
Message-ID: &lt;20250221185757.79333-1-preichl@redhat.com&gt;
X-Mailer: git-send-email 2.48.1
In-Reply-To: &lt;20250217155043.78452-1-preichl@redhat.com&gt;
References: &lt;20250217155043.78452-1-preichl@redhat.com&gt;
Precedence: bulk
X-Mailing-List: linux-xfs@vger.kernel.org
List-Id: &lt;linux-xfs.vger.kernel.org&gt;
List-Subscribe: &lt;mailto:linux-xfs+subscribe@vger.kernel.org&gt;
List-Unsubscribe: &lt;mailto:linux-xfs+unsubscribe@vger.kernel.org&gt;
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

The function filesize() was declared with a return type of 'long' but
defined with 'off_t'. This mismatch caused build issues due to type
incompatibility.

This commit updates the declaration to match the definition, ensuring
consistency and preventing potential compilation errors.

Fixes: 73fb78e5ee8 ("mkfs: support copying in large or sparse files")

Signed-off-by: Pavel Reichl &lt;preichl@redhat.com&gt;
Reviewed-by: Darrick J. Wong &lt;djwong@kernel.org&gt;
Reviewed-by: Carlos Maiolino &lt;cem@kernel.org&gt;
--- a/mkfs/proto.c
+++ b/mkfs/proto.c
@@ -20,7 +20,7 @@ static struct xfs_trans * getres(struct xfs_mount *mp, uint blocks);
 static void rsvfile(xfs_mount_t *mp, xfs_inode_t *ip, long long len);
 static int newregfile(char **pp, char **fname);
 static void rtinit(xfs_mount_t *mp);
-static long filesize(int fd);
+static off_t filesize(int fd);
 static int slashes_are_spaces;
 
 /*
-- 
2.48.1
</pre></body></html>