diff options
author | Richard Weinberger <richard@nod.at> | 2019-08-13 23:55:48 +0200 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2019-08-22 17:24:59 +0200 |
commit | 377e208f44784174f3002d9892d553715a3ab71b (patch) | |
tree | 77496a5741b4a9ba2d332db389d00e033a438c85 /fs/ubifs/io.c | |
parent | 4dd75b335bc1f10fb1a01b5cd58870d47c13c4e7 (diff) |
ubifs: Correctly initialize c->min_log_bytes
Currently on a freshly mounted UBIFS, c->min_log_bytes is 0.
This can lead to a log overrun and make commits fail.
Recent kernels will report the following assert:
UBIFS assert failed: c->lhead_lnum != c->ltail_lnum, in fs/ubifs/log.c:412
c->min_log_bytes can have two states, 0 and c->leb_size.
It controls how much bytes of the log area are reserved for non-bud
nodes such as commit nodes.
After a commit it has to be set to c->leb_size such that we have always
enough space for a commit. While a commit runs it can be 0 to make the
remaining bytes of the log available to writers.
Having it set to 0 right after mount is wrong since no space for commits
is reserved.
Fixes: 1e51764a3c2ac ("UBIFS: add new flash file system")
Reported-and-tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs/io.c')
0 files changed, 0 insertions, 0 deletions