]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - repair/incore_bmc.c
libxfs: refactor manage_zones()
[thirdparty/xfsprogs-dev.git] / repair / incore_bmc.c
CommitLineData
959ef981 1// SPDX-License-Identifier: GPL-2.0
2bd0ea18 2/*
da23017d
NS
3 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
4 * All Rights Reserved.
2bd0ea18
NS
5 */
6
6b803e5a 7#include "libxfs.h"
2bd0ea18
NS
8#include "avl.h"
9#include "globals.h"
10#include "incore.h"
11#include "agheader.h"
12#include "protos.h"
13#include "err_protos.h"
14
15void
16init_bm_cursor(bmap_cursor_t *cursor, int num_levels)
17{
18 int i;
19
dab9b8d6 20 memset(cursor, 0, sizeof(bmap_cursor_t));
2bd0ea18
NS
21 cursor->ino = NULLFSINO;
22 cursor->num_levels = num_levels;
23
24 for (i = 0; i < XR_MAX_BMLEVELS; i++) {
5a35bf2c
DC
25 cursor->level[i].fsbno = NULLFSBLOCK;
26 cursor->level[i].right_fsbno = NULLFSBLOCK;
27 cursor->level[i].left_fsbno = NULLFSBLOCK;
28 cursor->level[i].first_key = NULLFILEOFF;
29 cursor->level[i].last_key = NULLFILEOFF;
2bd0ea18
NS
30 }
31}