You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/08/18 04:39:05 UTC
[incubator-nuttx] branch master updated (e5f6daf -> f97b843)
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.
from e5f6daf net/socket: add SOCK_CLOEXEC/SOCK_NONBLOCK support
new ed3cddb drivers/bch: delay the sector flush
new f97b843 drivers/bch: flush the dirty sector to keep the sector sequence
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
drivers/bch/bchlib_write.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
[incubator-nuttx] 02/02: drivers/bch: flush the dirty sector to
keep the sector sequence
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit f97b8436b37fdf22541bf073078562b72771a8ec
Author: chao.an <an...@xiaomi.com>
AuthorDate: Mon Jul 13 19:40:07 2020 +0800
drivers/bch: flush the dirty sector to keep the sector sequence
flush the dirty sector to keep the sector sequence before ftl write
Change-Id: I1096cce39965806d5c877c2929b5a2ecdab27ac9
Signed-off-by: chao.an <an...@xiaomi.com>
---
drivers/bch/bchlib_write.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/bch/bchlib_write.c b/drivers/bch/bchlib_write.c
index 5920997..13ba469 100644
--- a/drivers/bch/bchlib_write.c
+++ b/drivers/bch/bchlib_write.c
@@ -141,6 +141,15 @@ ssize_t bchlib_write(FAR void *handle, FAR const char *buffer, size_t offset,
nsectors = bch->nsectors - sector;
}
+ /* Flush the dirty sector to keep the sector sequence */
+
+ ret = bchlib_flushsector(bch);
+ if (ret < 0)
+ {
+ ferr("ERROR: Flush failed: %d\n", ret);
+ return ret;
+ }
+
/* Write the contiguous sectors */
ret = bch->inode->u.i_bops->write(bch->inode, (FAR uint8_t *)buffer,
[incubator-nuttx] 01/02: drivers/bch: delay the sector flush
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit ed3cddb6841f43e6a20ac0e6cb75ca350b38fe31
Author: chao.an <an...@xiaomi.com>
AuthorDate: Mon Jul 13 18:46:39 2020 +0800
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 <an...@xiaomi.com>
---
drivers/bch/bchlib_write.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/bch/bchlib_write.c b/drivers/bch/bchlib_write.c
index 90f1af0..5920997 100644
--- a/drivers/bch/bchlib_write.c
+++ b/drivers/bch/bchlib_write.c
@@ -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;
}