linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <zajec5@gmail.com>
To: Richard Weinberger <richard@nod.at>,
	Artem Bityutskiy <dedekind1@gmail.com>,
	Adrian Hunter <adrian.hunter@intel.com>
Cc: linux-mtd@lists.infradead.org, "Rafał Miłecki" <rafal@milecki.pl>
Subject: [PATCH 0/2] ubifs: respect dirty_writeback_interval
Date: Wed, 14 Sep 2016 12:21:48 +0200	[thread overview]
Message-ID: <20160914102151.21722-1-zajec5@gmail.com> (raw)

From: Rafał Miłecki <rafal@milecki.pl>

Hi,

This patchset allows some ubifs adjustments that we realized we needed
in LEDE project.

LEDE can be unstable on power cuts when installed on NAND devices (with
ubifs). This is caused by the default high value of wbuf timeout used by
ubifs. Any write that isn't followed by fsync (this may happen with
buggy user space app or just shell script) may be lost if power cut
happens in less than 5 seconds.

One idea for fixing this (without modifying kernel at all) is to mount
ubifs with -o sync. This could affect NAND performance however, so I'm
looking for a better solution.

During IRC discussion MTD guys suggested lowering wbuf timeout and I
decided to give it a try. The simplest way to do that seems to be making
ubifs respect dirty_writeback_interval. This parameter can be easily set
with sysctl and is already used in some older file systems.

What do you think about this? I gave it a try with a simple
uci commit foo; sleep 1s; POWER_CUT
and it works as expected.

Rafał Miłecki (2):
  ubifs: drop softlimit and delta fields from struct ubifs_wbuf
  ubifs: use dirty_writeback_interval value for wbuf timer

 fs/ubifs/io.c    | 15 +++++++--------
 fs/ubifs/ubifs.h |  9 ---------
 2 files changed, 7 insertions(+), 17 deletions(-)

-- 
2.9.3

             reply	other threads:[~2016-09-14 10:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-14 10:21 Rafał Miłecki [this message]
2016-09-16 13:53 ` [PATCH 0/2] ubifs: respect dirty_writeback_interval Richard Weinberger
2016-09-16 14:43   ` Rafał Miłecki
2016-09-20  8:36 ` [PATCH V2 1/2] ubifs: drop softlimit and delta fields from struct ubifs_wbuf Rafał Miłecki
2016-09-20  8:36   ` [PATCH V2 2/2] ubifs: use dirty_writeback_interval value for wbuf timer Rafał Miłecki
2016-09-20  8:40     ` Boris Brezillon
2016-10-11 21:48   ` [PATCH V2 1/2] ubifs: drop softlimit and delta fields from struct ubifs_wbuf Rafał Miłecki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160914102151.21722-1-zajec5@gmail.com \
    --to=zajec5@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=rafal@milecki.pl \
    --cc=richard@nod.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).