bch/ioctl: support FLUSH cache by cmd: BIOC_FLUSH

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
Jiuzhu Dong 2021-11-30 14:15:03 +08:00 committed by Xiang Xiao
parent 84019b9170
commit f81ffb51cc
1 changed files with 8 additions and 0 deletions

View File

@ -422,6 +422,14 @@ static int bch_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
}
break;
case BIOC_FLUSH:
{
/* Flush any dirty pages remaining in the cache */
ret = bchlib_flushsector(bch);
}
break;
#ifdef CONFIG_BCH_ENCRYPTION
/* This is a request to set the encryption key? */