Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af1dd412 authored by Artem Bityutskiy's avatar Artem Bityutskiy
Browse files

UBIFS: store free and dirty space in the bud replay entry



This is just a small preparation patch which adds 'free' and 'drity' fields to
'struct bud_entry'. They will be used to set bud lprops.

Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent 12f33891
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -90,14 +90,16 @@ struct replay_entry {
 * struct bud_entry - entry in the list of buds to replay.
 * struct bud_entry - entry in the list of buds to replay.
 * @list: next bud in the list
 * @list: next bud in the list
 * @bud: bud description object
 * @bud: bud description object
 * @free: free bytes in the bud
 * @sqnum: reference node sequence number
 * @sqnum: reference node sequence number
 * @free: free bytes in the bud
 * @dirty: dirty bytes in the bud
 */
 */
struct bud_entry {
struct bud_entry {
	struct list_head list;
	struct list_head list;
	struct ubifs_bud *bud;
	struct ubifs_bud *bud;
	int free;
	unsigned long long sqnum;
	unsigned long long sqnum;
	int free;
	int dirty;
};
};


/**
/**
@@ -720,6 +722,8 @@ static int replay_buds(struct ubifs_info *c)
				 &free, &dirty);
				 &free, &dirty);
		if (err)
		if (err)
			return err;
			return err;
		b->free = free;
		b->dirty = dirty;
		err = insert_ref_node(c, b->bud->lnum, b->bud->start, b->sqnum,
		err = insert_ref_node(c, b->bud->lnum, b->bud->start, b->sqnum,
				      free, dirty, b->bud->jhead);
				      free, dirty, b->bud->jhead);
		if (err)
		if (err)