Skip to contentSkip to conversation

UBIFS: Question about calc_dd_growth()

DISCUSSION Dongsheng Yang 1 participant 1 message Jul 20, 2015 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hi Atem and Richard and all:

I am doing some work about adding support of quota
in ubifs. But I found there is a question in calc_dd_growth I am confused about.

417 if (req->dirtied_ino)
418 dd_growth += c->bi.inode_budget <<
(req->dirtied_ino - 1);

Why it's a '<<'?? I mean, to myself, it's clear to be that:

  dd_growth += c->bi.inode_budget * req->dirtied_ino;

Could you help to explain it to me?

Thanx
Yang