Feature: Fatfs scandir format and mmcblk read/write optimization
1. Bcache block with high mem address is after lower mem address in RCU list when initing bcache. 2. Format will clear the bcache before writing the FAT. 3. The fatfs_readdir use the bcache writing block to reduce the chance of data switching out 4. Add performance analysing macron switch Change-Id: I8fbc48418509d2e660d725d2c265266e931c26f8
This commit is contained in:
@@ -1372,7 +1372,8 @@ int fatfs_readdir(struct Vnode *vp, struct fs_dirent_s *idir)
|
||||
DEF_NAMBUF;
|
||||
INIT_NAMBUF(fs);
|
||||
for (i = 0; i < idir->read_cnt; i++) {
|
||||
result = dir_read(dp, 0);
|
||||
/* using dir_read_massive to promote performance */
|
||||
result = dir_read_massive(dp, 0);
|
||||
if (result == FR_NO_FILE) {
|
||||
break;
|
||||
} else if (result != FR_OK) {
|
||||
@@ -1596,7 +1597,7 @@ static int fatfs_set_part_info(los_part *part)
|
||||
return -ENOMEM;
|
||||
}
|
||||
(void)memset_s(buf, disk->sector_size, 0, disk->sector_size);
|
||||
ret = los_disk_read(part->disk_id, buf, 0, 1);
|
||||
ret = los_disk_read(part->disk_id, buf, 0, 1, TRUE); /* TRUE when not reading large data */
|
||||
if (ret < 0) {
|
||||
free(buf);
|
||||
return -EIO;
|
||||
|
||||
Reference in New Issue
Block a user