On a 32-bit system it's possible for there to be so many items in the
repair list that we overflow a size_t. Widen this to unsigned long
long.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
struct scrub_ctx *ctx = (struct scrub_ctx *)wq->wq_ctx;
bool *aborted = priv;
struct action_list *alist;
- size_t unfixed;
- size_t new_unfixed;
+ unsigned long long unfixed;
+ unsigned long long new_unfixed;
unsigned int flags = 0;
int ret;
int *rshift)
{
xfs_agnumber_t agno;
- size_t need_fixing = 0;
+ unsigned long long need_fixing = 0;
for (agno = 0; agno < ctx->mnt.fsgeom.agcount; agno++)
need_fixing += action_list_length(&ctx->action_lists[agno]);
}
/* Number of repairs in this list. */
-size_t
+unsigned long long
action_list_length(
struct action_list *alist)
{
struct action_list {
struct list_head list;
- size_t nr;
+ unsigned long long nr;
bool sorted;
};
return list_empty(&alist->list);
}
-size_t action_list_length(struct action_list *alist);
+unsigned long long action_list_length(struct action_list *alist);
void action_list_add(struct action_list *dest, struct action_item *item);
void action_list_splice(struct action_list *dest, struct action_list *src);