mirror of
https://github.com/apache/nuttx.git
synced 2026-05-20 12:33:27 +08:00
drivers/bch: delay the sector flush
Delay the sector flush to avoid multiple earse/write operations in sequence write Change-Id: If4331b7fc8d2c2061325533212b28e826141b411 Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
@@ -184,14 +184,5 @@ ssize_t bchlib_write(FAR void *handle, FAR const char *buffer, size_t offset,
|
||||
byteswritten += len;
|
||||
}
|
||||
|
||||
/* Finally, flush any cached writes to the device as well */
|
||||
|
||||
ret = bchlib_flushsector(bch);
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Flush failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return byteswritten;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user