vfs/lfs: Simplify the lookahead_size equation
the final result is same(keep 8 bytes alignment) Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: I664879960c898a7f1518236b24a2b3ee8a9998d0
This commit is contained in:
parent
9f44417de4
commit
866fe646aa
|
@ -1023,9 +1023,8 @@ static int littlefs_bind(FAR struct inode *driver, FAR const void *data,
|
|||
fs->cfg.block_count = fs->geo.neraseblocks;
|
||||
fs->cfg.block_cycles = 500;
|
||||
fs->cfg.cache_size = fs->geo.blocksize;
|
||||
fs->cfg.lookahead_size =
|
||||
lfs_min(lfs_alignup((fs->cfg.block_count + 7) / 8, 8),
|
||||
fs->cfg.read_size);
|
||||
fs->cfg.lookahead_size = lfs_min(lfs_alignup(fs->cfg.block_count, 64) / 8,
|
||||
fs->cfg.read_size);
|
||||
|
||||
/* Then get information about the littlefs filesystem on the devices
|
||||
* managed by this driver.
|
||||
|
|
Loading…
Reference in New Issue